SQL & Data Modeling
maang.io System Design Series
Good data modeling is the foundation of every relational system. This deep dive covers the relational model β keys, normalization (1NFβBCNF) to remove anomalies, indexes (B+trees) that change query plans, and joins β plus when to deliberately denormalize for performance. Get the model right and everything downstream is easier.
This deep dive comes in three parts:
- Foundations & Core Concepts β relations, keys, and normalization.
- Internals β B+tree indexes, join strategies, and denormalization trade-offs, with worked numbers.
- Interview β Staff/Principal Q&A: schema design, indexing, and normalize-vs-denormalize.
SQL & Data Modeling β Part 3: System Design & Interview Mastery
maang.io System Design Series
What is this?
You now know the relational model from the ER sketch down to the B+tree leaf. This chapter is where that knowledge earns the offer. An interviewer doesn't want you to recite "3NF removes transitive dependencies" β they want to watch you choose a relational store for the right reasons, model a schema that survives scale, and defend the trade-offs when they push on consistency, joins, and sharding. That's the difference between a memorized fact and a senior signal.
We'll do two things: see where relational databases fit in real designs (with a data model), then run a mock interview β for each question, what they're really asking, a model answer, and the senior line that signals you've done this for real. Our town library carries through: relations are the card drawers, keys are the pointers, the catalog drawer is the index, and joins are matching cards across drawers.
The one-line idea: interviewers use SQL and data modeling to test whether you can match a schema's shape to a workload's queries β normalized for integrity, indexed for the reads you actually run, transactional where correctness demands it β and then reason honestly about what breaks when the box gets too big.
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson