This is a from scratch implementation of a Relational Database in rust. The goal here is for myself and perhaps others to more deeply understand the inner workings of popular relational database systems like postgres by attempting to build an analog system. Some things this project will focus on are:
- SQL Syntax
- Supporting Basic Statements/Logic (SELECT, INSERT, CREATE, FROM, etc...)
- Validating command syntax
- Command Plans
- SQL syntax -> Plan structs containing information required to programmatically execute command
- Plan validation
- DataStorage
- In memory -> Single File (Sqlite) -> PG_DATA directory (Postgres)
- ACID
- External Client
- Support external client access
- Write basic python client
Currently I'm focusing on finishing up sine basic SQL syntax and accompanying logic. You can see what SQL statements are supported currently. At this time input commmands are very lightly validated, so further work will be required for a more robust validation system.
cargo run
For rscoDB, we'll try to mirror the SQL syntax used by Postgres.
CREATE DATABASE my_database
CONNECT database_name
SHOW DATABASE
DROP DATABASE db_name
CREATE TABLE table_name (field_a int, field_b varchar)
SHOW TABLE
DROP TABLE table_name
INSERT INTO table_name VALUES (1, hello, 3.0)
SELECT * FROM table_name