SQL vs NoSQL
| Relational (Postgres, MySQL) | NoSQL | |
|---|---|---|
| Model | tables, joins, schema | key-value (Redis, DynamoDB), document (Mongo), wide-column (Cassandra, Bigtable), graph (Neo4j) |
| Transactions | ACID, multi-row | usually single-key/partition; some offer more |
| Scaling | vertical + read replicas; sharding is manual | built-in partitioning, horizontal |
| Best for | money, inventory, relationships, ad-hoc queries | huge scale, simple access patterns, flexible schema, high write throughput |
Rule of thumb: start relational unless you have a clear reason (massive write volume, simple key access, schema flexibility, time-series). Model NoSQL tables around queries, not entities.