Inside a Database A Code Level Walkthrough of an RDBMS I Built in Python
summary
A tiny RDBMS called KIDB is reimplemented in pure Python standard library and actually runs: SELECT returns ID 258 and name Alice, INSERT adds ID 259 Bob, DELETE marks the slot empty rather than erasing data. The stack is full‑code: regex lexer, hand‑written parser producing an AST, simple planner/executor pipeline, buffer manager + file manager using 400‑byte block and 22‑byte slot layouts, little‑endian storage, and a write‑ahead log for recovery; source is on GitHub.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:12Why build in Python
- 2:39KIDB architecture overview
- 4:32Lexer tokenizing SQL
- 7:29Syntax analysis and AST
- 9:02Parsing SELECT statements
- 13:23Query planning and execution
- 15:41Storage layer components
- 18:02SELECT data retrieval
- 20:39Insert update delete operations
- 24:00Binary file structure
- 26:44SQL processing summary
- 27:49Closing remarks
related talks
24mBuild-a-Database with Python
01h 24mBuilding the composable Python data stack with Kedro & Ibis
59mIntroduction to Python Database Programming
39mLet's Build an ORM
43mPL/Python -- Python inside the PostgreSQL RDBMS
53mSqlkit: empowering database access
31mExtending SQL Databases with Python
34mLet's talk Databases in Python: SQLAlchemy and Alembic
