Courseiva

C100DBA · topic practice

CRUD Operations practice questions

The CRUD Operations domain covers creating, reading, updating, and deleting documents in MongoDB using the shell and drivers. Questions test specific method names and update operators, plus the exact return values of read and write operations. You must know which operator or method fits a described task, and what MongoDB returns when a query matches nothing.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: CRUD Operations

What the exam tests

What to know about CRUD Operations

Be able to map a described data change to the exact MongoDB update operator or method, and to state what each read and write returns. The most important thing to get right is choosing $inc, $set, $push, $pull, $pop, updateMany with upsert, or findOne correctly for the scenario given.

Selecting the correct update operator such as $inc, $set, $push, or $pull for a described field change.

Using updateOne, updateMany, and replaceOne, and knowing how upsert inserts when no document matches.

Return values of findOne and find, including null when no document matches the query.

Removing array elements with $pull versus $pop, and inserting with $push and $addToSet.

Watch out for

Common CRUD Operations exam traps

  • ▸Confusing $pull, which removes array elements by value or condition, with $pop, which removes the first or last element only.
  • ▸Assuming findOne returns an empty document or throws an error when nothing matches; it actually returns null.
  • ▸Forgetting that updateMany without upsert true modifies only existing matches and inserts nothing when none are found.

Practice set

CRUD Operations questions

20 questions · select your answer, then reveal the explanation

Question 1mediummultiple choice
Read the full CRUD Operations explanation →

An application needs to update a user document by incrementing the 'login_count' field by 1 only if the 'status' field is set to 'active'. Which method is most efficient for this atomic operation?

Which TWO of the following statements regarding the 'upsert' option in MongoDB update operations are correct?

Which THREE of the following are valid ways to modify an array field in a document?

Refer to the exhibit. What will be the result of this query?

Exhibit

db.users.find({ status: 'active' }, { name: 1, _id: 0 })
Question 5mediummultiple choice
Read the full CRUD Operations explanation →

Which THREE of these are valid methods for deleting documents from a MongoDB collection?

Question 6mediummultiple choice
Read the full CRUD Operations explanation →

How do you perform a case-insensitive search using a regular expression in MongoDB?

Which THREE operations would require a write lock on the entire collection in older MongoDB versions (pre-WiredTiger) or affect performance significantly?

Question 8mediummultiple choice
Read the full CRUD Operations explanation →

You are updating a 'products' collection. You need to increment the 'stock' field by 5 for a document with SKU 'ABC-123', but only if the document currently exists. Which operator is most efficient for this?

Which TWO of the following statements correctly describe the behavior of the find() method in the MongoDB Node.js driver?

You are managing a MongoDB collection with a unique index on the 'email' field. You need to insert a new user document, but if a document with the same email already exists, you want to update the existing document with new fields. Which TWO operations achieve this? (Choose two.)

Question 11hardmultiple choice
Read the full CRUD Operations explanation →

A collection named `orders` contains documents with a field `status` that can be "pending", "shipped", or "delivered". You need to find all orders where `status` is either "pending" or "shipped", but you also want to exclude any orders where a boolean field `archived` is true. Which query should you use?

Question 12mediummultiple choice
Read the full CRUD Operations explanation →

You are a MongoDB DBA. You need to update a document in the 'inventory' collection by adding a new field 'lastUpdated' with the current date and time, but only if the document's 'quantity' is less than 10. Which update operation should you use?

You are using the MongoDB Node.js driver to insert a document into a collection. The write concern is set to { w: "majority", j: true }. Which two statements about the behavior of this write operation are correct? (Choose two.)

A financial application uses MongoDB 6.0. A DBA needs to implement a bulk write that processes a mix of inserts, updates, and deletes in a single network round trip while ensuring that operations are executed in the order they are provided. The collection has a unique index on `accountId`. Which two options correctly describe how to achieve this with the `bulkWrite()` method? (Choose two.)

Question 15mediummultiple choice
Read the full CRUD Operations explanation →

A DBA needs to update all documents in the `users` collection where the `lastLogin` field is older than 90 days. The update should set a `status` field to "inactive" and add a `deactivatedAt` field with the current date. The collection contains millions of documents and the operation must not impact production performance. Which approach is most appropriate?

Question 16easymultiple choice
Read the full CRUD Operations explanation →

When using the find() method, which cursor modifier is used to skip a specific number of documents before returning results?

Question 17mediummultiple choice
Read the full CRUD Operations explanation →

Refer to the exhibit. Which documents will this query return?

Exhibit

db.products.find({tags: 'electronics', price: {$lt: 500}}).sort({price: 1}).limit(5).pretty()
Question 18mediummultiple choice
Read the full CRUD Operations explanation →

Which operator would you use to remove an element from an array field in a document?

Question 19hardmultiple choice
Read the full CRUD Operations explanation →

What happens when you perform a find() query on a collection where the projection includes both an inclusion and an exclusion for different fields?

Question 20easymultiple choice
Read the full CRUD Operations explanation →

What is the primary function of the 'projection' parameter in the find() method?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused CRUD Operations sessions

Start a CRUD Operations only practice session

Every question in these sessions is drawn from the CRUD Operations domain — nothing else.

Related practice questions

Related C100DBA topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the C100DBA exam test about CRUD Operations?
Be able to map a described data change to the exact MongoDB update operator or method, and to state what each read and write returns. The most important thing to get right is choosing $inc, $set, $push, $pull, $pop, updateMany with upsert, or findOne correctly for the scenario given.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just CRUD Operations questions in a focused session?
Yes — the session launcher on this page draws every question from the CRUD Operations domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other C100DBA topics?
Use the topic links above to move to related areas, or go back to the C100DBA question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the C100DBA exam covers. They are not copied from any real exam or dump site.