Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB Exam C100DBA Topic 1 Question 109 Discussion

Actual exam question for MongoDB's C100DBA exam
Question #: 109
Topic #: 1
[All C100DBA Questions]

Consider that our posts collection contains an array field called tags that contains tags that the user enters. {

Which of the following commands will find all the posts that have been tagged as tutorial.

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Glendora
9 days ago
Wait, 'tutorial' is a tag, not a tutorial. This test is testing my sanity, not my MongoDB skills.
upvoted 0 times
...
Gerald
10 days ago
B) db.posts.find( { $array : {tags: tutorial}) > is just plain weird. What is this, JavaScript land? I'll stick with good old C).
upvoted 0 times
...
Gilma
11 days ago
I think D is definitely wrong, it doesn't look like a valid command.
upvoted 0 times
...
Stefanie
14 days ago
I'm not sure, but C could also be a possibility.
upvoted 0 times
...
Lorita
14 days ago
D) db.posts.findInArray( { tags : tutorial > ); sounds like it should work, but I've never heard of that command. Is that some secret MongoDB technique?
upvoted 0 times
...
Luis
16 days ago
A) db.posts.find( { tags : [tutorial] } ); is the way to go. Gotta love that array matching!
upvoted 0 times
...
Corrie
20 days ago
I agree with Thea, A seems correct.
upvoted 0 times
...
Mindy
28 days ago
C) db.posts.find( { tags : tutorial } ); is the correct answer. It's a simple and straightforward way to query for posts with the 'tutorial' tag.
upvoted 0 times
...
Thea
28 days ago
I think the answer is A.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77