SDB - SignatureDB
Distributed, version controlled, SQL database with cryptographically verifiable storage, queries and results.
Think git
for postgres
.
$ isdb -d app_dev -U sdb
isdb (0.0.1)
Type "help" for help.
app_dev=# VERIFY 'HEAD'
app_dev-# SELECT id, product_code, value, email
app_dev-# FROM orders;
id | product_code | value | email
----+--------------+-------+-------
(0 rows)
SHA: 6f902734101b5963367f394aa0def3f3d50f760e
app_dev=# \q
---
$ sdb log -2
commit 6f902734101b5963367f394aa0def3f3d50f760e (test-orders, origin/main, origin/HEAD, main)
Author: alex <[email protected]>
Date: Thu Dec 30 10:17:26 2021 -0800
Initial commit
---
$ isdb -d app_dev -U sdb
isdb (0.0.1)
Type "help" for help.
app_dev=# MESSAGE 'First order!'
app_dev-# INSERT INTO orders (product_code, value, email)
app_dev-# VALUES ('abc123', 10.0, '[email protected]');
INSERT 0 1
SHA: e427da4413bed914dfece023ed171ab73bb20c0b
app_dev=# VERIFY 'HEAD'
app_dev-# SELECT id, product_code, value, email
app_dev-# FROM orders;
id | product_code | value | email
----+--------------+-------+-------------------
1 | abc123 | 10.0 | [email protected]
(1 row)
SHA: e427da4413bed914dfece023ed171ab73bb20c0b
app_dev=# \q
---
$ sdb log -2
commit e427da4413bed914dfece023ed171ab73bb20c0b (HEAD -> test-orders)
Author: alex <[email protected]>
Date: Thu Dec 30 12:43:06 2021 -0800
First order!
commit 6f902734101b5963367f394aa0def3f3d50f760e (test-orders, origin/main, origin/HEAD, main)
Author: alex <[email protected]>
Date: Thu Dec 30 10:17:26 2021 -0800
Initial commit
---
$
NOTE!!!
This project is an experiment. I have no idea at this point if it's possible. I'm a huge fan of both postgres
and git
and the daily workflows they enable as a developer. When building web3
applications this is the core data storage system I would want to use.
Getting Started
Status
CLI
-
help
-
createdb
-
dropdb
REPL
-
\l
-
\dn
-
\dt
-
\d
-
\d relation
-
\e
Query Statements
-
INSERT
-
SELECT
-
UPDATE
-
DELETE
DDL
-
CREATE TABLE
-
ALTER TABLE
-
DROP TABLE
Authors
- Alex Kwiatkowski - [email protected]
License
signaturedb
is released under the MIT license