Skip to content
N
beginnerDatabases

Data Modelling for MongoDB

Design documents around your queries instead of against them.

7 lessons1h 3m2 sections
Need to Know HQPractical engineering courses, written by people who ship
$19.99$29.99
  • Lifetime access to all lessons
  • 7 lessons across 2 sections
  • Progress tracking across devices

What you'll learn

  • Decide when to embed and when to reference
  • Write aggregations that read like a pipeline instead of a puzzle
  • Index for the queries you actually run

Course content

2 sections · 7 lessons · 1h 3m

Shape3 lessons
  • Embed or referenceFree preview10m
    Read this lesson
    One question decides it: is the child list bounded, and is it read with the parent? A course's curriculum is both — a course has tens of lessons, not millions, and you always render them together. Embed it. One read, atomic writes, no joins. A course's students are neither. The list has no ceiling, and the course page doesn't need it. Separate collection, referenced by id. When you are unsure, ask what happens at the 99th percentile. "A few dozen" embeds fine. "Could be a million" does not.
  • The 16 MB ceiling is a design signal8m
  • Denormalizing on purpose11m
Querying4 lessons
  • Aggregation without tears12m
  • Indexes and the ESR rule13m
  • Text search, and its limits9m
  • Further reading

Requirements

  • Any programming background

Description

Coming from SQL, the hard part of MongoDB is not the syntax — it is unlearning normalization as a default. This short course covers the handful of decisions that determine whether a document database feels effortless or miserable six months in.

Student reviews