This project is my attempt to build a SQL database from scratch, following the excellent Build Your Own Database tutorial.
My goal is to deepen my understanding of how databases work under the hood, from parsing and query execution to storage and indexing.
- Project setup
- Implement atomic file persistence
- Understand B-Tree principles
- Implement B+Tree Node and Serialization Format
- Implement B+Tree Splits, Balancing & Deletion (in progress)
- Key-Value Store
- Free List Management
- Tables & Schemas
- Range Queries
- Secondary Indexes
- Transactions (Atomicity)
- Concurrency Control
- SQL Parser
- Query Execution
- Understand the low-level data structures.
- Implement a SQL-like query language.
- Explore how transactions, concurrency, and durability are handled.
- Gain deeper intuition for how production databases like SQLite, Postgres, and MySQL are built.
Currently, this project is not ready for general use. If you’d like to follow along, you can explore the source code directly in this repository.
This project is primarily for educational purposes, but feedback, ideas, and discussions are welcome! Feel free to open an issue if you’d like to share thoughts or resources.
- Build Your Own Database tutorial — the main guide I’m following.