---
title: SurrealDB
timestamp: 2024-01-10T10:25:01
author: szabgab
published: true
description: SurrealDB is feature-rich database written in Rust.
tags:
    - SurrealDB
todo:
    - How to use foreign key and select data from multiple tables?
    - Can we have struct that has structs inserted at once into multiple tables?
    - How to add new column to a table? changing schema.
    - How to dump data?
    - How to restore data?
    - List tables?
---

[SurrealDB](https://surrealdb.com/) is feature-rich database written in Rust.

I've started to explore it and this page is going to be used as a starting point and a collection of the articles I publish on how to use SurrealDB in applications written in Rust.

You might also want to consult the [Awesome SurrealDB](https://github.com/surrealdb/awesome-surreal) a curated list of SurrealDB resources, tools, utilities, and applications.


* [Setting up embedded SurrealDB with RocksDB backend in Rust](/surrealdb-embedded-with-rocksdb)
* [Setting up an in-memory SurrealDB database in Rust](/surrealdb-embedded-with-in-memory-database)
* [SurrealDB in-memory with SQL demo in Rust](/surrealdb-in-memory-with-sql-demo) - `Mem`, `surrealdb::Result`, `CREATE`, `SELECT`, `UPDATE`, `DELETE`.
* [Multi-counter with embedded SurrealDB database](/surrealdb-cli-multi-counter) - `RocksDB`, `CLI`, `DEFINE`, `SELECT`, `INSERT`, `INDEX`, `DUPLICATE`.
* [Getting started with SurrealDB using Docker and a Rust client](/surrealdb-with-docker) - `Docker`

<!--
* [Simple command line phonebook with SurrealDB using SQL](/cli-simple-phonebook-with-surrealdb-using-sql)
-->


## Cheat-sheet for SurrealQL

* [SQL to SurrealDB mapping](https://docs.surrealdb.com/docs/introduction/sql)
* [MongoDB to SurrealDB mapping](https://docs.surrealdb.com/docs/introduction/mongo)

## Videos

* [SurrealDB - Rust Embedded Database - Quick Tutorial](https://www.youtube.com/watch?v=iOyvum0D3LM)

## Open Source projects using SurrealDB

* [CreatureBattleSimulator](https://github.com/MDH0/CreatureBattleSimulator/) Rocket + surrealDB

