RookDB
Introduction
- RookDB is an open-source database storage engine written in Rust and designed to explore the internal architecture of Relational database management systems.
- The project focuses on building a Disk-oriented database management system (DBMS) that stores and manages data efficiently on persistent storage while supporting query processing.
- The current development of RookDB primarily focuses on the Storage Engine - RookDB, which handles data organization, storage structures, Catalog Manager, Buffer Manager, Table layout, Page Layout and Tuple Layout. For a high-level understanding of the system workflow and components, refer to the architecture figure below.
Project Architecture
The RookDB project is currently organized into three main repositories:
- rookdb-cli
- rook-parser
- RookDB (Storage Engine)
rookdb-cli
The command-line interface used to interact with the database.
It accepts SQL queries from the user, forwards them to the parser, and displays the output to the user.
- Repository: https://github.com/RookDB/rookdb-cli
- Documentation: Command Line Interface Docs
rook-parser
The SQL parser is responsible for performing lexical and syntactic analysis of SQL queries. It converts SQL queries into an Abstract Syntax Tree (AST), which is then translated into the required input parameters for the Storage Engine and passed to it for execution.
- Repository: https://github.com/RookDB/rook-parser
- Documentation: Rook Parser Docs
- Crate: rook-parser
RookDB
The RookDB Storage Engine is the core component of the system responsible for executing parsed instructions and performing database operations. It processes the structured input generated by the SQL parser and carries out CRUD operations (Create, Read, Update, Delete) on the underlying data stored on disk.
- Repository: https://github.com/RookDB/RookDB
- Documentation: RookDB Docs
- Crate: storage-manager
Query Flow
- User enters an SQL query in rookdb-cli
- The query is sent to rook-parser
- The parser performs lexical and syntactic analysis
- Parsed instructions are sent to RookDB
- The storage engine executes the operation
- Results are returned to the CLI