Free MongoDB C100DEV Exam Questions

Become MongoDB Certified with updated C100DEV exam questions and correct answers

Page:    1 / 83      
Total 411 Questions | Updated On: Mar 27, 2025
Add To Cart
Question 1

As a MongoDB Developer, you are tasked with optimizing a MongoDB database. Your collection has documents with the following structure:
{
  "_id": ObjectId(),
  "user_id": Number,
  "user_data": {
    "name": String,
    "email": String,
    "phone": String,
    "address": {
      "city": String,
      "state": String,
      "country": String
    }
  },
  "transactions": [
    {
      "transaction_id": Number,
      "amount": Number,
      "date": Date
    }
  ]
}
The application frequently queries for the total transaction amount for users based on the city. Which index should you create to optimize the performance of these queries?


Answer: B
Question 2

Suppose you insert the following documents into a companies collection:
db.companies.insertMany([
    {"name": "Facebook"}, 
    {"name": "X"}
])
Select all true statements about this command. (Select three)


Answer: C,D,E
Question 3

Suppose you're designing a MongoDB database for an online ticket booking system where millions of users can concurrently book tickets for various events. To maintain data consistency, you need to ensure that only one user can book a specific seat for an event at a time. Which MongoDB feature would you use to ensure data consistency in this high-concurrency situation?


Answer: A
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

What is the difference between a sparse index and a non-sparse index in MongoDB?


Answer: A
Page:    1 / 83      
Total 411 Questions | Updated On: Mar 27, 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.