![[Database_Internals_comp.jpg]] [Database Internals](https://www.databass.dev/) is a dive into implementing certain parts of a database and distributed systems. I read it as part of Phil's [Winter Email book club](https://eatonphil.com/2023-database-internals.html). It is broken into two parts, the first part is focused on the different types of on-disk data structures used to store data. It covers the different b-tree variants and [[Log Structured Merge Tree]]. It touches on transactions and isolation levels. The second part looks at different aspects of distributed systems. If you have never understood what it takes to build a distributed system, this section dives into how to think about all the different parts. From error handling, and leader election to what is consistency and the implications for the different consistency types. I particularly enjoyed _Chapter 12: Anti-Entropy and Dissemination_, I have heard of things like the gossip protocol but I've never understood it properly. Chapter 12 cleared up my understanding of how it works. I've found it a good read and a nice compliment to [[Why I own two copies of Designing Data-Intensive Applications|Designing Data-Intensive Applications]]. The first section's dive into data structures is quite intense and I realised that to really understand the different designs and implications, I would have to implement each algorithm. I do wish it had covered more parts of a database for example indexes, query engine and concurrency control. However, I understand that would have made the book really massive. The second section on distributed systems was my favourite. Each chapter built on the previous section and helped to round out my understanding of different aspects of a distributed system. Overall I've enjoyed this book and being part of an email book club was a lot of fun. I wasn't the best contributor to the group, but I definitely enjoyed being held to account to finish a chapter each week and the discussions on the email threads added some good extra knowledge for each chapter.