Martin Joo draws on 13 years of application development to make the case that databases outlast every framework built on top of them — and that most developers still know surprisingly little about how they actually work. This book is a step-by-step answer to that gap: building a database engine yourself, from the ground up.
What you'll build
- Data storage, moving from a naive CSV approach to an efficient binary TLV format
- Write-ahead logging (WAL) for resilience against crashes
- 4KB data pages backed by an LRU buffer for efficient access
- B-tree and hash indexes for fast lookups
- A buffer pool caching pages with a linked-list-and-hash-table LRU cache
It's pitched as a way past the intimidation factor of systems programming, useful both for understanding databases at a fundamental level and for standing out in higher-level technical interviews.
The author shares insights accumulated over 13 years of application development and concludes that databases outlast any technological stack, yet most developers know very little about them. The goal of the book is to change this by offering a step-by-step guide to building your own database engine.
What You Will Learn
- Data Storage: from the naive approach with CSV to the efficient binary format TLV.
- Write-Ahead Logging (WAL): implementing failure resilience.
- Data Pages: using 4KB pages with an LRU-based buffer to enhance efficiency.
- Indexes: constructing B-trees and hash indexes for fast search.
- Buffer Pools: caching data pages using an LRU cache supported by a linked list and hash table.
Why You Should Read It
- Overcoming the fear of systems programming.
- Understanding the fundamental principles of how databases work.
- Developing skills that will set you apart from other developers.
- Preparing for higher-level technical interviews.