SQLite Clone (dbx) is an embedded relational database written in standard C++20 without third-party dependencies.
Across roughly 10,000 lines of C++ covering the engine, interactive REPL (build/dbx), tests, and benchmarks, a query passes through each layer directly:
SQL text -> lexer -> parser -> AST -> planner -> executor -> B-Tree -> pager -> fixed-size disk pages
It supports CREATE TABLE, CREATE INDEX, INSERT, SELECT with WHERE, ORDER BY, LIMIT, EXPLAIN, secondary index scans, both disk-backed files and :memory: databases, basic transactions, and shell commands for inspecting internal page layouts (.btree, .pages, .validate).
Read Writing an embedded SQL database in C++20 or browse the source on GitHub.