An overview of five major database models, explaining their strengths, weaknesses, and ideal use cases.
Get a Free System Design Roadmap PDF with 145 pages by subscribing to our monthly newsletter: codewithlucian.com/roadmap
✏️📘 Summary Notes: codewithlucian.com/blog/consistent-hashing
Key-Value 🐇
- Flexible for Unstructured Data
- Fast Lookup
- In-Memory Database
- Not for Complex Data Structures
- Not for ACID transactions
- Not for Historical Data
- Caching
Wide-column 🎡
- Column layout
- Primary Keys
- Denormalized
- Not for Random Filtering and Rich queries
- Not for Transaction Processing
- High scalability
- Optimized for Writes
Document 📑
- Denormalized
- Handle Unstructured Data
- Indexing and Rich Query
- Not for Complex joins and relationships
- Not for Referential integrity
- Most intuitive
Relational 👑
- Mature and formalized datamodel
- Normalization
- Difficult to scale horizontally
- ACID
Graph 🍇
- No need to compute the relationships at query time
- Handles Complex Data Structures
- Difficult to scale
- Not for Write-heavy workloads
- Multi-hop relationships
Why it's here
2 people recommend this
What people say. Recommended as a helpful guide for choosing the right database model based on system requirements.
d
u/darkangelstrikein r/Database • Recommends
On “Database selection for storing large amount of eye-tracking data”
Does it have to be a relational or a document database? You must choose the right tool for your requirements. Maybe this video will help you make a choice link to this video