Skip to main content

Core features and design patterns

Overview of SurrealDB’s core data models, supported design patterns, and architectural capabilities.

Lizzie Holmes avatar
Written by Lizzie Holmes
Updated over a week ago

Overview

SurrealDB supports a powerful combination of data models and features, enabling a wide variety of modern application architectures.

From simple CRUD apps to highly connected graph-driven platforms, real-time event systems, and AI-native workflows, SurrealDB provides a versatile foundation for innovation.


Core multi-model support

SurrealDB offers unified support for multiple data models - all within a single ACID-compliant engine:

  • Document storage: Store flexible JSON-like objects with rich data structures.

  • Graph relations: Create and query bi-directional edges between entities.

  • Time-series data: Efficiently store and query timestamped events and metrics.

  • Vector search: Store and query vector embeddings for semantic search and AI use cases.

  • Hybrid models: Combine relational, graph, and document patterns in a single query.


Unified query language: SurrealQL

SurrealQL is SurrealDB’s built-in query language - a single, SQL-style language designed to query all supported data models.

It provides a consistent and powerful way to build complex application logic across hybrid data patterns.

Key capabilities

  • SQL-style core: Familiar SELECT ... FROM ... WHERE ... syntax.

  • Native graph support: Use RELATE to create edges, and arrow syntax (->) for graph traversals.

  • Vector search: Perform KNN similarity search inline with relational and graph queries.

  • Real-time queries: Use LIVE SELECT to subscribe to changes in real time.

  • Hybrid queries: Combine document, graph, and relational patterns in a single statement.

This example combines vector similarity search, graph traversal, and document field filtering - a typical hybrid pattern in modern AI-native applications.


Common design patterns

With SurrealDB’s multi-model architecture and SurrealQL query language, developers can implement a wide range of powerful design patterns across industries:

Multi-tenant SaaS

Support true isolation of tenant data via namespaces and databases, with fine-grained access control (table- and field-level).
Learn more in the RBAC and Access Control docs.

Event-driven architectures

Built-in support for real-time subscriptions (LIVE SELECT) and triggers enable responsive user experiences and automation.

Graph-native queries

Model rich relationship networks - such as social graphs, organisational hierarchies, and knowledge graphs - using SurrealDB’s native graph features.

AI-driven apps

Combine vector search with graph and document data to enable retrieval-augmented generation (RAG), semantic search, and context-aware systems.

SurrealDB’s SurrealML runtime enables in-database model inference, allowing AI pipelines to run closer to the data.


Explore more

From our Blog

Did this answer your question?