CovenantSQL is a decentralized SQL database management system derived from SQLite and built on top of a blockchain. It supports most of the SQL-92 features. Each party interacting with CovenantSQL is either a client, a block producer, or a miner. ## Client ## Block Producer ## Miner When a client sends a connection request, the request is directed to one node among a group of block producers. The block producers form a public blockchain (main chain). When a block producer receives a request, it allocates a number of CovenantSQL nodes, called miners. The miners self-organize and produce a separate block chain, called a shard chain, which runs SQL queries from the client. Each miner is an independent database engine running SQLite. CovenantSQL uses Go's driver for SQLite to interact with individual miners. The main chain implements Delegated Proof-of-Stake, which provides eventual consistency. The block producers all SQL queries from clients along with the shard chain's signature into the main block chain. The shard chains themselves consist of database contents and query results. The miners pertaining a shard chain use Byzantine Fault-Toleranted Raft, which provides strong consistency. The leader in each miner group uses two phase commit to support transactions.


CovenantSQL was developed and made open source in 2018. It is currently under active development.

Query Interface


CovenantSQL supports the same set of standard [SQLite]( commands.


Physical Logging

Individual miners run [SQLite](

Storage Model

N-ary Storage Model (Row/Record)

Individual miners run [SQLite](

Query Execution

Tuple-at-a-Time Model

Individual miners run [SQLite](

Stored Procedures

Not Supported

Same as [SQLite](



Individual miners run [SQLite](

Storage Architecture

Disk-oriented In-Memory

Clients can specify the storage architecture through a parameter in the connection request to the database. Same as [SQLite](


Non-Blocking Blocking

Individual miners run [SQLite](

Foreign Keys


Individual miners run [SQLite](

Data Model


Individual miners run [SQLite](

System Architecture


CovenantSQL uses a three-level architecture, consisting of a main block chain, many shard chains, and individual miners. The main block chain is produced by a group of nodes called block producers, responsible for matching clients to shard chains. Each shard chain, which is produced by a designated group of computing nodes called miners, is a single database. Each miner is a standalone database engine that is responsible for storage and query processing. The miners reach consensus using a variant of Byzantine Fault-Tolerated Raft, which the developers call Kayak.

Query Compilation

Code Generation

Individual miners run [SQLite](

CovenantSQL Logo

Source Code

Tech Docs,


Covenant Labs

Country of Origin


Start Year


Project Type

Commercial, Open Source

Written in


Supported languages

Go, Java, JavaScript, Python, SQL

Derived From


Operating Systems

Linux, OS X


Apache v2