BlackFriday 2024! 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
28 days ago
I'm going with option A. It's clear and straightforward, and it does exactly what the question asks for.
upvoted 0 times
Zack
8 days ago
I think option A is the correct one.
upvoted 0 times
...
...
Norah
29 days 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
Shelba
5 days ago
B) db.posts.findOne({post_text: 1})
upvoted 0 times
...
Margarita
19 days ago
A) db.posts.finOne({},{_id:0, post_text:1})
upvoted 0 times
...
...
Charolette
1 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
1 months ago
Option A looks good, it retrieves only the post_text field from the first document.
upvoted 0 times
Lashon
14 days ago
User 3: I'm also leaning towards option A, it seems to be the most accurate choice.
upvoted 0 times
...
France
18 days ago
Yes, I agree. Option A looks good for that.
upvoted 0 times
...
An
29 days ago
I think option A is the correct query to retrieve only the post_text field.
upvoted 0 times
...
...
Kanisha
2 months ago
I'm not sure, but I think it's C because we need to exclude the _id field.
upvoted 0 times
...
Tracey
2 months ago
I disagree, I believe the correct answer is B.
upvoted 0 times
...
Amie
2 months ago
I think the answer is A.
upvoted 0 times
...

Save Cancel