C100DEV CRUD Operations Practice Question
A developer is querying the 'events' collection to retrieve documents and needs to control which fields are returned to reduce network payload. Which two statements about projection in MongoDB find() operations are correct? (Choose two.)
⚠ Common exam trap
The trap here is believing inclusion and exclusion fields can be mixed freely or that projection changes stored data.
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
✓
Setting _id to 0 in an inclusion projection removes the _id field from the returned documents while still returning the other included fields.
Projection operates in either inclusion or exclusion mode, never both, with _id as the sole exception that can be suppressed alongside included fields. Projection only shapes query results and does not alter stored documents, and _id can indeed be excluded.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A projection cannot exclude the _id field under any circumstance because it is mandatory in every query result.
Why it's wrong here
_id is returned by default but is not mandatory. Setting _id: 0 removes it from results, which is common when returning aggregated or summarized data. Claiming it can never be excluded contradicts documented projection behaviour and the special-casing of _id in inclusion projections.
- ✓
Setting _id to 0 in an inclusion projection removes the _id field from the returned documents while still returning the other included fields.
Why this is correct
The _id field is special: it is returned by default, but setting _id: 0 explicitly excludes it even when other fields are included. This lets applications drop the identifier while keeping selected fields. It is the documented exception to the mixing rule for projections.
- ✗
A projection may freely mix inclusion and exclusion fields as long as at least one field is set to 1 and at least one is set to 0.
Why it's wrong here
Mixing inclusion and exclusion is not allowed except for _id. Attempting to include one field and exclude another, such as returning name but not age, produces an error. The server requires a consistent projection direction to avoid ambiguous intent.
- ✓
A projection can include specific fields by setting them to 1 and exclude others by setting them to 0, but inclusion and exclusion cannot be mixed in the same projection, with the exception of the _id field.
Why this is correct
MongoDB enforces a single projection mode: either inclusion or exclusion. You may list fields to include, or fields to exclude, but not both, except that _id can be suppressed while including other fields. This rule prevents ambiguous projections and is a core principle of find() field selection.
- ✗
Projection reduces the size of documents written to disk, so it permanently shrinks the stored data for the collection.
Why it's wrong here
Projection affects only the documents returned by a query; it does not modify stored data. Documents remain unchanged on disk and in subsequent queries. Confusing read-time shaping with storage optimization is a frequent misunderstanding, since only updates or compaction change stored sizes.
About these practice questions
One of 259 original C100DEV practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.