SQL vs NoSQL (and When)
Relational joins versus horizontally-scaled documents.
A relational (SQL) database like Postgres stores data in structured tables and can join them — combine rows from related tables in one query. A NoSQL database like DynamoDB stores self-contained documents and spreads them across many machines by hashing a key.
The animation is a split screen. On the left, rows snap into related tables, and when a query runs, join lines light up between them — that is the SQL superpower: ask complex questions across your data without planning for them in advance. On the right, a JSON document is flung by a hash function (a formula that turns a key into a machine assignment) onto one of many partition nodes — that is the NoSQL superpower: keep adding machines forever.
Watch the toggle: "complex queries" lights the left side, "infinite horizontal scale" lights the right. Neither side gets both for free.
Carry this into interviews: "Why this database?" is a guaranteed question, and "NoSQL because scale" is a classic failure. A well-tuned Postgres with read replicas handles far more than most candidates think — a few TB and tens of thousands of writes per second. Default to SQL, and justify NoSQL with a concrete access pattern, not a vibe.