DoraDB is an attempt to build a modern and fast storage engine in Rust from scratch. It is work in progress.
The original goal is to build a complete relational database, compatible with MySQL.
After coding about 70k lines of Rust, I have to admit it's really too ambitious to achieve as a single-person project.
Current goal is to build a modern and fast storage engine, which is probably achievable. I also want it to be useful (not just a toy) after major features are done.
The storage engine is designed as a hybrid engine with both in-memory row store and on-disk column store, and have full transactional support across all data.
- Storage Architecture
- Transaction System
- Index Design
- Block Index
- Secondary Index
- Checkpoint and Recovery
- Data Checkpoint
- Deletion Checkpoint
- Table File
- Buffer Pool
- Garbage Collect
Above documents describe the core design of this engine. Most parts are update-to-date. Some ideas are different from traditional database system. I'm glad to have discussions if someone is interested in details.
- buffer: Buffer pool implementation with async direct IO.
- catalog: Catalog of storage engine.
- compression: Compression algorithms for column store.
- file: Storage of table data, index and delete bitmap. The file is page based and organized as CoW B+Tree, to enable simple recovery and fast access.
- index: Block index and B+Tree index.
- io: Async direct IO system with compile-time-selected
libaioandio_uringbackends, by defaultio_uring. - latch: Async latch primitives including Mutex, RWLock and HybridLatch(enhanced RWLock with optimistic mode).
- lwc: LightWeight Columnar format for on-disk warm data.
- row: In-memory row store and operations.
- stmt: Statements.
- table: Table of data, composite of block index, secondary index, buffer pool and table file. Support operations like index lookup, index scan, table scan, insert, delete, update, etc.
- trx: Transaction system, including transaction lifecycle, redo log, undo log, recovery, garbage collect, etc.
Current development is heavily driven by document starting from Jan 2026, and implemneted by code agent.
Every task assigned to agent has one associated task document located in docs/tasks.
Larger features/refactors require RFC document inside docs/rfcs.
Deferred tasks are put in docs/backlogs.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.