NebulaDB is a high-performance, in-memory database engine written in modern C++. It supports a modular SQL-like query system, B+ Tree indexing, transaction management, concurrency control, and both command-line and REST API interfaces.
- SQL-like shell interface (
CREATE TABLE,INSERT INTO,SELECT) - In-memory row and table storage
- B+ Tree index structure
- ACID-style transaction scaffolding with lock manager
- Basic concurrency with thread pool support
- REST API server (optional via Crow)
- Modular file structure and clean header separation
- Unit tests and benchmarking support
src/ - All C++ source files (core, engine, storage, parser, api)
include/ - All header files for each subsystem
test/ - Unit tests for core components
scripts/ - SQL seed scripts and benchmarking tools
docs/ - Developer notes and roadmap
CMakeLists.txt - Build configuration (CMake)
Makefile - Optional alternative build script
README.md - Project overview and instructions
- C++17-compatible compiler (GCC or Clang)
- CMake (or GNU Make)
- Crow C++ library (if building REST API)
To build and run the command-line shell:
cmake .
make
./nebuladbAlternatively:
make
./nebuladbTo build and run the unit tests:
make testCREATE TABLE users id name
INSERT INTO users 1 Alice
INSERT INTO users 2 Bob
SELECT users
To run the REST server:
- Link against Crow in your CMakeLists or Makefile
- In
main.cpp, run:
RESTServer::start(db, 8080);- Send POST requests with raw SQL to
http://localhost:8080/query
- Core table/field architecture ✔
- B+ Tree indexing ✔
- SQL parser and shell ✔
- REST API interface ✔
- Transaction manager and lock control ✔
- WHERE clause support
- Joins and aggregation
- Persistent file-backed storage
- Query planner/optimizer engine
This project is licensed under the MIT License.