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 1 Question 85 Discussion

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

Suposse tou have the following collection with only 2 documents:

If you run an aggregation query and use { $unwind: "$traits" } as the first stage, how many documents will be passed to the next stage of the aggregation pipeline?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Giovanna
5 months ago
I agree with the answer is 4. Each document in the collection will be duplicated for every element in the 'traits' array, resulting in 4 documents in total.
upvoted 0 times
...
Venita
6 months ago
I'm not sure, but I think the answer is 2. The $unwind stage will create a document for each element in the 'traits' array, resulting in a total of 2 documents.
upvoted 0 times
...
Luis
6 months ago
I disagree, I believe the answer is 4. The $unwind stage will create a document for each element in the 'traits' array but it will maintain the original document as well.
upvoted 0 times
...
Matthew
7 months ago
I think the answer is 3 because $unwind: "$traits" will create a separate document for each element in the 'traits' array.
upvoted 0 times
...
Nidia
7 months ago
Oh, thanks for correcting me. D) 2
upvoted 0 times
...
Adolph
7 months ago
Incorrect. It is actually D) 2
upvoted 0 times
...
Nidia
7 months ago
C) 4
upvoted 0 times
...
Adolph
7 months ago
B) 5
upvoted 0 times
...

Save Cancel