Courseiva
Philosophy and Features →hardMultiple Choice

C100DBA Philosophy and Features Practice Question

A social media platform uses MongoDB to store user posts. Each post document contains an array of comments. The platform's engineers notice that some posts have tens of thousands of comments, causing documents to approach the 16 MB size limit and degrading read performance. They want to redesign the schema to handle this growth while preserving the ability to retrieve a post with its most recent comments efficiently. Which approach best aligns with MongoDB's schema design philosophy?

⚠ Common exam trap

The trap here is assuming that all related data must be either fully embedded or fully referenced, ignoring hybrid patterns.

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

✓

Embed only the most recent comments in the post document and store older comments in a separate collection.

The hybrid approach of embedding recent comments and storing older ones separately aligns with MongoDB's philosophy of designing for the common access pattern while managing document growth. By keeping the post document small, reads remain fast, and the application can still retrieve older comments via a separate query when needed. This pattern is recommended for scenarios with unbounded arrays, balancing performance and scalability.

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 only the most recent comments in the post document and store older comments in a separate collection.

    Why this is correct

    This hybrid approach, known as the outlier pattern or subset pattern, embeds a limited number of recent comments to keep the document small and fast to read, while storing the full set in a separate collection for archival or pagination. It aligns with MongoDB's philosophy by optimizing for the common access pattern (viewing recent comments) while avoiding unbounded document growth. This design balances performance and scalability.

  • ✗

    Store each comment as a separate document in the same collection and use a parent reference to link them to the post.

    Why it's wrong here

    Storing comments in the same collection as posts would mix different document types, complicating queries and indexing. While referencing is valid, it would require additional queries to fetch comments for a post, and the same collection would contain heterogeneous documents. This approach does not leverage embedding for the common case and can lead to inefficient queries, making it less aligned with MongoDB's design philosophy.

  • ✗

    Increase the document size limit by configuring the storage engine to allow larger BSON documents.

    Why it's wrong here

    The 16 MB document size limit is a hard limit in MongoDB and cannot be increased by configuration. Attempting to do so is not possible. This option is a distractor because it suggests a non-existent configuration change. The correct approach is to redesign the schema to work within the limit, not to try to bypass it, which is impossible.

  • ✗

    Store all comments in a separate collection and use $lookup to join them when needed.

    Why it's wrong here

    Using $lookup to join comments for every post retrieval introduces significant overhead, especially at scale. While it avoids document size limits, it contradicts the philosophy of storing data that is accessed together in the same document. Frequent $lookup operations can be slow and resource-intensive, and they do not provide the efficiency of embedded data for the common case of fetching a post with its comments.

About these practice questions

Courseiva writes every C100DBA question from scratch — 222 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 →

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 C100DBA 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 C100DBA exam.