Just added: Algorithms you can run and practice
Updated Jul 10, 2026 Edit on GitHub

SQL vs NoSQL, Plainly

You've probably watched this argument play out. One person swears relational databases are the only serious choice; another insists NoSQL is the modern way and SQL is a relic. Both sound confident, both have battle scars, and you're left wondering which side is right for your app - usually under deadline pressure, picking a database you'll live with for years.

Here's the straight answer up front: this isn't a fight with a winner. "SQL" and "NoSQL" name two different shapes of data store, each tuned for different problems. The skill isn't picking the "best" one - it's recognizing which shape fits the problem in front of you. This guide gives you the mental models and the real trade-offs so you can choose on purpose, not on hype.

How to read this

  • Need the decision now? Jump to Phase 3: How to Actually Choose - it leads with a plain-language picker and the two warnings that catch people.
  • Want it to finally make sense? Read in order. Phase 1 builds the mental models, Phase 2 lays out the real trade-offs, and Phase 3 turns those into a decision you can defend.

The phases

  1. The Relational Model & What "NoSQL" Even Means - what "relational" actually is (tables, relationships, SQL), and why "NoSQL" is an umbrella over four very different families: document, key-value, wide-column, and graph.
  2. The Real Trade-offs - schema flexibility vs enforced integrity, joins vs denormalization, consistency vs horizontal scale, and query power vs raw speed - laid out fairly, both sides.
  3. How to Actually Choose - the boring-correct default, when to reach for a specific NoSQL store, and the two traps ("NoSQL ≠ no schema" and "you can mix").

This guide is about choosing between the families. The deep mechanics of any one store - how to design Mongo documents well, how to tune a wide-column key, how to model a graph - are big enough to deserve their own guides, and we deliberately leave them there.

📝 New to databases entirely? Start with What a Database Is, then come back here.