Skip to content
NEW BENCHMARKS

SurrealDB 3.x by the numbers

View

1/3

Knowledge graphs, natively

Ontological modelling with schema-as-ontology. Rich edges, vector search alongside structured data, and graph traversal - all in SurrealQL.

ONTOLOGICAL MODELLING

Your schema is your ontology

In SurrealDB, tables define entity types and typed relations define relationship types. Your database schema maps directly to your domain ontology. No separate modelling layer, no translation between conceptual models and physical storage.

1-- Define an ontology directly in the schema
2DEFINE TABLE person SCHEMAFULL;
3DEFINE FIELD name ON person TYPE string;
4DEFINE FIELD role ON person TYPE string;
5
6DEFINE TABLE knows SCHEMAFULL TYPE RELATION FROM person TO person;
7DEFINE FIELD since ON knows TYPE datetime;
8DEFINE FIELD confidence ON knows TYPE float;
9DEFINE FIELD context ON knows TYPE string;

RICH EDGES

Relationships as documents

Edges in SurrealDB are full documents - they carry properties, timestamps, confidence scores, and metadata. Relationships are first-class citizens, not just pointers between nodes.

1-- Create a relationship with rich metadata
2RELATE person:jaime->knows->person:sarah SET
3 since = d"2020-03-15",
4 confidence = 0.95,
5 context = "worked together at Acme Corp";
6
7-- Traverse with filters on edge properties
8SELECT ->knows[WHERE confidence > 0.9]->person.name AS trusted_contacts
9FROM person:jaime;

HYBRID SEARCH

Vector search alongside structured data

Store embeddings alongside their source entities. Combine vector similarity with graph traversal and structured filters in a single SurrealQL query. Semantic relevance meets structural precision.

Co-located embeddings

Vectors live alongside the entities they represent. No separate vector store, no ID mapping, no sync jobs.

Hybrid queries

Combine cosine similarity, graph traversal, full-text search, and structured filters in one statement.

Knowledge enrichment

Use vector similarity to discover connections, then materialise them as graph edges for future traversal.

OPERATIONAL KNOWLEDGE GRAPHS

Digital twins as living knowledge graphs

When a knowledge graph models a physical or operational system, it becomes a digital twin: assets and dependencies as nodes and edges, configuration and documents as attributes, telemetry as time-indexed values, and embeddings for semantic recall over unstructured context. SurrealDB lets all of these coexist in one transactional engine, so the same ontology powers both the static knowledge graph and the live twin reading from it. Learn more about digital twins.

FREQUENTLY ASKED QUESTIONS

Knowledge graphs

GET STARTED

Build knowledge graphs with SurrealDB

Ontological modelling, rich edges, vector search alongside structured data - all in one database.

SamsungNVIDIAAppleVerizonTencent

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

SurrealDB

The context layer for AI agents.

Documents, graphs, vectors, time-series, and memory - in one transaction, one query, one deployment.

Explore with AI

Independently verified

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Trust Centre

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom