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 20, 2024
Add To Cart
Question 1

We have the following indexes:
{ name: 1, founded_year: 1 }
{ tag_list: 1, is_active: 1 }
And the following documents:

{
    _id: ObjectId("52cdef7c4bab8bd675297daa"),
    name: "Sparter",
    founded_year: 2007,
    tag_list: ["gaming", "game", "wow"],
    is_active: true
},
{
    _id: ObjectId("52cdef7c4bab8bd675297da3"),
    name: "Yahoo!",
    founded_year: 1994,
    tag_list: ["search", "webmail"],
    is_active: true
}
Select the true statement.


Answer: B
Question 2

Which of the following statements correctly describes the relationship between BSON and JSON in MongoDB?


Answer: C
Question 3

You are working on a MongoDB database for a library system. The system tracks book information in a Books collection. A typical document in this collection looks like this:
Original Document:
{
  "_id": ObjectId("book_id"),
  "title": "The Art of Computer Programming",
  "author": "Donald Knuth",
  "genres": ["Computer Science", "Algorithms"],
  "published_year": 1968,
  "copies_available": 3
}
You are asked to update the document by replacing it with the following document:
Updated Document:
{
  "title": "The Art of Computer Programming",
  "published_year": 1973
}
After this update, what will the final document in the database look like?


Answer: A
Question 4

Given the following orders collection in MongoDB:
[
  {
    "_id": 1,
    "customer": "John",
    "orderDetails": [
      { "productId": "P1", "quantity": 2, "unitPrice": 50 },
      { "productId": "P2", "quantity": 1, "unitPrice": 30 }
    ]
  },
  {
    "_id": 2,
    "customer": "Sara",
    "orderDetails": [
      { "productId": "P1", "quantity": 3, "unitPrice": 50 },
      { "productId": "P3", "quantity": 2, "unitPrice": 20 }
    ]
  },
  {
    "_id": 3,
    "customer": "Peter",
    "orderDetails": [
      { "productId": "P2", "quantity": 2, "unitPrice": 30 },
      { "productId": "P4", "quantity": 1, "unitPrice": 100 }
    ]
  }
]
Which MongoDB query will find all orders that contain a product with the productId of "P1" and a quantity greater than 1?


Answer: A
Question 5

You are managing a MongoDB collection named orders, where each document represents an order. The documents contain the following fields:order_id (String): The unique identifier for the order.customer_name (String): The name of the customer who placed the order.total_amount (Number): The total amount of the order.status (String): The status of the order, which can be "pending," "shipped," or "delivered."items (Array of Strings): A list of items included in the order.You want to find all orders that meet the following criteria:The order has a total amount greater than $1000.The order status is either "pending" or "shipped."The order contains either "laptop" or "smartphone" in the list of items.Which of the following queries would return the correct documents?


Answer: D
Page:    1 / 83      
Total 411 Questions | Updated On: Nov 20, 2024
Add To Cart

© Copyrights DumpsCertify 2024. All Rights Reserved

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