New Year Sale ! 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 5 Question 101 Discussion

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

Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Gwenn
3 months ago
I'm going with option A. It's clear and straightforward, and it does exactly what the question asks for.
upvoted 0 times
Nguyet
1 months ago
Option A is the best choice for retrieving only the post_text key.
upvoted 0 times
...
Jaime
1 months ago
I would go with option A as well.
upvoted 0 times
...
Gwenn
1 months ago
I agree, option A seems to be the most accurate choice.
upvoted 0 times
...
Zack
2 months ago
I think option A is the correct one.
upvoted 0 times
...
...
Norah
3 months ago
Haha, option D is just a mess. 'finOne}' instead of 'findOne()' and 'post_text:l' instead of 'post_text:1'. Rookie mistake!
upvoted 0 times
Florinda
1 months ago
C) db.posts.find({},{_id:Of post_text:1})
upvoted 0 times
...
Shelba
2 months ago
B) db.posts.findOne({post_text: 1})
upvoted 0 times
...
Margarita
2 months ago
A) db.posts.finOne({},{_id:0, post_text:1})
upvoted 0 times
...
...
Charolette
3 months ago
I think option C is the correct one. It's the only one that explicitly says 'post_text:1' to retrieve just that field.
upvoted 0 times
...
Valene
3 months ago
Option A looks good, it retrieves only the post_text field from the first document.
upvoted 0 times
Lashon
2 months ago
User 3: I'm also leaning towards option A, it seems to be the most accurate choice.
upvoted 0 times
...
France
2 months ago
Yes, I agree. Option A looks good for that.
upvoted 0 times
...
An
3 months ago
I think option A is the correct query to retrieve only the post_text field.
upvoted 0 times
...
...
Kanisha
3 months ago
I'm not sure, but I think it's C because we need to exclude the _id field.
upvoted 0 times
...
Tracey
3 months ago
I disagree, I believe the correct answer is B.
upvoted 0 times
...
Amie
4 months ago
I think the answer is A.
upvoted 0 times
...

Save Cancel