Courseiva
Data Modeling →hardMultiple Choice

C100DEV Data Modeling Practice Question

When should you use the 'Computed Pattern' in MongoDB?

⚠ Common exam trap

Candidates frequently suggest using the Computed Pattern for all calculations, failing to realize it is only beneficial when the cost of frequent reads outweighs the cost of occasional updates.

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

✓

When the data is accessed frequently and requires an expensive calculation.

The Computed Pattern is used to store calculated values (like totals, counts, or averages) directly within a document to minimize expensive real-time calculations. This is vital when the cost of computing a result exceeds the cost of updating a stored value. It is particularly effective for read-intensive workloads where the computed result is requested frequently, allowing the application to simply read the pre-calculated value from the document.

Answer analysis

Option-by-option breakdown

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

  • ✗

    When you have a high write-to-read ratio for the specific data field.

    Why it's wrong here

    If writes are more frequent than reads, updating the computed value in the document every time a write occurs will create significant overhead and potential lock contention. The computed pattern is optimized for read-heavy workloads where the cost of reading the stored value is lower than calculating it repeatedly.

  • ✓

    When the data is accessed frequently and requires an expensive calculation.

    Why this is correct

    Pre-computing expensive values and storing them in the document allows for lightning-fast reads. The application avoids the performance penalty of re-calculating results (like sums or averages) during every query. This is a classic trade-off where storage space is exchanged for significant gains in read performance and application responsiveness.

  • ✗

    When you need to store binary large objects (BLOBs) in the database.

    Why it's wrong here

    The computed pattern is about numeric or aggregate results, not binary data. Storing BLOBs should be handled via GridFS or by keeping the data in separate collections if they exceed document size limits. Using this pattern for binary storage would be a misuse of the design principle.

  • ✗

    When you want to prevent all indexing on a specific collection.

    Why it's wrong here

    The computed pattern has no relationship to index management. Indexing is crucial for query performance in MongoDB regardless of whether you use computed fields or not. Suggesting this pattern as a way to avoid indexing is incorrect and would lead to disastrous performance for any non-trivial application.

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.