xiongxin / rust_sqlite

SQLite clone from scratch in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust-SQLite (SQLRite)

Build Status dependency status Coverage Status Maintenance MIT licensed

Rust-SQLite, aka SQLRite , is a simple embedded database modeled off SQLite, but developed with Rust. The goal is get a better understanding of database internals by building one.

What I cannot create, I do not understand. — Richard Feynman

Read the series of posts about it:

What would SQLite look like if written in Rust?

The SQLite Architecture

Requirements

Before you begin, ensure you have met the following requirements:

Usage (TBD)

> ./rust_sqlite -- help
Rust-SQLite 0.1.0
Joao Henrique Machado Silva <joaoh82@gmail.com>
Light version of SQLite developed with Rust

USAGE:
    rust_sqlite

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

Project Progress

Not checked means I am currently working on.

  • CLI and REPL Interface
  • Parse meta commands and sql commands.
  • Execute simple commands
  • Standarized error handling
  • Generic validation structure for SQL Commands.
  • Create Table Command
  • Improve error handling with https://github.com/dtolnay/thiserror

Roadmap

Features that are in the roadmap of the project:

Ideally in order of priority, but nothing set in stone.

  • Serialization | Deserialization to and from binary encodings.
  • Simple INSERT queries.
  • In memory BTreeMap indexes initially only for PRIMARY KEYS.
  • Simple SELECT queries (Single WHERE clause and no JOINS).
  • Storage engine.
  • Implement Open command to load database with a command .open
  • UNIQUE key constraints.
  • Joins
    • INNER JOIN (or sometimes called simple join)
    • LEFT OUTER JOIN (or sometimes called LEFT JOIN)
    • CROSS JOIN
    • The RIGHT OUTER JOIN and FULL OUTER JOIN are not supported in SQLite.
  • Pager Module
    • Implementing transactional ACID properties
    • Concurrency
    • Lock Manager
  • Indexing - cost and performance gain analysis
  • Benchmarking vs SQLite for comparison
  • Server Client / Connection Manager
  • Different implementations of storage engines and data structures to optimize for different scenarios
    • Write Heavy - LSM Tree && SSTable
    • Read Heavy - B-Tree

Contributing

Pull requests are warmly welcome!!!

For major changes, please open an issue first and let's talk about it. We are all ears!

If you'd like to contribute, please fork the repository and make changes as you'd like and shoot a Pull Request our way!

Please make sure to update tests as appropriate.

If you feel like you need it go check the GitHub documentation on creating a pull request.

Code of Conduct

Contribution to the project is organized under the terms of the Contributor Covenant, the maintainer of SQLRite, @joaoh82, promises to intervene to uphold that code of conduct.

Contact

If you want to contact me you can reach me at joaoh82@gmail.com.

Inspiration

About

SQLite clone from scratch in Rust

License:MIT License


Languages

Language:Rust 100.0%