Weekend Sale Special Limited Time 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: CFsave75

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) C100DBA Question # 12 Topic 2 Discussion

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) C100DBA Question # 12 Topic 2 Discussion

C100DBA Exam Topic 2 Question 12 Discussion:
Question #: 12
Topic #: 2

Consider the following document from the products collection:

C100DBA Question 12

What does the following query using $elemMatch return? db.products.find( { product_code: " 345678 " }, { variations: { $elemMatch: { size: ^L^ } } } )


A.

Returns the complete document but retrieves only the size field from the array


B.

Returns the document but with only one element in the variations array (corresponding to size L)


C.

Returns the complete document since MongoDB does not support partial array retrieval


D.

Returns the complete document but retrieves only the size field from the array and also with only one element in the variations array (corresponding to size L)


Get Premium C100DBA Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.