MongoDB C100DEV - MongoDB Associate Developer Exam

Question #11 (Topic: Exam A)
Given the following documents in a collection and given a unique index on the n field:
{ _id: 1, n: ‘Apple’, p: 0.75, c: ‘Green’ },
{ _id: 2, n: ‘Orange’, p: 0.85, c: ‘Orange’, q: 14 },
{ _id: 3, n: [1,3,5,7], c: 42 },
{ _id: 9, n: Green, c: 42 }
What document can successfully be added in the same collection?
A. { _id: 4, n: ‘Banana’, p: 0.75, c: ‘Yellow’ } B. { _id: 5, n: ‘Apple’, p: 0.85, c: ‘Orange’, q: 14 } C. { _id: 3, n: ‘Mango’, c: 42} D. { _id: 2, n: ‘Banana’, p: 0.75, c: ‘Green’ }
Answer: A
Question #12 (Topic: Exam A)
Given the following explain plan:

What statement is true for this explain plan?
A. This is using an index. B. This has a sort stage with index support. C. This is not using an index. D. This uses an index in reverse direction.
Answer: C
Question #13 (Topic: Exam A)
Given the following documents in the orders collection:

What mongosh command will find a document with status order placed?
A. db.orders.find_one( {status:“Order Placed”} ) B. db.orders.findOne( {status:“Order Placed”} ) C. db.orders.findone( {status:“Order Placed”} ) D. db.orders.find_One( {status:“Order Placed”} )
Answer: B
Question #14 (Topic: Exam A)
A collection named products contains 100 documents.
What method should be used to get all results from a cursor using mongosh?
A. db.products.findAll(); B. db.products.forEach().toArray(); C. db.products.find().toArray(); D. db.products.find()[];
Answer: C
Question #15 (Topic: Exam A)
Given the following schema sample in the inventory collection (with 1 million documents):
{ “_id” : 1, “item” : “Apple”, “type” : “fruit”, “quantity” : 500 }
What operations may become slower if the index {“item”: 1, “quantity”: 1} is created on this collection?
A. db.inventory.find({“quantity”: {$gte: 250, $lte: 400}}) B. db.inventory.updateMany({{“type”: “food” }, {$set: {“status” : “BackOrder”}}}) C. db.inventory.updateMany({{“type”: “fruit” }, {$inc: {“quantity” : 100}}}) D. db.inventory.find({“item”: “Apple”})
Answer: C
Download Exam
Page: 3 / 18
Total 87 questions