My learning journey in databases
- [
- databases ]
I discovered databases by accident about a year ago.
We had a school project: build a very basic web app and store some data. We used SQLite for simplicity. After wiring everything up and running my first query, I thought: this seems too easy for something that must be so complex under the hood.
So I googled what actually happens when you write something like this:
INSERT INTO table1 (column1) VALUES ('value1');That’s when I discovered a whole world of internals and complexity I had no idea existed.
I wanted to understand more, so I dug in. I started by rewriting SQLite from scratch in C. Later, I started contributing to open source projects like TursoDB.
I’ve been learning and practicing for a while now, and I don’t plan on stopping anytime soon. Here are the resources I used along the way. I hope they help other curious minds too.
Course
I follow Andy Pavlo’s course. Mikaël Francoeur recommended it to me. It’s a great course, with simple explanations, exercises, and 5 projects.
If you prefer watching, here’s another database course video.
Books and papers
Database internals
- Database Internals by Alex Petrov
- How Query Engines Work by Andy Grove
- Readings in Database Systems
PostgreSQL
Projects
Storage engines
- LSM-Tree storage engine, based on RocksDB
- A B-Tree series implementing an ABI-compatible BerkeleyDB clone
Full databases
Transactions
- MVCC reimplementation
- Distributed transactional key-value database
PostgreSQL