Increase your chances of passing the MongoDB C100DEV exam questions on your first try. Practice with our free online C100DEV exam mock test designed to help you prepare effectively and confidently.
Consider a tasks collection that holds task records. The document structure is as follows:{ "_id": ObjectId("64b64c58ed01c0a5e72dbf5f"), "task": "Review PR", "status": "pending", "assignedTo": "alice"}Two operations are performed concurrently:Operation A:db.tasks.findAndModify({ query: { task: "Review PR", status: "pending" }, remove: true});Operation B:db.tasks.findAndModify({ query: { task: "Review PR", status: "pending" }, update: { $set: { status: "completed" } }, new: true});Operation B starts slightly after Operation A but before Operation A completes. What will be the final state of the tasks collection after both operations have been executed?
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?
A MongoDB collection named logs is used to store event data for a web application. The collection originally had indexes on the timestamp, user_id, and event_type fields to facilitate fast queries on these fields. Due to a recent data archiving strategy, you decide to remove the index on event_type to save storage space. However, after doing so, some queries on the logs collection have slowed down considerably, especially those filtering by event_type. What is the most likely ramification of deleting the index on the event_type field?
We have an accounts collection with the following document structure:{ _id: ObjectId("5ca4bbc7a2dd94ee5816239d"), account_id: 864905, limit: 10000, products: [ 'Commodity', 'InvestmentStock' ]},{ _id: ObjectId("5ca4bbc7a2dd94ee5816239e"), account_id: 299072, limit: 10000, products: [ 'InvestmentFund', 'InvestmentStock' ]},{ _id: ObjectId("5ca4bbc7a2dd94ee5816239f"), account_id: 137994, limit: 10000, products: [ 'CurrencyService', 'InvestmentStock' ]}We need to use Aggregation Framework to find the distribution of products field. Sort the result set by decreasing total number of products.Expected output:[ { _id: 'InvestmentStock', total: 1746 }, { _id: 'CurrencyService', total: 742 }, { _id: 'Brokerage', total: 741 }, { _id: 'InvestmentFund', total: 728 }, { _id: 'Commodity', total: 720 }, { _id: 'Derivatives', total: 706 }]Which pipeline should you use?
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.
© Copyrights FreeMockExams 2026. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (FreeMockExams). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the FreeMockExams.