• Stars
    star
    1,077
  • Rank 42,945 (Top 0.9 %)
  • Language
    Rust
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SQLRite - Simple embedded database modeled off SQLite in Rust

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

key value
Design and discussions about direction
of the project going on over here.
Show us your support by buying us a coffee,
so we can keep building cool stuff. (coming soon)
Documentation (coming soon)
Come and Chat about databases with us sqlritedb discord server

Read the series of posts about it:

What would SQLite look like if written in Rust?

The SQLite Architecture

CREATE TABLE and INSERT Statements

asciicast

Requirements

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

Usage (TBD)

> ./rust_sqlite -- help
SQLRite 0.1.0
Joao Henrique Machado Silva <[email protected]>
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 Parsing
  • Improve error handling with https://github.com/dtolnay/thiserror
  • Added support for parsing duplicate columns on CREATE TABLE
  • Added support for parsing multiple PRIMARY KEY on CREATE TABLE
  • In memory BTreeMap indexes initially only for PRIMARY KEYS.
  • Simple INSERT queries command parsing.
  • Implementation UNIQUE key constraints.
  • Improve Error Handling and return without Panic!
  • Simple SELECT queries (Single WHERE clause and no JOINS).
  • Serialization | Deserialization to and from binary encodings (bincode).

Roadmap

Features that are in the roadmap of the project:

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

  • Implement Open command to load database with a command .open
  • 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.
  • WAL - Write Ahead Log Implementation
  • Pager Module
    • Implementing transactional ACID properties
    • Concurrency
    • Lock Manager
  • Composite 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 [email protected].

Inspiration

More Repositories

1

nodebased-job-queueing-system

A Node-Based, thread-safe and synchronous Job Queueing System for Godot
GDScript
12
star
2

fsm-godot

Node Based Finite State Machine for Godot
GDScript
9
star
3

solana_nft_snapshot

Takes a snapshot of Solana NFT holders based on the mint token ids
JavaScript
9
star
4

screen_console

Screen Console is a logging tool made for Godot 4 that allows you to print messages to the screen for debugging and development purposes.
GDScript
9
star
5

python_rust_data_science_bench

Testing the performance of Rust and Python on a simple data science task.
Python
4
star
6

marvin

Simple daemon built with Rust to track metrics.
Rust
3
star
7

marvin-blockchain-rust

Marvin-Blockchain-Rust: A Rust-based blockchain implementation, part of the Marvin blockchain project.
Rust
3
star
8

restgrpcserverbenchmark

Project comparing REST HTTP/1.1 and HTTP/2 and gRPC with Go Language
Go
3
star
9

space_invaders

Space Invaders based game developed with Rust and Bevy Engine
Rust
2
star
10

NurtEngine

My own game engine developed from scratch
C++
2
star
11

rust-prettylog

Pretty log messages for your CLI.
Rust
2
star
12

tomlparser

Basic TOML Parser in Go Language
Go
2
star
13

supersimpleloadbalancer

Super Simple Load Balancer written in Go Language
Go
2
star
14

vault

Example of how to initialize Vault and connect to ETCD with Go Language
Go
2
star
15

Tagview-Pedidos

Sistema simples de controle de pedidos para teste e avaliação de código-fonte
Ruby
1
star
16

Kill-Your-Buddy

Primeiro jogo da Nurt Games
Objective-C
1
star
17

googlefakesearch

Google Fake Search example of concurrency and channels from the Go Concurrency Pattenrs talks from Rob Pyke at Google I/O
Go
1
star
18

os_rust

My own Operating System written in Rust
Rust
1
star
19

first_app

The first app for the Ruby on Rails Tutorial
Ruby
1
star
20

myCWebServer

Simple HTTP Server written in C language.
C
1
star
21

opensea-creatures

Opensea Smart Contract Template
JavaScript
1
star
22

marvin-blockchain-go

Marvin-Blockchain-Go: A Go-based blockchain implementation, part of the Marvin blockchain project.
Go
1
star
23

hackerrankwithgo

Some solutions in Go Language for some HackerRank Problems.
Go
1
star