SQL vs NoSQL
maang.io System Design Series
"SQL vs NoSQL" is the most common β and most misunderstood β database question in interviews. This deep dive replaces the false binary with a framework: relational vs the four NoSQL families (key-value, document, wide-column, graph), ACID vs BASE, rigid vs flexible schema, and vertical vs horizontal scaling. The answer is almost always "it depends β here's on what."
This deep dive comes in three parts:
- Foundations & Core Concepts β the families, ACID vs BASE, and the scaling models.
- Internals β schema-on-read, join-vs-embed, and polyglot persistence, with worked examples.
- Interview β Staff/Principal Q&A: picking a store and defending the trade-offs.
SQL vs NoSQL β Part 3: System Design & Interview Mastery
maang.io System Design Series
What is this?
You now know both back rooms β the B+tree and the LSM-tree, joins and quorums, WAL and MVCC. This chapter is where that knowledge earns the offer. Here's the thing interviewers know that juniors don't: "SQL or NoSQL?" is almost never the real question. The real question is "can you decompose a system into the few stores whose shapes fit its parts, and defend every trade when I push back?" Nobody senior picks one database for a whole company. They run the central library and the specialized branches, and they can tell you exactly why each one is there.
So we'll do two things: see where each store lands in real designs (with a full polyglot architecture), then run a mock interview β for each question, what they're really asking, a model answer, and the senior line that signals you've actually shipped this.
The one-line idea: interviewers use SQL-vs-NoSQL to test whether you default to the boring correct choice, justify each departure from it with a workload shape, and stay honest about the costs β no joins, stale reads, denormalization tax β rather than pattern-matching on "NoSQL scales."
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