01. Why Database?
Databases are a fascinating topic. They are a foundation of modern computing. Learning how they work should be an important part of software engineering education.
As many of today’s (2023+) coders do not have a formal CS/SE education, basic things such as databases, compilers, operating systems, etc. are often seen as magical black boxes. That’s why I started the “Build Your Own X” book series. To learn and teach the basics in a “from scratch” approach, through succinct & condensed books.
There are some important topics that we can learn from database systems:
- Persistence. How not to lose or corrupt your data. Recovering from a crash.
- Indexing. Efficiently querying and manipulating your data. (B-tree).
- Concurrency. How to handle multiple (large number of) clients. And transactions.
02. The Book
As with my other books, this book follows the step-by-step approach while covering the 3 topics above. We start from a B-tree, then to a KV store, finally to a mini database with a SQL-like query language.
The book is divided into 2 parts. Part I implements a KV store. Part II implements a mini database and a query language based on the KV store from Part I.
Part I is self-contained and can be used as a standalone book for persistent KV stores, it is also freely available online.
The whole book is available as paperback or ebook.