Part 1 of 6 · 1 min read
Why this page comes first
In this module you will
- Explain the object-relational mismatch and why a document model can reduce it.
- Represent a one-to-many relationship as a single nested document instead of several tables.
- Distinguish schema-on-read from schema-on-write, and say when each is the better fit.
- Explain the storage-locality advantage of a document, and its cost on partial reads and updates.
- Recognize when growing many-to-many relationships make a document model the wrong choice.
Level 0 introduced the bookstore's relational schema. It uses books, authors, customers and orders, joined by foreign keys. This page asks a different question. What happens if that same data is stored as nested documents instead? Some parts of the bookstore would benefit. Others would not. This page explains why.