A relational database project built on the RMDB framework. It includes SQL parsing, query optimization, execution, storage management, transaction concurrency control, and recovery.
- Linux/macOS
- CMake >= 3.16
- GCC/Clang (C++17 for server, C++20 for client)
readlinepthread
For Linux(e.g. Ubuntu) users, you can install dependencies with:
sudo apt-get install build-essential # build-essential packages, including gcc, g++, make and so on
sudo apt-get install cmake # cmake package
sudo apt-get install flex bison # flex & bison packages
sudo apt-get install libreadline-dev # readline packageFor macOS users, you can install dependencies with Homebrew:
brew install llvm # llvm package, including clang and clang++
brew install cmake # cmake package
brew install flex bison # flex & bison packages
brew install readline # readline packagesrc/: core database server source code (buildsrmdb)rmdb_client/: interactive client source code (buildsrmdb_client)test/: SQL test scripts and automation scriptsdocs/: design documents and competition-related materialsdeps/: third-party dependencies (including googletest)
mkdir build
cd build
cmake .. [-DCMAKE_BUILD_TYPE=Debug]|[-DCMAKE_BUILD_TYPE=Release] # [] indicates optional, Debug mode includes debug symbols and assertions, while Release mode is optimized for performance
make rmdb <-j4>|<-j8>Server binary: build/bin/rmdb
cd rmdb_client
mkdir build
cd build
cmake .. [-DCMAKE_BUILD_TYPE=Debug]|[-DCMAKE_BUILD_TYPE=Release]
make rmdb_client <-j4>|<-j8>Client binary: rmdb_client/build/rmdb_client
./build/bin/rmdb <database_name>Example:
./build/bin/rmdb test_dbThe server listens on 127.0.0.1:8765 by default.
./rmdb_client/build/rmdb_clientOptional arguments:
-h <host>: server host (default:127.0.0.1)-p <port>: server port (default:8765)-s <unix_socket_path>: connect via Unix Domain Socket
- SQL scripts:
test/*.sql - Automated execution script:
test/test_db.py - Crash recovery test script:
test/auto_crash_test.sh - Unit test binary (after build):
build/bin/unit_test
- Project Overview
- RMDB User Guide
- RMDB Environment Setup Guide
- RMDB Project Structure
- Architecture Diagram
This project is licensed under Mulan PSL v2.
See License for details.
