Goal: Go deep on how databases scale in distributed systems — replication, sharding, and consistent hashing are interview favorites. Keep Python and graph algorithms moving forward.
Topics
| Day | Focus | Topics |
|---|---|---|
| Mon | HLD Database Basics | SQL vs NoSQL · Database Indexing · Database Replication |
| Tue | HLD Database Scaling | Database Sharding · Consistent Hashing · ACID and Transactions |
| Wed | Python Internals | LEGB Scope Rule · Shallow vs Deep Copy · Exception Handling |
| Thu | DSA Graph Algorithms | Topological Sort · Shortest Path Algorithms |
| Fri | DSA Advanced Graphs | Union-Find |
Key Concepts
- Master-slave vs multi-master replication — consistency vs availability tradeoffs
- Horizontal vs vertical sharding strategies — range-based, hash-based, and directory-based
- Consistent hashing ring — why it minimizes data movement when nodes join or leave
- Python’s LEGB scope resolution — Local, Enclosing, Global, Built-in
- Shallow vs deep copy pitfalls — nested mutable objects are where bugs hide
- Dijkstra’s vs Bellman-Ford — greedy vs relaxation, and when negative edges matter
- Union-Find with path compression and union by rank — near O(1) amortized operations
Practice
- Design a sharding strategy for a user table with 100M rows — justify your shard key choice
- Implement Dijkstra’s algorithm from scratch — test it on a weighted graph
- Implement Union-Find with both path compression and union by rank
- Write code that demonstrates the difference between shallow and deep copy with nested lists
~12 topics · ~1.5-2 hrs/day · Focus: read the linked notes, then code each concept