Free MongoDB C100DEV Exam Questions

Become MongoDB Certified with updated C100DEV exam questions and correct answers

Page:    1 / 83      
Total 411 Questions | Updated On: Jan 13, 2026
Add To Cart
Question 1

You have a MongoDB collection named employees that contains documents with fields name, department, and salary. You want to update the salary of all employees in the "Marketing" department to $75,000. The original collection looks like this:
[
  { "_id": 1, "name": "Alice", "department": "Marketing", "salary": 60000 },
  { "_id": 2, "name": "Bob", "department": "Sales", "salary": 55000 },
  { "_id": 3, "name": "Charlie", "department": "Marketing", "salary": 62000 },
  { "_id": 4, "name": "David", "department": "Engineering", "salary": 70000 }
]
You run the following MongoDB update operation:
db.employees.updateMany(
  { "department": "Marketing" },
  { $set: { "salary": 75000 } }
)
What will the collection look like after this update operation?


Answer: C
Question 2

How can we present the basic syntax for aggregation in MongoDB?


Answer: D
Question 3

What is the best practice in using the $match operator?


Answer: D
Question 4

You have two collections in your MongoDB database: students and grades. The students collection contains the following document:
{
    "_id": ObjectId("64d5b0e5c9d95a76ac3ebed2"),
    "student_id": 1,
    "name": "Alice"
}
The grades collection contains the following documents:
{
    "_id": ObjectId("64d5b0e5c9d95a76ac3ebed3"),
    "student_id": 2,
    "course": "Math",
    "grade": "A"
},
{
    "_id": ObjectId("64d5b0e5c9d95a76ac3ebed4"),
    "student_id": 2,
    "course": "Science",
    "grade": "B"
}
You run the following aggregation query to retrieve students along with their grades:
db.students.aggregate([
    {
        $lookup: {
            from: "grades",
            localField: "student_id",
            foreignField: "student_id",
            as: "grades_details"
        }
    }
])
What will be the structure of the documents returned by this aggregation query for the student with student_id: 1?


Answer: B
Question 5

Consider the following documents in a MongoDB collection orders:
{
   "_id": 1,
   "customer_id": 101,
   "item": "apple",
   "price": 0.5,
   "quantity": 100,
   "date": ISODate("2022-01-01T00:00:00Z")
},
{
   "_id": 2,
   "customer_id": 102,
   "item": "banana",
   "price": 0.25,
   "quantity": 50,
   "date": ISODate("2022-01-02T00:00:00Z")
},
{
   "_id": 3,
   "customer_id": 101,
   "item": "orange",
   "price": 0.75,
   "quantity": 75,
   "date": ISODate("2022-01-03T00:00:00Z")
}
What is the aggregation pipeline to group the documents by "customer_id" and calculate the sum of the "quantity" field for each group, sorted in descending order by the sum of the "quantity" field?


Answer: D
Page:    1 / 83      
Total 411 Questions | Updated On: Jan 13, 2026
Add To Cart

© Copyrights DumpsCertify 2026. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsCertify.