SurrealDB in 2025: A Comparative Analysis Across Database Categories – Briefing Document

This briefing document provides a comprehensive overview of SurrealDB as of 2025, analyzing its core features, query language, performance, tooling, scalability, and use cases. It compares SurrealDB to established databases across various categories, including relational SQL databases (PostgreSQL, MySQL), document stores (MongoDB, FaunaDB), graph databases (Neo4j), and other multi-model systems (ArangoDB). The analysis incorporates information from the provided source text to assess SurrealDB’s capabilities, strengths, weaknesses, and competitive positioning in the current database landscape.

1. Introduction and Core Features

SurrealDB has matured to version 2.x by 2025, positioning itself as an emerging multi-model database that unifies the capabilities of various database paradigms. According to the introduction, it “promises to unify the capabilities of SQL (relational), NoSQL (document/key-value), graph, and even newer paradigms like time-series and vector search in one system.” A key value proposition is the ability to “consolidate multiple databases into a single solution”.

Key Comparisons of Supported Data Models and Features (Table 1 Summary):

  • Relational: SurrealDB supports tables with optional schemas and ACID transactions but does not feature classic SQL JOINs, instead using links and subqueries. This contrasts with PostgreSQL and MySQL, which offer full relational models with schemas and JOINs.
  • Document (JSON): SurrealDB natively supports JSON fields with optional schemas, similar to MongoDB and with capabilities present in PostgreSQL and MySQL.
  • Graph: SurrealDB features record links (<- and ->) with edges as first-class records and traversals in SurrealQL, differentiating it from traditional SQL databases and offering a more integrated graph capability than document stores like MongoDB.
  • Full-text Search: Built-in in SurrealDB, similar to the capabilities in PostgreSQL, MySQL, and MongoDB.
  • Vector Similarity Search: Natively supported in SurrealDB for ML/AI use cases, an area where PostgreSQL and MongoDB require extensions or external services, and MySQL lacks core support.
  • Geospatial Data: SurrealDB stores GeoJSON and supports spatial queries, aligning with features in PostgreSQL (via PostGIS), MySQL, and MongoDB.
  • Schema Enforcement: Offers flexibility, allowing schemaless or schema-defined tables, unlike the strong schema enforcement in traditional SQL databases or the schemaless nature of MongoDB.

SurrealDB’s multi-model implementation is built on a document store foundation with inter-document links, deliberately avoiding SQL JOINs to potentially simplify horizontal scaling. Relationships are managed through references or a RELATE operation, treating edges as records. This allows for graph-like traversals using the -> syntax in SurrealQL, such as SELECT * FROM person:alice->friends->hobbies;, which would require multiple JOINs in SQL.

ACID Transactions: SurrealDB is fully ACID-compliant, supporting multi-record, multi-table transactions with rollback, even across different tables/collections. This is a significant feature distinguishing it from some NoSQL databases. It employs optimistic concurrency control and avoids table-level locks.

In summary, SurrealDB positions itself as a “jack-of-all-trades” database, combining features from relational, document, and graph databases, along with built-in support for search and vector workloads. The trade-off acknowledged is that each aspect may not be as deep as in a purpose-built system.

2. Query Language Expressiveness and Ease of Use

SurrealDB introduces SurrealQL, an SQL-like query language with extensions for multi-model data. It “blend[s] SQL familiarity with modern flexibility”. Basic SQL commands like CREATE, SELECT, UPDATE, and DELETE are supported. SurrealDB 2.0 added UPSERT for better alignment with SQL semantics.

Key Features of SurrealQL:

  • SQL-like Familiarity: Simple queries are similar to SQL, making the initial learning curve manageable for SQL users.
  • Embedded JSON and Arrays: SurrealQL natively handles nested JSON and arrays, offering concise syntax for querying semi-structured data, e.g., SELECT emails[WHERE active = true] FROM person;.
  • Graph Traversals: The arrow (->) operator is a distinctive feature for traversing relationships, allowing for chained traversals with conditions, e.g., SELECT * FROM person:alice->friends->person;. This avoids the need for explicit JOINs for related data.
  • No JOIN Keyword: SurrealQL does not support arbitrary JOINs using a JOIN syntax. Instead, it encourages linking records or using subqueries to combine data. An example provided shows how a SQL join can be rewritten using a subquery and the IN operator.

