C100DEV Data Modeling Practice Question
Which TWO of the following scenarios are best suited for using the 'Subset Pattern' in MongoDB?
⚠ Common exam trap
Test-takers often apply the Subset Pattern to unbounded arrays that grow continuously without restriction, defeating the purpose of limiting document size.
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
✓
A blog post collection where you display the last 5 comments on the main view.
The Subset Pattern is used to prevent documents from growing too large while keeping frequently accessed data local. By embedding only the most important subset of child documents (e.g., the five most recent comments) and referencing the rest, you balance read performance with document size management. This is essential for maintaining consistent performance levels as datasets scale, ensuring that the working set remains efficient for typical user queries.
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 blog post collection where you display the last 5 comments on the main view.
Why this is correct
This is the classic use case for the Subset Pattern. By embedding only the most recent five comments in the post document, you ensure fast page loads. The remaining comments are stored in a separate collection and retrieved only when the user explicitly requests to see the full comment history.
- ✗
A shopping cart collection where items are added and removed constantly.
Why it's wrong here
Shopping carts represent highly dynamic data that must always be accurate. Using the Subset Pattern here would create synchronization issues between the embedded subset and the total cart contents. A single document containing all cart items is usually preferred unless the cart size reaches extreme, unusual limits.
- ✗
A product catalog where you need to filter by over 100 different categories.
Why it's wrong here
Filtering across categories is a search problem, not a document size management problem. The Subset Pattern does not help with filtering performance across large datasets. Instead, you should use proper indexing strategies like multikey indexes or text indexes to handle categorical filtering for a product catalog effectively.
- ✓
A user profile collection where you store their 'top 3' favorite movies.
Why this is correct
Storing a user's 'top 3' favorites within the profile document is an ideal use case. It allows the UI to display relevant information immediately upon loading the user document. The user's entire watch history can be stored elsewhere, keeping the primary profile document lean for quick lookups.
- ✗
An audit log collection where every action must be stored for compliance.
Why it's wrong here
Audit logs are usually append-only and do not typically benefit from the Subset Pattern. Because audit logs must maintain a complete historical record, you cannot simply subset the data. Storing these in a separate collection or using time-series collections is the standard approach for managing high-volume log data.
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.