TinyDB is a simple file-based RDBMS in C++, inspired by SQLite and PostgreSQL. It uses a single file to store data and supports basic SQL commands.
mkdir build && cd build
cmake ..
make
./bin/tinydbcd build
cmake ..
make
ctest- Project Setup: Configure CMake, Git, and Google Test.
- Disk Manager: Handles low-level, page-based file I/O.
- Page & Buffer Pool Manager: Manages caching of disk pages in memory.
- System Catalog: Manages metadata about tables and schemas.
- Table Heap & Record Manager: Implements storage for unordered rows on pages.
- SQL Parser: Translates SQL strings into an Abstract Syntax Tree (AST).
- Execution Engine: Executes queries using a sequential scan plan.
- B+ Tree Index: A generic B+ Tree implementation for indexing.
- Index Manager: Integrates B+ Trees as secondary indexes.
- Query Optimizer: A basic optimizer to choose between table scans and index scans.
- Advanced Executors: Support for
UPDATE,DELETE, andWHEREclauses.
- Transaction Manager: Manages ACID properties for transactions.
- Lock Manager: Provides concurrency control using locking.
- Log Manager: Implements Write-Ahead Logging (WAL) for recovery.