C100DEV MongoDB Overview and Document Model Practice Question
A developer is designing a MongoDB collection to store blog posts. Each post document includes an array of comments, and each comment has fields such as 'author', 'text', and 'timestamp'. The developer wants to optimize for queries that retrieve posts along with their comments, and also wants to ensure that comments are stored efficiently. Which two of the following statements are true regarding the document model in this scenario? (Choose two.)
⚠ Common exam trap
The trap here is assuming that embedding is always the best choice without considering document size limits or that referencing always reduces duplication, while the question asks for true statements about the model.
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
✓
Embedding comments as an array within the post document allows retrieving the post and its comments in a single query.
Embedding comments within the post document allows retrieving the post and comments in one query, which is efficient for read-heavy access patterns. However, the 16MB document size limit must be considered if comments grow unbounded. The other statements are either incorrect or not directly related to the document model design in this scenario.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Storing comments in a separate collection and referencing them from the post document reduces data duplication.
Why it's wrong here
Referencing comments in a separate collection can reduce duplication if comments are shared, but in this scenario comments are specific to a post. However, the statement is not universally true; duplication may not be a primary concern. More importantly, it would require additional queries to retrieve comments, which is not optimal for the stated goal.
- ✗
Embedding comments always improves write performance because it requires only a single document update.
Why it's wrong here
Embedding comments can improve write performance for adding a comment because it is a single document update. However, the word 'always' makes this false; if the document grows large, updates may become slower due to document rewrites. Additionally, concurrent updates to the same document can cause contention. So this statement is not universally true.
- ✗
Using the $slice operator in a query can limit the number of comments returned from an embedded array.
Why it's wrong here
The $slice operator is used in projections to limit the number of array elements returned. While it can be used to return a subset of comments, it is not a statement about the document model design itself. The question asks for true statements regarding the document model, and this is a query technique, not a modeling consideration.
- ✓
Embedding comments as an array within the post document allows retrieving the post and its comments in a single query.
Why this is correct
Embedding comments in the post document stores all related data together, so a single query can fetch the post and all its comments. This is efficient for read operations that need the complete post with comments, and it leverages MongoDB's document model to avoid additional queries.
- ✓
The 16MB document size limit may be a consideration if a post accumulates a very large number of comments.
Why this is correct
MongoDB documents have a maximum size of 16MB. If a post has an extremely large number of comments, embedding them could cause the document to exceed this limit. Therefore, this is a valid consideration when deciding to embed comments, making this statement true.
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.