Free MongoDB C100DEV Exam Questions

Become MongoDB Certified with updated C100DEV exam questions and correct answers

Page:    1 / 83      
Total 411 Questions | Updated On: Nov 24, 2025
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

Which of the following statements are true regarding the MongoDB Aggregation Framework and pipelines? (Select two)


Answer: A,E
Question 3

Consider the following scenario: You have a MongoDB collection named users that stores user information. Each document in the collection has the following structure:
{
  "_id": ObjectId("609fe4b5728ad805aef1a88d"),
  "name": "John Doe",
  "age": 30,
  "email": "johndoe@example.com",
  "address": {
    "street": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zipcode": "10001"
  }
}
You need to retrieve all the documents from the users collection and convert them to an array format. Which of the following MongoDB queries should you use for this task?


Answer: B
Question 4

Consider a collection named orders with the following documents:
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e1"),
   "order_id" : 101,
   "customer_name" : "John Doe",
   "order_date" : ISODate("2022-01-01T00:00:00.000Z"),
   "items" : [
      {
         "product_name" : "Apple",
         "quantity" : 2,
         "price" : 0.99
      },
      {
         "product_name" : "Banana",
         "quantity" : 5,
         "price" : 0.5
      }
   ]
}
 
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e2"),
   "order_id" : 102,
   "customer_name" : "Jane Doe",
   "order_date" : ISODate("2022-01-02T00:00:00.000Z"),
   "items" : [
      {
         "product_name" : "Orange",
         "quantity" : 3,
         "price" : 0.79
      },
      {
         "product_name" : "Mango",
         "quantity" : 2,
         "price" : 1.99
      }
   ]
}
 
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e3"),
   "order_id" : 103,
   "customer_name" : "Bob Smith",
   "order_date" : ISODate("2022-01-03T00:00:00.000Z"),
   "items" : [
      {
         "product_name" : "Peach",
         "quantity" : 4,
         "price" : 1.49
      },
      {
         "product_name" : "Pear",
         "quantity" : 1,
         "price" : 2.99
      }
   ]
}
What is the query to retrieve the total sales for each customer in the orders collection?


Answer: B
Question 5

Consider a collection named students with the following document:
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e1"),
   "name" : "Alice",
   "age" : 21,
   "courses" : [
      {
         "name" : "Math",
         "grade" : 89
      },
      {
         "name" : "Science",
         "grade" : 92
      }
   ]
}
What is the query to update the grade of the "Math" course for the student with "_id" equal to ObjectId("5f0a7e80d8c9c7b5a48c49e1") to 95?


Answer: C
Page:    1 / 83      
Total 411 Questions | Updated On: Nov 24, 2025
Add To Cart

© Copyrights DumpsCertify 2025. All Rights Reserved

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