Courseiva
Data Modeling →mediumMultiple Choice

C100DEV Data Modeling Practice Question

When designing a schema for a blog application, you need to store comments for posts. The comments grow indefinitely. Which approach is most effective for long-term scalability?

⚠ Common exam trap

Candidates often choose only one extreme: either embedding all comments or referencing all of them. They fail to realize that a hybrid approach is necessary for balancing performance and scalability.

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

✓

Use the Hybrid pattern for embedded and referenced comments.

The Hybrid pattern is best here. You embed the most recent comments (e.g., the last 10) directly within the post document to allow for fast initial page loads. Simultaneously, you store older comments in a separate collection with a reference to the post ID. This provides a balance between high-speed access for recent content and the ability to scale indefinitely without ever hitting the BSON size limit.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Embed all comments in the post document.

    Why it's wrong here

    Embedding all comments will eventually hit the 16MB document limit, causing significant production failures. Even before hitting the limit, large documents are inefficient to update and consume more memory than necessary, leading to performance degradation as the blog post grows in popularity over time and accumulates many comments.

  • ✗

    Reference all comments in a separate collection.

    Why it's wrong here

    While this avoids the size limit, it forces an extra read operation for every single view of the blog post. This is inefficient for the common case where users simply want to see the latest comments immediately upon loading the page, resulting in unnecessary latency for the user experience.

  • ✓

    Use the Hybrid pattern for embedded and referenced comments.

    Why this is correct

    The Hybrid pattern balances the speed of embedding with the scalability of referencing. By keeping the latest comments embedded, you ensure fast reads for the most common use cases, while offloading historical data to a separate collection, preventing document bloat and ensuring the database scales as expected.

  • ✗

    Use the Attribute pattern for every comment.

    Why it's wrong here

    The Attribute pattern is designed for managing diverse or dynamic document fields, not for handling lists of related entities like comments. Attempting to use the Attribute pattern for comments would result in a complex, unmanageable schema that makes querying for specific comment threads extremely difficult and highly inefficient.

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 →

How Courseiva writes practice questions · Editorial policy

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.