Back to top
Documentation SurrealQL Data model

Data model

SurrealDB comes with a large number of in-built types, designed specifically for a scalable cloud database which operates directly from the web. To get started with the basic concepts of the data model view one of the sections below.

Overview

Summary of all data types available in SurrealQL

Record IDs

Understand how record or document IDs work in SurrealDB

Simple types

Boolean values, empty values, and null values

Strings

Strings can be used to store text and unicode values

Numbers

Integers, floating point numbers and decimal numbers

Datetimes

Datetimes and durations can be used to store and manipulate dates and times

Formatters

Special syntax for formatting functions to build strings

UUIDs

SurrealDB will automatically detect and parse valid UUIDs within strings

Objects

Store objects with no limit to the depth of any nested objects or values

Arrays

Store arrays of values with no limit to the depth of the arrays

Geometries

Geolocation points and GeoJSON values can be used to store geometry data

Record links

Use record links to point to and link directly with records in other tables

Futures

Use futures to store values which should only be computed when retrieving data

Casting

SurrealDB makes it easy to convert values between different data types