Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsApr 12, 2026·3 min de lectura

SurrealDB — Scalable Multi-Model Database for Modern Apps

SurrealDB is a scalable, distributed, collaborative, document-graph database for the real-time web. Combines relational, document, graph, and time-series models in one database with SurrealQL query language. Built in Rust for performance and reliability.

Introducción

SurrealDB is a scalable, distributed, multi-model database designed for modern applications. It combines the strengths of relational, document, graph, and time-series databases into a single product with a powerful query language (SurrealQL). Built in Rust by Tobie Morgan Hitchcock and Jaime Morgan Hitchcock.

What SurrealDB Does

  • Multi-model — document, graph, relational, time-series in one DB
  • SurrealQL — SQL-like with graph traversal, record links, subqueries
  • Graph relations — RELATE for typed edges between records
  • Record links — embed references between documents
  • Live queries — real-time change notifications
  • Full-text search — BM25 index built in
  • Permissions — row-level security with JWT auth
  • Multi-tenancy — namespace and database isolation
  • Embedded or server — use as library or HTTP/WebSocket server
  • SDK — JavaScript, Python, Rust, Go, Java, .NET, PHP

Architecture

Rust binary with multiple storage backends: in-memory, RocksDB (single node), TiKV (distributed), FoundationDB (distributed). HTTP and WebSocket API for clients. SurrealQL parser compiles queries to execution plans.

Self-Hosting

# Single-node with persistence
surreal start --log info --user root --pass root file://surreal.db

# Distributed (TiKV backend)
surreal start --log info --user root --pass root tikv://pd:2379

Key Features

  • Multi-model (doc + graph + relational)
  • SurrealQL query language
  • Graph traversal
  • Live queries (real-time)
  • Full-text search (BM25)
  • Row-level permissions
  • Multi-tenancy
  • Embedded or server mode
  • Multiple storage backends
  • SDKs for 7+ languages

Comparison

Database Models Query Lang Distributed
SurrealDB Doc + Graph + Relational SurrealQL Via TiKV/FDB
MongoDB Document MQL Sharding
Neo4j Graph Cypher Enterprise
PostgreSQL Relational (+ JSON) SQL Logical repl
ArangoDB Doc + Graph + KV AQL Native
FaunaDB Document + relational FQL Managed

FAQ

Q: One database for everything? A: SurrealDB aims to reduce polyglot persistence complexity. Documents, graph relationships, and full-text search live in one engine, no need to sync multiple databases. Fits medium-scale projects.

Q: Is it production ready? A: v2.0+ is significantly more stable, but the ecosystem is young compared to PostgreSQL/MongoDB. Suitable for new and innovative applications; mission-critical systems need evaluation.

Q: BSL restrictions? A: Self-use and embedding in applications are completely fine. You can't run a managed SurrealDB service competing with the official one. Auto-converts to Apache 2.0 after 4 years.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados