- Learn
- High Level System Design
- Databases and Storage Fundamentals
HLD-M06
Databases and Storage Fundamentals
Where data lives: relational databases and SQL, indexes, transactions and isolation, NoSQL families, storage engines, choosing a database, and object storage.
Almost every design decision eventually comes down to data: where it is stored, how it is found, what happens when two people change it at once, and what survives a crash. This module covers the foundations you need before scaling data out across many machines in the next module.
You will design a normalized schema and query it with joins, see why an index turns a full scan into a handful of page reads, follow a transaction through the write-ahead log, step two transactions through each isolation level and watch anomalies appear, compare the NoSQL families, look inside B-tree and LSM storage engines, work through a decision tree for choosing a database, and learn why files belong in object storage with only their metadata in the database.
Lessons
- HLD-06.01 Relational databases and SQL A relational database stores data in tables of rows and columns, links tables with keys and lets you query with SQL, including joins across tables. Beginner 15 min
- HLD-06.02 Indexes and B-trees Without an index, finding rows means scanning the whole table. Intermediate 14 min
- HLD-06.03 Transactions and ACID A transaction groups several operations so they succeed or fail together. Beginner 12 min
- HLD-06.04 Isolation levels and anomalies Isolation levels define which concurrency anomalies a database allows. Advanced 16 min
- HLD-06.05 NoSQL families NoSQL databases trade the relational model for a shape that fits specific access patterns. Beginner 14 min
- HLD-06.06 Storage engines: B-tree vs LSM-tree B-tree engines update data in place, which gives fast reads but random writes. Advanced 15 min
- HLD-06.07 Choosing the right database Start from the access patterns: which queries, how many reads and writes, what consistency and how much data. Intermediate 12 min
- HLD-06.08 Object storage, block storage and file systems Object storage such as S3 stores files as immutable objects in buckets, accessed over HTTP, with very high durability achieved through replication or erasure coding. Beginner 10 min