What mongosh function displays the indexes associated with the pets collection?
Answer : A
The book collection needs to update the value of the recorder field to true for all documents with a stock value less than 10.
What command should be used in mongosh?
Answer : A
Given the following query:
db.tests.find(
{ points: { $elemMatch: { $gte: 75, $lt: 80 } } }
)
Which two documents from collections tests will be returned by this query? (Choose two.)
Answer : CD
Given the following sample documents in the inventory collection:
{ _id: 6305, name: “A.S.”, “assignment” : 5, “points” : 24 },
{ _id: 6308, name: “B.M.”, “assignment” : 3, “points” : 22 },
{ _id: 6312, name: “E.M.”, “assignment” : 5, “points” : 30 },
{ _id: 6319, name: “R.S.”, “assignment” : 2, “points” : 12 },
{ _id: 6322, name: “A.S.”, “assignment” : 2, “points” : 14 },
{ _id: 6234, name: “R.S.”, “assignment” : 1, “points” : 10 },
{ _id: 6235, name: “A.S.”, “assignment” : 1, “points” : 30 },
{ _id: 6315, name: “E.M.”, “assignment” : 3, “points” : 14 },
What will delete only the document which stores “E.M.” lowest “points”, and returns the deleted document?
Answer : D
Given the following Java code:
What Java code inserts this document?
Answer : C
A collection named products contains 100 documents.
What method should be used to get all results from a cursor using mongosh?
Answer : C
In an employee collection, each document represents an employee of the company.
What data model is the most effective for tracking the relationship between an employee and their manager?
Answer : D
What is the best practice for connecting to a MongoDB cluster with the Java Driver?
Answer : A
Given the following documents in the orders collection:
{ _id: 0, user: “E.A.”, items: [ { item: “bag” } ], status: “Shipped” },
{ _id: 1, user: “M.T.”, items: [ { item: “polo”, size: 10 } ], status: “Order in Progress” },
{ _id: 2, user: “S.R.”, items: [ { item: “jacket”, size: 6 } ], { item: “polo”, size: 6 } ], status: “Order Placed” },
{ _id: 3, user: “T.C.”, items: [ { item: “polo”, size: 8 } ], { item: “pants”, size: 8 } ], status: “Order in Progress” },
{ _id: 4, user: “A.B.”, items: [ { item: “bag” }, { item: “jacket”, size: 8 } ], status: “Order Placed” },
{ _id: 5, user: “L.C.”, items: [ { item: “hat”, size: “S” } ], status: “Shipped” }
What mongosh command will find a document with status order placed?
Answer : B
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?
Answer : A
Given the following explain plan:
What statement is true for this explain plan?
Answer : C
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.)
Answer : BC
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?
Answer : 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”?
Answer : D
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?
Answer : D
Have any questions or issues ? Please dont hesitate to contact us