GitDB is a lightweight SQL-like database engine built in Go that stores data in JSON files and tracks changes with Git. It comes with a custom JDBC driver written in Java, making it easy to integrate with standard SQL tools and test suites.
This project is experimental and not intended for production use.
GitDB is a fun proof-of-concept it is not tested, hardened, or optimised for real-world usage at scale or in production environments.
Use at your own risk. Data loss, inconsistency, or performance issues are very possible and very probable!
GitDB/
├── gitdb-server/ # Go-based backend
│ ├── main.go
│ └── ...
├── gitdb-jdbc-driver/ # Java JDBC driver for GitDB
│ ├── src/
│ ├── pom.xml
│ └── ...
└── Makefile
GoJavaMavenDockerGit
make buildThis will:
- Compile the Go
gitdb-server - Compile the Java JDBC driver via Maven
make testYou can launch the Go server directly for debugging:
cd gitdb-server
go run main.go --root .gitdb --port 8080Class.forName("com.gitdb.GitDBJDBCDriver");
Connection conn = DriverManager.getConnection("jdbc:gitdb:http://localhost:8080");
Statement stmt = conn.createStatement();
stmt.execute("CREATE DATABASE demo");
stmt.execute("USE DATABASE demo");
stmt.execute("CREATE TABLE users (name STRING,email STRING)");
stmt.execute("INSERT INTO users (name,email) VALUES ('Alice','[email protected]')");
ResultSet rs = stmt.executeQuery("SELECT * FROM users");