Databases are not black boxes. Understand them by coding your own from scratch!
A walk-through of a minimal persistent database implementation. The implementation is incremental. We start with a B-Tree, then add a new concept with each chapter, and eventually go from a simple KV to a mini relational DB.
Covers three important topics:
1. Persistence. How not to lose or corrupt your data. Recovering from a crash.
2. Indexing. Efficiently querying and manipulating your data. (B-tree).
3. Concurrency. How to handle multiple (large number of) clients. And transactions.
More "build your own X" books can be found on the official website: https://build-your-own.org