Lesson 6 / 32
SQL vs NoSQL
Choosing a data store by access pattern, not hype.
Relational strengths
SQL databases give strong schemas, ACID transactions, and flexible joins. Ideal when data is highly related and correctness matters (payments, inventory).
NoSQL families
Key-value (Redis, DynamoDB), document (MongoDB), wide-column (Cassandra), graph (Neo4j). They trade joins and transactions for horizontal scale and flexible schema.
Filing cabinet vs sticky notes
SQL is a labelled filing cabinet — rigid but you can cross-reference anything. NoSQL is a wall of sticky notes — fast to add, but you must arrange them for how you'll read them.
Model the query first
With NoSQL you design tables around the exact reads you need. If access patterns are unknown or changing, relational is safer.