Learn how relational database internals work by building one yourself in C.
Understand how data is stored on disk in a B-tree structure by implementing it step by step.
Study how a query parser and executor work at the lowest level.
Build foundational systems programming knowledge through a concrete, guided project in C.
Requires a C compiler, the repo has minimal instructions, the tutorial website is where the actual content lives.
This repository is a tutorial project that walks through building a simple database from scratch using the C programming language, modeled after SQLite. SQLite is one of the most widely used databases in the world: it stores data in a single local file rather than requiring a separate server process to be running. The goal of this project is educational, not practical. It does not produce a database you would use in production. It shows, step by step, how a database engine works by building a simplified one. C is a low-level programming language where you manage memory and file operations directly, without many of the conveniences higher-level languages provide. Building a database in C means grappling with the fundamentals: how records are stored on disk, how a file is structured so data can be read back efficiently, and how a simple query gets parsed and executed. Working through those problems is the point. The README in this repository is minimal by design. It points to a separate tutorial website where the actual instructional content lives, with detailed writing and code walkthroughs accompanying each step. The code in the repository is the companion implementation for those tutorial pages. If you are interested in understanding how databases work internally, this is the kind of project that makes the underlying mechanics concrete by making you build them yourself.
← cstack on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.