SurrealDB

Immutable NewSQL OLAP Serverless

SurrealDB is a multi-model DBMS that supports embedded and shared-nothing deployments. It uses a hybrid data model that combines documents with explicit graph edge relationships.

History

The work on SurrealDB was started in 2016 by Tobie and Jamie Morgan Hitchcock as a private project. The first functional version of SurrealDB was completed in 2017 and it was written completely in Go. In 2021, the source code for the SurrealDB project was made public to allow contributions from the outside world. Work on building an improved version of SurrealDB with Rust from scratch also begin in 2021. In 2022, SurrealDB was released in public beta mode.

Checkpoints

Not Supported

SurrealDB does not explicitly support checkpoints. However, SurrealDB internally uses other key-value store databases for storing user data and metadata in the backend. Some of these backends like RocksDB do support checkpointing and might create checkpoints in the background.

Data Model

Relational Document / XML Graph

SurrealDB supports relational, document, and graph-based data models. By default, SurrealDB creates schema-less documents, however the SurrealQL syntax provides functionality for creating fixed-schema tables as well. Graph-based models are constructed by representing the nodes and the edges as relations that are related by record links.

Foreign Keys

Not Supported

SurrealDB does not have the concept of foreign keys. It instead uses record links to link records in different relations like the edges of a graph.

Joins

Not Supported

SurrealDB does have the concept of joins. Instead of Joins between pre-defined relations, SurrealDB uses graph edges (record links) to link records to each other. With graph edges and the ability to store arrays and objects as field members, SurrealDB can provide the functionality of Joins along with other graph-based operations like path traversal.

Query Execution

Tuple-at-a-Time Model

Query Interface

Custom API SQL HTTP / REST RPC

SurrealDB can be started as an independent process or embedded in the application as a library. As an independent process, it is possible to interact with the database using either the SurrealQL REPL (if SurrealDB is running locally), or using the HTTP/REST endpoints. As a library, SurrealDB can be used in other applications by interfacing with the APIs provided by the SurrealDB library. SurrealDB also provides the WebSocket API which can be interfaced with using RPCs.

Storage Organization

Copy-on-Write / Shadow Paging

Stored Procedures

Supported

System Architecture

Shared-Nothing Embedded

SurrealDB Logo
Website

https://surrealdb.com/

Source Code

https://github.com/surrealdb/surrealdb

Tech Docs

https://surrealdb.com/docs

Twitter

@surrealdb

Developer

SurrealDB Ltd.

Country of Origin

GB

Start Year

2016

Project Type

Commercial, Open Source

Written in

Rust

Supported languages

Go, JavaScript, Rust

Embeds / Uses

EchoDB, FoundationDB, RocksDB, TiKV

Compatible With

EchoDB, FoundationDB, RocksDB, TiKV

Operating Systems

Linux, OS X, Windows

Licenses

Business Source License