← Concepts
Data·3 min read

SQL vs NoSQL

Pick relational when you need joins + transactions; pick a NoSQL store when you need a specific scaling property they're built for.

First time reading this? Start here

Plain English: SQL is great when your data is tables that connect to each other (users + orders + products) and you need correctness. NoSQL trades some of that flexibility for one specific strength, usually huge write volume or an unusual shape of data.

Used in:URL ShortenerWhatsAppTikTokYelp
What it is

SQL (relational) databases enforce schemas, support transactions, and are optimized for normalized data with relationships. NoSQL is a broad category covering key-value (Redis), document (MongoDB), wide-column (Cassandra), and graph (Neo4j) stores, each optimized for a specific access pattern that traditional SQL handles poorly.

The problem it solves

Not every workload fits a relational model. High-volume time-series writes, schemaless documents, huge horizontal scale, sub-millisecond key lookups: these have stores purpose-built for them. SQL is the right default; NoSQL is the right answer when you have a specific reason.

How it works

SQL: structured tables, joins, ACID transactions, strong consistency, vertical scaling (mostly). NoSQL families: key-value (O(1) lookup, no joins), document (flexible schema per row), wide-column (write-heavy time-series, sharded by partition key), graph (relationship-heavy queries).

Why use it
What it costs you
Where it shows up in our architectures
Gotchas

Your notes

Private to you