Surreal can be used with any key-value storage which enables range scans. This document describes how the data is stored in the storage layer, so that it can be queried and manipulated quickly and efficiently.
**Base keys**
```bash
{$base} = "surreal" # This is the base key
```
The base key is used to separate the data used in SurrealDB from data used by other databases using the same key:value store.
```bash
{$auth} = "abcum" # This is the name of the auth account
```
The auth key is used to enable multi-tenancy of databases on SurrealDB. Each authenticated user is able to access databases underneath their own auth key only.
```bash
{$db} = "database" # This is the name of the database
```
The database key is used to separate data into multiple different databases under each multi-tenant installation.
**Unique ids**
Each view, table, and index is assigned a unique id, which is used instead of the name in each key:value pair. This allows for views, indexes, and tables to be deleted asynchronously, while at the same time a new one is created in its place with the same name.
**Data types**
Each data type is stored using a different symbol in the key:value pair.