MongoDB C100DEV - MongoDB Associate Developer Exam

Question #6 (Topic: Exam A)
Which two are valid MongoDB BSON types? (Choose two.)
A. Boolean B. Float C. Number D. Double E. Map
Answer: AD
Question #7 (Topic: Exam A)
A products collection needs to update the value of the qty field to 100 for a document with a “card” item value. It should insert a new document if it does not exist.
What command should be used?
A. db.products.updateOne({ item: “card”} , { $set: { qty: 100 } }, { $upsert: true }) B. db.products.insertOne( { item: “card”} , { $set: { qty: 100 } }, { $upsert: true }) C. db.products.insertOne( { item: “card”} , { $set: { qty: 100 } }, { upsert: true }) D. db.products.updateOne({ item: “card”} , { $set: { qty: 100 } }, { upsert: true })
Answer: D
Question #8 (Topic: Exam A)
Given the following documents in the employees collection:
{ _id: 0, name: “Y.B.”, department: “Sales” },
{ _id: 1, name: “E.H.”, department: “Engineering” },
{ _id: 2, name: “C.Y.”, department: “Support” },
What mongosh command will find a document with name “E.H.”?
A. db.employees.query_one( {name: “E.H.”} ) B. db.employees.find_one( {name: “E.H.”} ) C. db.employees.queryOne( {name: “E.H.”} ) D. db.employees.findOne( {name: “E.H.”} )
Answer: D
Question #9 (Topic: Exam A)
Given the following query:
db.restaurants.find({“borough” : “Brooklyn” , “grades.score” : {$gt:5}})
No index exists for the restaurant collection.
What index definition most improves the performance?
A. db.restaurants.createIndex({“borough” : 1, “grades.score” : 1} ) B. db.restaurants.createIndex({“grades.score” : 1, “borough” : 1} ) C. db.restaurants.createIndex({“borough” : 1} ) D. db.restaurants.createIndex({“grades.score” : 1} )
Answer: A
Question #10 (Topic: Exam A)
There is a collection of patients for a medical practice.
Which two attributes associated with the patient should be embedded into the patient document rather than stored in its own collection and referenced? (Choose two.)
A. Visits to the practice B. Current prescriptions C. Diagnosed conditions D. Their primary doctor E. Their insurance provider
Answer: BC
Download Exam
Page: 2 / 18
Total 87 questions