gql-db is an SQL database server with version control integrated into the database itself. It's written in Rust and uses Protocol Buffers/gRPC for communication. This was our Capstone Software Engineering project for Purdue University.
We've also implemented a UI for the database server, which can be found at: GQL-Project/gql_client.
- SQL:
- Basic SQL operations:
SELECT
,INSERT
,UPDATE
,DELETE
,CREATE TABLE
,DROP TABLE
- Support for
JOIN
operations, as well asGROUP BY
andORDER BY
operations - BTrees for indexing
- User Permisions
- Basic SQL operations:
- Version Control:
- Creating, Reverting and Squashing Commits
- Creating, Switching and Deleting Branches
- Pulling Changes from source branch
- Merging Branches, with conflict resolution policies
- Logs, Viewing Specific Commits and Viewing Database Schema at a specific commit
- For a full list, look at vc_commands.rs
- All branches, commits and files are stored in the database server itself. This differs from git, where commits are first stored in a local repository and then pushed to a remote repository.
- More of the design choices can be found here:
Refer to SETUP.md for how to install Rust/Protocol Buffers and set up the project.
To run the server, run the following command in the root directory of the project:
cargo run
Additionally, to run the server with a demo database, you can instead run:
cargo run -- --demo
To run a terminal client:
cargo run -- --client
You can then run SQL commands in the client. For example:
GQL> select P.*, L.location from personal_info P, locations L where P.id = L.id;
To run version control commands in the client, preface the command with gql
.
GQL> gql --help;
GQL> gql squash JRTukqo lhvgqP6