Comparison to Other Query Languages (Table 2 Summary):

  • SurrealDB (SurrealQL): SQL-like syntax with -> for graph traversal and subqueries for combining data. Also supports GraphQL API as of v2.0.
  • PostgreSQL (SQL): Extremely expressive with advanced SQL features, JSON querying, and extensions.
  • MongoDB (Mongo Query Language): JSON-based with an aggregation pipeline, no SQL support.
  • FaunaDB (FQL and GraphQL): Proprietary functional language (FQL) and built-in GraphQL API.

The addition of GraphQL support in SurrealDB 2.0 is significant, potentially lowering the barrier for frontend developers. This allows developers to choose between SurrealQL for complex logic and GraphQL for client-driven queries.

In summary, SurrealQL is “highly expressive for multi-model queries” but deliberately deviates from SQL standards in some areas (notably the absence of JOIN). The inclusion of GraphQL enhances its approachability.

3. Performance

Performance optimization was a focus in SurrealDB 2.0, with a rewritten query parser and execution engine. Internal benchmarks (“crud-bench”) provide insights into single-node throughput.

Benchmark Highlights:

  • Read Performance: SurrealDB (with RocksDB) achieved ~508k reads/sec, outperforming PostgreSQL (~284k/sec) and MongoDB (~91k/sec) significantly. This is likely due to its document key-value store foundation.
  • Write (Insert) Performance: PostgreSQL led with ~205k inserts/sec, followed by SurrealDB (~155k/sec), MongoDB (~92k/sec), and MySQL (~42k/sec).
  • Scan and Complex Query Performance: Simple filtered scans were fast across systems. However, SurrealDB showed slower performance with offsets or deep pagination.

Considerations for Complex Workloads:

  • Graph Traversals: While SurrealDB can perform graph queries, specialized graph databases like Neo4j might outperform it on very deep or complex graph algorithms.
  • Joins/Analytical Queries: The lack of JOINs in SurrealQL might lead to less efficient analytical queries compared to optimized SQL joins in Postgres. However, improvements in the query planner and caching in v2.0 are closing the gap.

Overall, SurrealDB’s performance on OLTP-style workloads in 2025 is on par with or better than many popular systems, nearly as fast as PostgreSQL for writes and faster for reads in internal tests. This indicates significant performance improvements in version 2.0. However, independent testing and real-world usage track record are still developing.

4. Tooling, Developer Experience, and Ecosystem

SurrealDB has invested in developer tooling, including:

  • Surrealist GUI: An official management studio for schema management, query execution, and data visualization.
  • Multiple SDKs: Client libraries for a wide range of languages (JavaScript/TypeScript, Rust, Go, Python, Java, .NET, PHP, Deno, WASM).
  • SurrealDB CLI: A command-line tool for database management and querying.
  • Learning Resources: SurrealDB University, extensive documentation, and an AI “Sidekick”.

While SurrealDB’s community and third-party tool ecosystem are still growing compared to mature databases like PostgreSQL, the company offers commercial support, and the community is active.

Developer Productivity: SurrealDB’s all-in-one approach can speed up development by providing a single system for various needs, including real-time subscriptions, full-text search, and graph traversal. The team claims SurrealDB “can replace 10 or more products and services“, potentially simplifying the backend stack. Built-in fine-grained security at the database level also enhances developer experience.

Ecosystem Maturity: SurrealDB’s ecosystem is still nascent compared to older databases. Migration tools and certain enterprise features are still evolving. However, the rapid development pace is closing the gap.

5. Scalability (Vertical, Horizontal, Clustering)

SurrealDB is designed for distributed scalability with a decoupled query engine and storage layer.

  • Vertical Scaling: Can leverage multi-core and large memory on a single node.
  • Horizontal Scaling & Clustering: Achieved by using TiKV as the distributed storage backend, allowing scaling to “hundreds of nodes” with no manual sharding. TiKV handles data sharding and replication. SurrealDB nodes are stateless and can be scaled independently of storage.

