All Projects → stellarsql → StellarSQL

stellarsql / StellarSQL

Licence: MIT license
🚧 (Archived) StellarSQL: a minimal SQL DBMS written in Rust

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to StellarSQL

facilejdbc
FacileJDBC - Fast, simple and lightweight JDBC wrapper
Stars: ✭ 34 (-56.41%)
Mutual labels:  dbms, db
Crate
CrateDB is a distributed SQL database that makes it simple to store and analyze massive amounts of data in real-time.
Stars: ✭ 3,254 (+4071.79%)
Mutual labels:  dbms, db
SQL Injection Payload
SQL Injection Payload List
Stars: ✭ 62 (-20.51%)
Mutual labels:  dbms
Wyxdbms
用Java实现了一个关系型数据库,DBMS数据库管理系统,可使用常用增删改查的SQL语句,具有数据字典,数据索引文件,并且实现了启发式查询优化
Stars: ✭ 173 (+121.79%)
Mutual labels:  dbms
Noisepage
Self-Driving Database Management System from Carnegie Mellon University
Stars: ✭ 1,095 (+1303.85%)
Mutual labels:  dbms
Sql exporter
Database agnostic SQL exporter for Prometheus
Stars: ✭ 301 (+285.9%)
Mutual labels:  dbms
Online Shopping System Advanced
Demo site
Stars: ✭ 127 (+62.82%)
Mutual labels:  dbms
JU-Notes
This Repository contains notes of various technologies and languages that i have been learning
Stars: ✭ 17 (-78.21%)
Mutual labels:  dbms
Clickhouse
ClickHouse® is a free analytics DBMS for big data
Stars: ✭ 21,089 (+26937.18%)
Mutual labels:  dbms
Sqlancer
Detecting Logic Bugs in DBMS
Stars: ✭ 672 (+761.54%)
Mutual labels:  dbms
Ohmysql
Easy direct access to your database 🎯 http://oleghnidets.github.io/OHMySQL/
Stars: ✭ 166 (+112.82%)
Mutual labels:  dbms
Bustub
The BusTub Relational Database Management System (Educational)
Stars: ✭ 534 (+584.62%)
Mutual labels:  dbms
Big Companies Interview Questions
A curated list of previous asked Interview Question at Big Companies and Startups 🤲 🏆
Stars: ✭ 135 (+73.08%)
Mutual labels:  dbms
skytable
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS
Stars: ✭ 696 (+792.31%)
Mutual labels:  dbms
Cubrid
CUBRID is a comprehensive open source relational database management system highly optimized for Web Applications.
Stars: ✭ 184 (+135.9%)
Mutual labels:  dbms
Musical-World
DBMS Mini Project that basically designed for online music player
Stars: ✭ 59 (-24.36%)
Mutual labels:  dbms
Orientdb
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries. OrientDB Community Edition is Open Source using a liberal Apache 2 license.
Stars: ✭ 4,394 (+5533.33%)
Mutual labels:  dbms
Event Management
helps to register an users for on events conducted in college fests with simple logic with secured way
Stars: ✭ 65 (-16.67%)
Mutual labels:  dbms
sqllex
The most pythonic ORM (for SQLite and PostgreSQL). Seriously, try it out!
Stars: ✭ 80 (+2.56%)
Mutual labels:  db
College Erp
A college management system built using Django framework. It is designed for interactions between students and teachers. Features include attendance, marks and time table.
Stars: ✭ 187 (+139.74%)
Mutual labels:  dbms

StellarSQL

Build Status codecov

(WIP) A minimal SQL DBMS written in Rust

  • The document is here.
  • There is a slide introduce this project.
  • There is a series of articles introducing about this project: Let's build a DBMS

logo

Setup

Before you start, you need to have Rust(>=1.31) and Cargo.

curl https://sh.rustup.rs -sSf | sh

Then we could get the source code.

git clone https://github.com/tigercosmos/StellarSQL
cd StellarSQL

Run

Server

Open the first window and run server:

cargo run [port]

the default port is 23333, and you can either modify .env or run by argument [port].

Client

Open the another window and run the client by python client/client.py and connect to the server:

command:

> create user <name> <key> # key is our feature, put any number for now
> set user <name> # second time log in
> create database <db_name> # first time create database
> use <db_name> # second time adopt the database
> <query> # now support simple sql

SQL query are not implement very well. A few simple command support for now:

  • create database
  • create table
    • type: int, float, double, varchar, char, url
  • insert into
  • select {fields} from {table} where {predicate}
    • not yet support join, only a table
    • predicate without NULL

The default host and port are 127.0.0.1 and 23333

$ python client/client.py [host] [port]

Connect to 127.0.0.1:23333
== Welcome to StellarSQL Client! ==
StellarSQL> create user Tiger 123
Login OK!

StellarSQL> create database DB1
Query OK!

StellarSQL> create table t1 (a1 int, b1 int, c1 float);
Query OK!

StellarSQL> insert into t1 (a1, b1, c1) values (1, 2, 1.2), (2, 3, 4.5), (4, 1, 0.3);
Query OK!

StellarSQL> select a1, b1, c1 from t1 where a1 > 1;
{"fields":["a1","b1","c1"],"rows":[["2","3","4.5"],["4","1","0.3"]]}

StellarSQL> select a1, b1, c1 from t1 where a1 > 1 and c1 > 2;
{"fields":["a1","b1","c1"],"rows":[["2","3","4.5"]]}

StellarSQL> select a1, b1, c1 from t1 where not (not a1 < 2 and not (not b1 = 3 or c1 > 1.1));
{"fields":["a1","b1","c1"],"rows":[["1","2","1.2"],["2","3","4.5"],["4","1","0.3"]]}

Build

cargo build

Test

Run all tests

cargo test

Debug a test

Add the line at the beginning of the test function.

// init the logger for the test
env_logger::init();

Then run the command to see the debug information:

RUST_LOG=debug cargo test -- --nocapture {test_name}

Pull Request

Install rustfmt, and make sure you could pass:

cargo fmt --all -- --check
cargo build
cargo test

Document

Build and open the document at localhost

cargo rustdoc --open -- --document-private-items

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].