Database Design: SQL vs NoSQL
Difficulty: Easy | Topic #2
What to Learn
When to use relational (ACID, joins, strong consistency) vs NoSQL (flexible schema, horizontal scale). Understand document, key-value, wide-column, and graph stores and their tradeoffs.
Resources
- Hello Interview: Data Modeling ↗
- ByteByteGo: SQL vs NoSQL is the WRONG Question ↗
- Gaurav Sen: SQL vs NoSQL — Tradeoffs ↗
Covered by Problems
| Problem | Difficulty | Link |
|---|---|---|
| URL Shortener/Bitly | Easy | → |
| File Storage/Dropbox | Easy | → |
| FB News Feed | Medium | → |
| Medium | → | |
| Online Chess | Hard | → |
Key Concepts to Master
- ACID vs BASE properties
- Normalization vs denormalization for read performance
- Choosing a primary key and access patterns for NoSQL
- When to pick Postgres vs DynamoDB vs Cassandra
- Data modeling for high fan-out vs high-read workloads