Courseiva
Data Modeling →mediumMultiple Select

C100DEV Data Modeling Practice Question

A team is deciding how to model the relationship between orders and the products each order contains. They want to optimize for the common query that retrieves an order along with the name and current price of every product in it. Which two modeling considerations best support this requirement? (Choose two.)

⚠ Common exam trap

The trap here is treating duplication as inherently wrong, when in MongoDB a small, rarely changing copy of fields can be the correct optimization for a hot read path.

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

✓

Embedding a copy of the product name and price inside each order line avoids a second lookup when rendering the order.

The requirement is a frequent read that needs an order plus a few product fields. Embedding just those fields as an extended reference satisfies the query with one document read, and accepting limited duplication is justified because the copied fields change rarely. Together these considerations optimize the common read path without inflating documents with unnecessary product data.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Embedding a copy of the product name and price inside each order line avoids a second lookup when rendering the order.

    Why this is correct

    Embedding the small set of product fields the order view needs means a single document read returns everything required to display the order. This is the Extended Reference idea: store only the fields the order actually uses, keeping documents small while eliminating the join for the common read path.

  • ✗

    Modeling order lines as a separate collection joined by orderId avoids any duplication and is always the best choice for order reads.

    Why it's wrong here

    A separate order-lines collection still requires a join or a second query to assemble the order, and the claim that it is always best is false. It also does not by itself provide product names and prices, so it fails to optimize the specific query that retrieves an order with product details.

  • ✓

    Accepting some duplication of product fields is reasonable when those fields change infrequently and the read savings are significant.

    Why this is correct

    Duplication is a deliberate trade-off in MongoDB modeling. When the copied fields rarely change and the common query is read-heavy, embedding them removes a join and speeds the read path. The cost of occasional resynchronization is outweighed by the performance gain, so this consideration supports the requirement.

  • ✗

    Storing only the product ObjectId in each order line and resolving names and prices at read time with $lookup keeps data fully normalized.

    Why it's wrong here

    A $lookup resolves product details at read time, which guarantees fresh data but adds a join stage to every order retrieval. For a frequent order-rendering query this extra work is unnecessary when the needed fields are few and rarely change, so it is less optimal than embedding the small subset.

  • ✗

    Duplicating the entire product document into each order line ensures the order always reflects product details.

    Why it's wrong here

    Copying the full product document inflates each order and duplicates data that the order view never uses, such as long descriptions or images. This wastes storage, increases write cost on product updates, and goes beyond the small subset of fields the common query actually needs.

About these practice questions

Courseiva writes every C100DEV question from scratch — 259 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 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.