Databases: SQL vs NoSQL

The heart of your architecture. Choosing the wrong database is the most expensive mistake you can make. Learn the 5 families of databases and when to use them.

What you will learn

  • Decide between Relational (SQL) and Non-Relational (NoSQL)
  • Understand the 4 Families of NoSQL (KV, Doc, Column, Graph)
  • Master ACID vs BASE trade-offs
  • Implement Polyglot Persistence (Using multiple DBs at once)

If your application server crashes, you restart it. If your database crashes, you update your resume.

The database is where the state lives. It is the most critical, hardest-to-scale component of any system.

For 30 years, we only had one choice: SQL. Today, we have dozens. This brings power, but also paralysis.


To understand the split, imagine two buildings.


Examples: PostgreSQL, MySQL, SQL Server, Oracle.

  • A - Atomicity: "All or Nothing". If you transfer money, and the power fails halfway, the money doesn't disappear. The transaction rolls back.
  • C - Consistency: The data always follows the rules (constraints).
  • I - Isolation: Two people editing the same row won't corrupt it.
  • D - Durability: Written to disk means safe forever.

"NoSQL" is a marketing term. It really means "Not Only SQL". It covers four completely different technologies.


How do you choose? Follow the flow.

Create a free account to read the full chapter — advanced chapters, progress tracking, and quizzes are free with sign-up.