This approach is similar to “distributed SQL” databases. High availability is provided through TiKV’s replication and the stateless nature of SurrealDB query nodes. While globally distributed setups are possible with TiKV, initial clustering is primarily for regional scale-out and HA.

Compared to traditional SQL databases that often require manual sharding, SurrealDB offers a more elastic scaling model. Its avoidance of JOINs makes it well-suited for scaling read-heavy or mixed workloads.

6. Browser-Side and Edge Deployment Capability

A unique advantage of SurrealDB is its ability to run in the browser or at the network edge via WebAssembly (WASM).

  • Browser-side Database: The WASM build allows embedding a SurrealDB instance in web apps for offline-first applications or local caching.
  • Edge Deployment: Can run in serverless edge environments like Cloudflare Workers, enabling distributed edge caching or handling writes at the edge.
  • Client-Direct Connectivity: Supports WebSocket connections with authentication and permissions, allowing web and mobile apps to connect directly to the database securely. This can bypass the need for a custom backend API in many scenarios.

SurrealDB’s edge and WASM capabilities provide a unified programming model from edge to cloud, a significant differentiator compared to most traditional databases. It also offers real-time sync (live queries) via LIVE SELECT, pushing updates to clients in real-time.

7. Persistence

SurrealDB supports multiple storage engines:

  • RocksDB: Default recommended for small deployments, providing on-disk persistence.
  • TiKV: Used for clustered deployments, handling distributed persistent storage.
  • SurrealKV: The team’s own storage engine, still likely under optimization.
  • In-Memory: For ephemeral workloads and testing.

Persistent engines use WAL and checkpointing for durability (ACID). Backup and restore capabilities are available via file system copies or CLI export/import. SurrealDB defaults to in-memory mode unless otherwise specified, emphasizing its suitability for ephemeral and embedded use cases.

8. Use Cases: Enterprise-Scale vs. Smaller Applications

SurrealDB is considered on the cusp of enterprise readiness in 2025.

Enterprise-Scale Use Cases: Attractive for complex scenarios like knowledge graphs, real-time analytics, and database consolidation due to its multi-model nature. Enterprises will likely adopt it cautiously, starting with non-critical systems. The company is working on enterprise-grade support and compliance certifications.

Smaller Applications and Startups: Shines due to its ability to accelerate development by offering one database for everything, reducing complexity and operational overhead. The serverless-friendly design and open-source nature are also appealing.

Limitations for Enterprise Use: Relative youth, lack of a long track record, absence of certain niche features, and the BSL license are considerations for enterprise adoption.

Conclusion on Use Cases: SurrealDB is a serious contender for small to medium-scale enterprise applications, especially where multi-model or real-time features are required. For extremely large-scale, mission-critical systems, cautious evaluation and piloting are recommended.

Pros and Cons of SurrealDB Relative to Competitors

Pros:

  • Multi-Model Unification
  • Intuitive Querying Across Models
  • Real-time Data Sync
  • Scalable Architecture
  • ACID and Schema Flexibility
  • Full-Text Search & Vector Search Built-In
  • Browser-Side and Edge Deployment
  • Developer Experience and DevOps
  • Security Model
  • Active Development and Support

Cons:

  • Maturity and Stability
  • JOIN and Complex SQL Limitations
  • Feature Parity in Niche Areas
  • License and Perception
  • Less Proven at Maximum Scale

Conclusion: Is SurrealDB a Serious Competitor in 2025?

Yes, SurrealDB has rapidly grown into a serious competitor in the database landscape by 2025. Its multi-model nature, cloud-native design, and developer-friendly features position it well for modern applications requiring flexibility and diverse data paradigms. It is particularly compelling for startups and applications that can benefit from a unified database solution, real-time capabilities, and edge deployment options. While enterprises will likely approach adoption with due diligence, SurrealDB’s trajectory suggests it is on track to becoming a mainstream solution for a wide range of use cases. Its ability to serve as a “single solution for multiple needs” aligns with the industry trend of reducing complexity and supporting agile development.