C100DEV MongoDB Overview and Document Model Practice Question
A development team is modeling a MongoDB collection for a ticketing system. Each ticket has a unique ticketId, a status, and a variable set of custom fields that differ by department. The team wants to ensure that queries on ticketId and status can use indexes efficiently and that the custom fields remain flexible. Which statement best describes how the document model supports this requirement?
⚠ Common exam trap
The trap here is thinking that a flexible schema prevents indexing or that indexes must cover every field, when in fact indexes are defined on specific fields and coexist with variable document shapes.
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
✓
Documents in the same collection can have different fields, and indexes on ticketId and status can be created regardless of the custom fields present.
The document model allows each ticket to have its own shape while sharing common fields. Indexes are created on specific fields such as ticketId and status, and they work even when documents contain additional custom fields. This gives the team efficient lookups on the common fields and the flexibility to store department-specific data without schema migrations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Documents in the same collection can have different fields, and indexes on ticketId and status can be created regardless of the custom fields present.
Why this is correct
MongoDB collections are schema-flexible, so each ticket document can contain a different set of custom fields while sharing common fields such as ticketId and status. Indexes are defined on specific fields and do not require every document to contain those fields. This allows efficient queries on ticketId and status while keeping department-specific fields flexible, which is exactly what the team needs.
- ✗
MongoDB enforces a collection-level schema, so the team must define all custom fields in a validator before inserting tickets.
Why it's wrong here
MongoDB does not enforce a collection-level schema by default. Validators are optional and must be explicitly created, and they can be used to enforce required fields, but they do not have to include every custom field. The scenario wants flexibility for variable custom fields, so requiring all of them in a validator would contradict that goal and is not how the document model works.
- ✗
Custom fields must be stored in a separate collection because MongoDB does not allow arrays or subdocuments in the same collection as scalar fields.
Why it's wrong here
MongoDB allows arrays and subdocuments alongside scalar fields within the same document and collection. There is no requirement to move custom fields to a separate collection. Storing them separately would add complexity and extra queries without any technical necessity, so this option misrepresents the document model and does not meet the requirement for flexible custom fields.
- ✗
Indexes in MongoDB are created on collections, not fields, so the team cannot index ticketId and status without also indexing all custom fields.
Why it's wrong here
Indexes in MongoDB are created on one or more fields of a collection, not on all fields indiscriminately. You can create an index on ticketId and a separate index on status without including custom fields. This option confuses collection-level index creation with field-level index keys and would unnecessarily restrict index design.
About these practice questions
Courseiva writes every C100DEV question from scratch — 259 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.