When it comes to choosing, using, and maintaining a database, understanding its internals is essential. But with so many distributed databases and tools available today, it's often difficult to understand what each one offers and how they differ. With this practical guide, Alex Petrov guides developers through the concepts behind modern database and storage engine internals. Throughout the book, you'll explore relevant material gleaned from numerous books, papers, blog posts, and the source code of several open source databases. These resources are listed at the end of parts one and two. You'll discover that the most significant distinctions among many modern databases reside in subsystems that determine how storage is organized and how data is distributed. This book examines: Storage engines: Explore storage classification and taxonomy, and dive into B-Tree-based and immutable Log Structured storage engines, with differences and use-cases for each Storage building blocks: Learn how database files are organized to build efficient storage, using auxiliary data structures such as Page Cache, Buffer Pool and Write-Ahead Log Distributed systems: Learn step-by-step how nodes and processes connect and build complex communication patterns Database clusters: Which consistency models are commonly used by modern databases and how distributed storage systems achieve consistency
If you want a comprehensive resource, I'd recommend reading either Designing Data Intensive Applications (Kleppman) or Database Internals (Petrov). Both have chapters on B-trees and LSMs.
Programming languate data structure level detail : "Database Internals, A Deep Dive into How Distributed Data Systems Work" by Alex Petrov
The only solution for me was to learn some database internals (I read the wonderful book written by Alex Petrov), and the problems seemed so interesting, I could not fight the urge and went ahead with trying to write my own db.
Anyway, ~9 months have passed and I feel like I'm "done", I have learned a ton, and really proud of dbeel.
Now I can pick a database and way more easily understand what are its most defining traits.
Some short time in the future, I will release a blog post or something, where I will write about the fundamental problems you need to solve when writing a performant data system like a database, so stay tuned :)