Courseiva
Data Modeling →easyMultiple Choice

C100DEV Data Modeling Practice Question

An inventory system stores each product's supplier as an embedded subdocument containing the supplier name, address, and contact email. The supplier's address changes frequently, and updates now require scanning and updating thousands of product documents. Which data modeling change best resolves this maintenance problem?

⚠ Common exam trap

The trap here is reaching for an index to fix an update problem, when indexes only help reads and never remove duplicated embedded data.

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

✓

Convert the supplier subdocument to a reference by storing the supplier's ObjectId in the product document and keeping supplier details in a suppliers collection.

Referencing is appropriate when a subdocument represents a shared entity that changes independently of its parent. Keeping supplier details in their own collection means one update fixes every product, removes duplicate mutable data, and keeps product documents lean. Indexing the embedded field, versioning the schema, or archiving supplier history all leave the core duplication and mass-update cost in place.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Add an index on the embedded supplier.address field so updates to that field become faster.

    Why it's wrong here

    Indexes accelerate reads and queries, not the cost of updating thousands of duplicated embedded copies. Each product document still contains its own copy of the address, so a supplier move still requires writing every product document; the index would actually add write overhead because it must also be maintained. The fundamental duplication problem remains unaddressed by this change.

  • ✗

    Move the supplier subdocument into an array field so all supplier versions are retained for auditing.

    Why it's wrong here

    Storing historical supplier versions in an array increases document size, complicates queries because the current supplier must be distinguished from past ones, and still duplicates address data across every product. It does not reduce the number of writes required when an address changes; it multiplies them and makes the schema harder to reason about for routine lookups.

  • ✗

    Use the Schema Versioning Pattern by adding a version field to each product document and migrating documents lazily.

    Why it's wrong here

    Schema versioning helps when the shape of documents must change over time without a full downtime migration, for example adding a new required field. Here the schema shape is fine; the problem is duplicated mutable data. Adding a version field would not stop the need to update every product when a supplier moves and would add migration complexity unrelated to the actual maintenance issue.

  • ✓

    Convert the supplier subdocument to a reference by storing the supplier's ObjectId in the product document and keeping supplier details in a suppliers collection.

    Why this is correct

    When an entity like a supplier is updated independently and shared by many parent documents, referencing avoids duplicated data. Storing only the supplier's ObjectId lets a single update to the suppliers collection propagate to all products, eliminating the mass-update problem while keeping document sizes small and consistent with MongoDB's recommendation to embed for locality but reference for independently mutated shared data.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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.