C100DEV Data Modeling Practice Question
A team is modeling a schema for an order-processing system that must support atomic updates across an order and its line items and must guarantee that reading an order never returns a partially updated set of line items. (Choose two.)
⚠ Common exam trap
The trap here is treating a reference field or a read concern setting as if it provided atomicity across documents.
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
✓
Store line items in a separate collection and use a multi-document transaction spanning the order and its items.
Atomic updates and no-partial-read guarantees come from either keeping related data in one document, where MongoDB's single-document atomicity applies, or wrapping separate documents in a multi-document transaction with snapshot isolation. References and read concern settings do not by themselves provide cross-document atomicity, and capped collections are unrelated to the requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Store line items in a separate collection and use a multi-document transaction spanning the order and its items.
Why this is correct
When line items must live in their own collection, a multi-document transaction provides all-or-nothing writes across the order and item documents. It also gives snapshot isolation so concurrent readers do not observe a half-applied update. This meets the atomicity and no-partial-read requirements at the cost of transaction overhead.
- ✗
Enable majority read concern on the order collection, which by itself guarantees that line-item updates are applied atomically.
Why it's wrong here
Read concern controls the durability and isolation of reads on a replica set, but it does not create atomicity across separate documents. A majority read still sees whatever committed state exists, and if line items were updated in a separate operation, a partially applied state could be observed. Atomicity must come from modeling or transactions.
- ✓
Embed line items as an array within the order document so a single-document write updates the order and its items atomically.
Why this is correct
MongoDB guarantees atomicity at the single-document level, so embedding line items in the order means one update modifies the order and its items together. Readers see either the prior or the new version of the whole document, which satisfies both the atomic-update and no-partial-read requirements without transactions.
- ✗
Store line items in a separate collection and rely on the order's '_id' reference to enforce atomic updates across documents.
Why it's wrong here
A reference field is just data; it does not make writes across documents atomic. Updating the order and its items separately can leave them inconsistent if one write fails, and readers can observe partial states. Atomicity across documents requires a transaction or a change in modeling, not a reference.
- ✗
Use a capped collection for line items so older writes are overwritten and consistency is maintained.
Why it's wrong here
Capped collections impose insertion order and size limits and do not provide atomicity between an order and its items. Older documents are evicted, which is unsuitable for order history. This does not address the no-partial-read requirement and would risk data loss for line items.
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.