SurrealDB Cloud Dedicated is now available
Sign up for early access

Build intelligent Knowledge Graphs with SurrealDB

SurrealDB combines a flexible document store, native graph engine, and a schema that is as flexible or as strict as needed so your team can model complex domains, query them with advanced traversals, and enrich every node with business logic or AI, all inside one ACID-compliant database

The challenge

Fragmented data silos

Modern apps demand context across fraud detection, recommendations, search, and data lineage - but data lives in separate systems.

Complex multi-system stacks

Traditional stacks splice together separate document stores, graph engines, AI pipelines, and streaming ETL scripts.

Operational overhead

Each hop between systems adds latency, ops overhead, and failure modes that complicate your architecture.

Governance complexity

Managing access controls, audit trails, and compliance across multiple systems creates security gaps and operational burden.

Surrealism

Unified graph + document model

Single system architecture

SurrealDB collapses document stores, graph engines, AI pipelines, and ETL into one ACID-compliant database.

Flexible schema evolution

Prototype quickly with unstructured data, then lock down types, constraints, and access permissions when governance kicks in.

Native graph analytics

Run graph traversals, shortest-path, and pattern matching without bolt-on engines or external dependencies.

Real-time updates

Traditional graph databases struggle with rapidly evolving data - SurrealDB excels at real-time use cases and AI-driven insights.

Model your domain in minutes

Define collections and optional schema with flexible typing and built-in validation

DEFINE TABLE company; DEFINE TABLE product; DEFINE TABLE person SCHEMAFULL PERMISSIONS FOR select, update WHERE $auth.email = email; DEFINE FIELD name ON person TYPE string; DEFINE FIELD email ON person TYPE string ASSERT string::is::email($value); DEFINE FIELD skills ON person TYPE array<string> ASSERT $value IN ['graph databases', 'rust', 'go']; DEFINE FIELD joined_at ON person TYPE datetime DEFAULT time::now() READONLY; -- relationships auto-created via RELATE, can be pre-defined in the schema DEFINE TABLE works_for TYPE RELATION IN person OUT company;
CREATE company:surreal; CREATE person:alice CONTENT { name: 'Alice Chen', email: 'alice@example.com', skills: ['graph databases', 'rust'], }; RELATE person:alice->works_for->company:surreal CONTENT { title: 'Backend Engineer', started_at: d'2023-09-01', };

Ask complex questions with one language

SurrealQL speaks graph, relational, document, time-series, and vector with one language. Blend connections, facts, and semantics in a single round-trip.

-- 1. Who in my team can debug a Rust plugin and joined after 2023? SELECT * FROM ( SELECT out AS dev FROM company:surreal<-works_for<-person WHERE dev.skills CONTAINS 'rust' ) WHERE dev.joined_at > '2023-01-01'; -- 2. Shortest path chain between two users person:alice.{..+shortest=person:bob}->works_for->person;

Enterprise-grade governance

Meet regulatory requirements without wrapping your DB in yet another proxy

Role-based access control

Grant fine-grained rights per table, field, or edge with unified access policies.

Auditable history

Use SurrealKV backend to store versions of tables at points in time for compliance or explainable AI.

Encryption

TLS in transit with comprehensive security built into the core architecture.

Observability

OpenTelemetry metrics built in with environment variables to configure logging and observability.

Real-world scenarios

From fraud prevention to supply chain visibility, knowledge graphs power critical business applications

Fraud prevention

Link card transactions, devices, IPs, and identity documents. Run multi-hop traversals on every authorization call to flag suspicious loops.

Knowledge-driven LLM applications

Store documents with embeddings, chunk hierarchy, and citation edges. Plugins call local vector search or external OpenAI APIs to ground answers.

Supply chain visibility

Track parts, suppliers, shipments, and compliance certificates with full lineage. Time-travel queries reconstruct the exact chain for any delivered unit.

Recommendation engines

Traverse user, content, and behavioural signals in real time to deliver personalized recommendations with context.

Business impact

Time to prototype

Hours, not weeks - schema-optional and local binary for quick deployment and iteration.

Lower TCO

Fewer moving parts lead to a smaller infra bill, leaner SRE rotation, and simplified operations.

Data governance

Built-in versioning eliminates shadow ETL tables and audit scripts with unified compliance controls.

Developer velocity

One query language plus SDKs in multiple languages keep teams in familiar tooling and accelerate development.

Real-time performance

Native graph operations with sub-millisecond latencies for time-sensitive applications like fraud detection.

Scale as you need

Go from embedded, to single-node server, to a write-write distributed cluster as your needs grow.

Powering innovation across industries

Unlocking insights with knowledge graphs

Unlocking insights with knowledge graphs

Samsung uses SurrealDB to power a knowledge graph for real-time audience insights and ad targeting in its ad division.

Unified infrastructure monitoring

Unified infrastructure monitoring

Tencent uses SurrealDB to consolidate nine backend tools into one real-time monitoring platform.

Learn more

The state of Agentic AI and the need for Agentic Memory

company

The state of Agentic AI and the need for Agentic Memory

Jun 27, 2025

What are knowledge graphs and why is everyone talking about them?

company

What are knowledge graphs and why is everyone talking about them?

Jun 19, 2025

Data analysis using graph traversal, recursion, and shortest path

tutorials

Data analysis using graph traversal, recursion, and shortest path

Mar 24, 2025

Automating Knowledge Graphs with SurrealDB and Gemini

engineering

Automating Knowledge Graphs with SurrealDB and Gemini

Feb 21, 2025

Ready to build with
Knowledge Graphs?

Build dynamic, intelligent systems and enhance AI-driven data analysis, for real-time, actionable insights.

Start for free
Learn more
Trusted & Certified for Enterprise Security Learn more
SOC 2 Type 1
GDPR
Cyber Essentials Plus
ISO 27001