bigonotes
System DesignDatabases

Databases

Storage engines, indexing, ACID and isolation levels.

9 notes · 61 min total

  1. 1Core DatabasesAudioThe four storage types almost every design uses: relational, NoSQL, blob storage and search, and when each one fits.10 min
  2. 2ACIDAudioWhat transactions are and how atomicity, consistency, isolation and durability keep data correct through crashes and concurrency.9 min
  3. 3Isolation LevelsAudioThe read anomalies concurrent transactions cause, the four SQL isolation levels that prevent them, and how serializable is implemented.9 min
  4. 4In-Memory vs Disk StorageAudioHow disk-based, in-memory and LSM-based databases each use RAM and disk, and what that means for speed and data safety.5 min
  5. 5Database IndexingAudioWhy indexes turn full table scans into fast lookups, and when to use primary, secondary, clustered, composite and covering indexes.7 min
  6. 6Hash IndexesAudioHow hash indexes give O(1) exact-match lookups, why they can't do ranges, how collisions are handled, and when to choose them over B-trees.4 min
  7. 7Read-Heavy Indexing: B-TreesAudioHow a B-tree finds any row in a few disk reads, how inserts and deletes keep it balanced, and why every extra index slows writes.4 min
  8. 8Write-Heavy Indexing: LSM TreesAudioHow LSM trees turn random writes into sequential ones using a memtable, SSTables, bloom filters, compaction, tombstones and a WAL.7 min
  9. 9Indexing Trade-offsAudioWhat every index costs in write speed and storage, when not to add one, and which engines use B-trees, LSM trees or other structures.6 min