A high-performance OLAP database in Zig with SQL support.
- TCP server listening on port 5252
- SQL query processing
- Support for basic SQL operations (SELECT, INSERT, UPDATE, DELETE)
- Support for JOINs, GROUP BY, ORDER BY, and other SQL features
- Client tools for interacting with the database
# Build the database server and tools
zig build
zig build tools# Run the database server
zig build runThe server will start and listen on port 5252.
# Run the SQL client
./zig-out/bin/sql_clientThis will connect to the database server and allow you to execute SQL queries interactively.
# Run all tests
zig build test
# Run the full test suite (starts server, seeds database, runs tests)
./scripts/run_full_test.sh
# Run simulation tests
zig build test-simulation
# Run a specific simulation scenario
./zig-out/bin/run_simulation_tests --scenario vr_basic
# Run server with rocksdb installed on homebrew
zig build-exe server_main.zig -I/opt/homebrew/Cellar/rocksdb/10.2.1/include -L/opt/homebrew/Cellar/rocksdb/10.2.1/lib -lrocksdb
scripts/seed_database.zig: Seeds the database with sample datascripts/test_database.zig: Tests the database functionalityscripts/run_full_test.sh: Runs a full test of the database serverscripts/run_simulation_tests.zig: Runs deterministic simulation tests
-- Create a table
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT);
-- Insert data
INSERT INTO users (id, name, email) VALUES (1, 'John Doe', '[email protected]');
-- Query data
SELECT * FROM users;
-- Update data
UPDATE users SET name = 'Jane Doe' WHERE id = 1;
-- Delete data
DELETE FROM users WHERE id = 1;src/core/: Core database functionalitysrc/storage/: Storage enginesrc/query/: Query processingsrc/transaction/: Transaction managementsrc/server/: Network serversrc/tools/: Client toolsscripts/: Testing and utility scripts
This project is licensed under the MIT License - see the LICENSE file for details.
