AeroDB is a lightweight, portable relational database engine designed for efficiency and simplicity. It utilizes a B-tree-based architecture to manage and organize data, ensuring fast and reliable access. All data— including tables, indexes, and metadata— is stored compactly within a single file, making AeroDB highly suitable for embedded applications, standalone deployments, and scenarios where minimal configuration and footprint are critical. Its streamlined design supports easy integration while maintaining the core functionalities expected from a relational database management system.
Ensure that Rust and cargo are installed. Clone the repository and build the release binary:
git clone https://github.com/yourname/aerodb.git
cd aerodb
cargo build --releaseAlternatively, install the command-line tool directly with:
cargo install --path .AeroDB uses Cargo. To build the project run:
cargo buildAfter building, launch the CLI with:
cargo runA prompt will appear where you can enter simple SQL commands (CREATE TABLE, INSERT, SELECT, DELETE) or type .exit to quit.
A simple session might look like:
CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO users VALUES (1, 'Alice'), (2, 'Bob');
SELECT * FROM users;Rows can be inserted individually or in bulk:
INSERT INTO tbl [(col,...)] VALUES (v1,...), (v2,...);The resulting output will list all inserted rows. See the tests/ directory for additional query examples.
AeroDB now enforces standard SQL grouping rules: every selected column must be aggregated or listed in GROUP BY.
The engine supports basic DDL operations:
CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT);
CREATE INDEX idx_name ON users(name);
DROP INDEX idx_name;
DROP TABLE users;DROP INDEX removes the specified index from the catalog so new queries fall back to full table scans when appropriate.
By default every statement is executed in its own transaction unless you wrap multiple statements in an explicit BEGIN ... COMMIT block.
src/– Rust source code for the database engine.tests/– Integration tests showcasing various SQL features.images/– Project images and logos used in documentation.Cargo.toml– Project configuration and dependencies.
Development follows a Test-Driven Development (TDD) workflow:
- Write failing tests for new features or bug fixes.
- Implement the minimal code to make those tests pass.
- Run the full test suite to ensure all tests succeed.
- Refactor for readability and maintainability while keeping tests green.
- Add additional tests for uncovered edge cases.
Pull requests are welcome! Please open an issue to discuss major changes beforehand. When contributing, ensure all tests pass and follow the existing code style.
These tasks outline upcoming work and reference articles we plan to publish.
- Expand SQL parser to support JOINs, nested queries and basic functions.
- Flesh out transactions with ACID semantics and accompanying tests.
- Document storage engine internals and page layout in a dedicated article.
- Add secondary indexes to accelerate lookups on non-primary keys.
- Implement concurrency control (locking or MVCC) with tests.
- Write tutorial articles detailing the B-Tree implementation and SQL parsing strategy.
This project is released under the MIT License.
