Database InternalsAlex Petrov
Database Internals
by Alex Petrov · first published 2019
54mentions
31recommended by
46HN commenters
2019–2026first – last mentioned
67% recommend33% neutral
Why HN recommends it
Approachable deep dive into how databases work: storage engines (B-trees, LSM trees) and distributed systems, from an engineer's view. Pairs well with Designing Data-Intensive Applications for practitioners.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







Good list, but is it still being actively updated? Not having Kleppmann’s seminal Designing Data-Intensive Applications (2017) on it would indicate no. Alex Petrov’s Database Internals: A Deep Dive Into How Distributed Data Systems Work (2019) is another essential recent reference that should be here. Not as broad as Kleppmann but dives a lot deeper into certain topics.
on “Distributed Systems Reading List” ↗…http://brooker.co.za/blog/2014/09/21/liskov-pub.html http://brooker.co.za/blog/2014/05/10/lynch-pub.html Finally, books. There are a couple recommendations for Martin Kleppman's Designing Data-Intensive Applications book, which I like a whole lot. Alex Petrov's "Database Internals" is also a very approachable introduction. I wish every practitioner in the field would read Harchol-Balter's Performance Modeling and Design of Computer Systems.
on “Ask HN: Recommended books and papers on distributed systems?” ↗…some linear algebra and leave it there. When you encounter a relevant field; AI or games, you should be in a position to pick up more math if required. - Databases: Recently a book has been published on database internals, which is strongly recommended. Work through this book. - Languages and Compilers: Learn a lisp, write a lisp interpreter (should introduce you to some FP concepts) and then working through Concepts,…
on “Ask HN: How do I choose the right resource to learn CS fundamentals?” ↗…best discussion of transaction isolation that I've read anywhere. Another recent book that's good for databases (and that might replace or complement the "Architecture of a Database System" paper) is _Database Internals_ by Alex Petrov (O'Reilly, 2019). Like Kleppmann it also covers distributed systems; indeed it's getting harder and harder to separate the two areas these days.
on “Ask HN: How Sound Is the “Teach Yourself CS” Learning Resource?” ↗Sure, I mostly went through this playlist https://www.youtube.com/playlist?list=PLSE8ODhjZXjbohkNBWQs_... (I haven't seen all the videos yet). Also some parts of this book https://www.amazon.com/Database-Internals-Deep-Distributed-S... were very useful when working on the file structure. I also just recently saw this project https://cstack.github.io/db_tutorial/ which builds a database in C. I have not gone through…
on “Ask HN: What is your current side-project?” ↗I have three things for you 1. Designing data intenstive applications 2. Database internals https://www.amazon.com/Database-Internals-deep-dive-distribu... 3. Andy Pavlo's database course videos at cmu and guest lecture series https://www.youtube.com/channel/UCHnBsf2rH-K7pn09rb3qvkA
on “Ask HN: Resources for Learning about Databases” ↗Database Internals: A Deep Dive into How Distributed Data Systems Work by Alex Petrov
on “Foundations of Databases (1995)” ↗…learn a lot while working on it, and hopefully will get to learn a lot more as things come up. Some of the resources which were very helpful were the CMU database course on youtube and the book called "database internals" by Alex Petrov (I just read parts of it as required). Also the book Writing an interpreter in Go by Thorsten Ball was very useful when writing the sql parser.
on “Ask HN: Share your side project” ↗…chunk of DB technology but not storage. Definitely check out their repository at https://github.com/andygrove/how-query-engines-work/tree/mai... . A companion to DDIA would be https://www.amazon.com/Database-Internals-Deep-Distributed-S... (especially its treatment of LSM trees which is harder to come by).
on “Databases, Types, and the Relational Model: The Third Manifesto [pdf]” ↗Database Internals - Alex Petrov How Linux Works - Brian Ward High Performance Browser Networking - Ilya Grigorik
on “Ask HN: What are some other books as fundamental as DDIA?” ↗Database Internals by Alex Petrov If you are into videos: https://www.youtube.com/playlist?list=PLSE8ODhjZXjbohkNBWQs_...
on “Crafting Interpreters: A Review” ↗Not a professional database developer but study it in my spare time Books that stand out to me are: - Database Internals, Alex Petrov - Database Design & Implementation, Edward Sciore - How Query Engines Work, Andy Grove These have been much more useful than IE the Cow book or "DB Systems The Complete Book" to me.
on “Ask HN: Which books do you consider real gems in your field of work/study?” ↗…well as the query processing and optimization is a huge field unto itself. I would love to have some deep dive resources on this - prefer books if possible. My bible on the distributed storage side is Database Internals by Petrov. I would love to find something of equal quality on the read/query side. Architecture & design docs for specific databases are also great, if they go into enough depth on these specifics
on “Ask HN: Resources to Learn About Query Languages and Querying Distributed DBs?” ↗…at different databases to try to understand their different traits, and was bombarded with marketing instead of actual info on the advantages and drawbacks. 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…
on “I want to share dbeel: A distributed thread-per-core db” ↗…at different databases to try to understand their different traits, and was bombarded with marketing instead of actual info on the advantages and drawbacks. 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…
on “Show HN: Dbeel – A distributed thread-per-core db” ↗