C100DEV CRUD Operations Practice Question
A developer is troubleshooting a Python application that uses the MongoDB driver to query the 'products' collection with find({'category': 'tools'}). Which two statements about the returned cursor are correct? (Choose two.)
⚠ Common exam trap
The trap here is assuming find eagerly loads everything or guarantees an ordering, when cursors are lazy and unordered without an explicit sort.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The cursor automatically closes when it is exhausted, but must be closed explicitly if iteration stops early.
Cursors are lazy and fetch documents in batches during iteration, and they close automatically when exhausted but require explicit close() if iteration stops early. They do not eagerly load all matches, do not automatically re-execute on concurrent writes, and do not guarantee any result order without an explicit sort. These properties affect both memory use and server resource management.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The cursor loads all matching documents into client memory immediately when find is called.
Why it's wrong here
find does not eagerly load all matches. The driver retrieves documents in batches on demand, which is why a cursor can iterate millions of documents without exhausting client memory. Only conversion methods such as list() or to_list() load everything into memory at once.
- ✗
The cursor returns documents in an order guaranteed by the storage engine, so no explicit sort is needed.
Why it's wrong here
Without an explicit sort, MongoDB does not guarantee result order; documents may be returned in natural order, which can change with updates and index choices. Relying on natural order produces nondeterministic results. Applications that need a specific order must call sort() on the cursor.
- ✓
The cursor automatically closes when it is exhausted, but must be closed explicitly if iteration stops early.
Why this is correct
When a cursor is fully iterated, the driver closes it and releases the server-side cursor. If the application stops early, the cursor remains open until it times out server-side or is closed explicitly with close(). Failing to close cursors can leak server resources in long-running applications.
- ✗
The cursor is invalidated and re-executed automatically whenever the underlying collection is modified by another client.
Why it's wrong here
Cursors are not re-executed on writes by other clients. A cursor represents a snapshot of query results as they are fetched in batches, and concurrent writes are generally not reflected in an already-open cursor. There is no automatic invalidation and re-execution mechanism for ordinary find cursors.
- ✓
The cursor is lazy; documents are fetched from the server in batches as the application iterates over it.
Why this is correct
find returns a cursor object, and the driver fetches results in batches only as the application iterates. This lazy behavior means the query is not fully materialized up front, and the default batch size can be tuned with batch_size. It is a core reason cursors are memory-efficient for large result sets.
About these practice questions
This C100DEV question is part of Courseiva's 259-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official MongoDB exam blueprint
This C100DEV practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DEV exam.