Skip to content

nmbr7/naadanDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

naadanDB

- Oru naadan Database -

This project is intended for learning and experimenting with DB internals and shouldn't be considered for production use.


Project Goals

  1. Learn and experiment with various database design techniques.
  2. Implement a database that efficiently handles hybrid (OLTP & OLAP) workloads.
  3. Create documentation about different techniques.

Build

Run cargo build to build the project.

Running the UTs

Run cargo test -- --nocapture to run the UTs with console output.

  • Tests for the individual components will be available in the respective modules
  • Integration tests are available in the /tests folder

Utilities

Design

Query Flow

image

Most core components are written from scratch except for the parser, for which we use the sqlparser crate.

Components

  • Server Layer
    • Tokio async handler
  • Query Layer
    • Parser
    • Logical Planner
    • Physical Planner
    • Executor
  • Transaction Layer
    • MVCC with in-memory version chaining
    • Support Serializable Isolation level
  • Storage Layer
    • Row store format
    • B-tree index
    • Custom binary Page structure

Benchmark

  • TODO

Features TODO

SQL level

  • Join
  • Predicates
  • Group by, Order by, Limit
  • Stored procedures
  • Cursors
  • Triggers
  • Partitioning
  • Replication

DB Design level

  • DB Configurability support
  • Target Webassembly runtime
  • Proper recovery support
  • Lock-free data structures
  • Optimistic latching
  • Stream processing
  • Column store
  • JIT query execution
  • Distributed operation