Database Storage & Query Engines
Technical essays and low-level architectural breakdowns exploring mechanical execution, system trade-offs, and engine internals.
Mastering Database Internals from First Principles: Series Introduction & Learning Roadmap
Discover what you will learn in this 20-part series on Database Internals. Build a transactional storage engine and master B+ Trees and MVCC.
Why Files Fail as Databases: Concurrent Access, Update Anomalies & Crash Recovery
Discover why storing application data inside flat CSV or JSON files leads to race conditions, lost updates, corrupted data on crash, and performance failure.
Pages, Blocks, and Heap Files: How Database Storage Engines Layout Data on Disk
Explore how database engines organize table data on disk using 16KB Slotted Pages, slot offset arrays, tuple headers, and Record IDs.
The B+ Tree Deep Dive: Why Database Indexes Use Balanced Trees Instead of Hash Maps
Discover why database storage engines use B+ Trees for primary and secondary indexes. Learn how high fan-out page nodes enable range scans in 3 disk IOs.
Demystifying ACID: Transactions as an Isolation & Recovery Abstraction
Deconstruct ACID transaction guarantees in database engines. Learn how atomicity, consistency, isolation, and durability function under the hood.
Write-Ahead Logging (WAL) & ARIES Crash Recovery: How Databases Guarantee Durability
Learn how Write-Ahead Logging (WAL) and the ARIES algorithm guarantee zero data loss during power outages and system crashes.
The InnoDB Buffer Pool: Dirty Pages, LRU Eviction, and LSN Checkpointing
Learn how MySQL InnoDB Buffer Pool caches 16KB data pages, evicts cold pages via midpoint LRU algorithms, and flushes dirty pages asynchronously.
Database Concurrency Anomalies: Dirty Reads, Non-Repeatable Reads, Phantoms & Lost Updates
Explore database concurrency anomalies including dirty reads, non-repeatable reads, phantom reads, and lost updates, with interleaved transaction timelines.