MongoDB C100DEV - MongoDB Associate Developer Exam

Question #1 (Topic: Exam A)
What is the best practice for connecting to a MongoDB cluster with the Java Driver?
A. A single, cached MongoClient instance B. A new MongoClient instance for each logical transaction C. A new MongoClient instance for each request D. A pool of MongoClient instances to allow multiple concurrent database requests
Answer: A
Question #2 (Topic: Exam A)
A collection coll has the following documents:
{_id: 4, type: “A”, value: 60}
{_id: 5, type: “B”, value: 80}
{_id: 6, type: “A”, value: 30}
A collection results has the following documents:
{_id: 1, type: “A”, value: 10}
{_id: 2, type: “B”, value: 20}
{_id: 3, type: “C”, value: 30}
After executing the following aggregation pipeline:
db.coll.aggregate([
{ $match: { type: “A” }},
{ $out: ‘results’} ])
What is the result?
A. Collection results has the following documents:
{_id: 4, type: “A”, value: 60}
{_id: 6, type: “A”, value: 30}
B. Collection results has the following documents:
{_id: 1, type: “A”, value: 10}
{_id: 4, type: “A”, value: 60}
{_id: 6, type: “A”, value: 30}
C. Collection results has the following documents:
{_id: 1, type: “A”, value: 10}
{_id: 2, type: “B”, value: 20}
{_id: 3, type: “C”, value: 30}
{_id: 4, type: “A”, value: 60}
{_id: 6, type: “A”, value: 30}
D. Collection results has the following documents:
{_id: 1, type: “A”, value: 10}
{_id: 2, type: “B”, value: 20}
{_id: 3, type: “C”, value: 30}
{_id: 4, type: “A”, value: 60}
{_id: 5, type: “B”, value: 80}
{_id: 6, type: “A”, value: 30}
Answer: A
Question #3 (Topic: Exam A)
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?
A. Reference array to employee documents in each manager document B. Embed manager document into each employee document C. Embed employee documents as an array into each manager document D. Reference to manager document in each employee document
Answer: D
Question #4 (Topic: Exam A)
Given the following query:
db.coll.find({}).sort({“timestamp”: -1, “status”: 1})
Which two indexes will most improve the performance of this query? (Choose two.)
A. {“timestamp”: -1, “status”: -1} B. {“timestamp”: 1, “status”: -1} C. {“timestamp”: -1, “status”: 1} D. {“timestamp”: 1, “status”: 1}
Answer: CD
Question #5 (Topic: Exam A)
What Java code is a valid aggregation projection that can be used with collection.aggregate(pipeline)?
A. B. C. D.
Answer: C
Download Exam
Page: 1 / 18
Total 87 questions