SurrealDB vs. MongoDB
SurrealDB is a unified, transactional, multi-model database. MongoDB is a document-oriented database with multiple specialised subsystems.
SurrealDB runs all of this natively in one engine.
Built for modern applications and AI agents
SurrealDB is built for systems that need correctness, composability, and consistent semantics across complex queries.
SurrealDB vs. MongoDB
at a glance
As apps demand richer models, temporal logic, and AI retrieval, document-centric systems with external subsystems hit composability limits.
MongoDB splits document, search, and vector execution across separate paths. SurrealDB runs everything in one distributed engine with consistent semantics.
Business-critical capabilities
MongoDB
Document-first database with no relational query planner or cost-based join optimisation. Limited graph traversal and no first-class temporal semantics.
SurrealDB
Native document, relational, graph, vector, full-text, and temporal querying in one engine.
Platform openness and composability
MongoDB
Search and vector queries run through Atlas Search (Lucene-based) and must appear first in pipelines, limiting composability.
SurrealDB
All query primitives are first-class and fully composable within a single execution plan.
Cost and performance
MongoDB
Contention increases transaction overhead, and separate core vs. search/vector execution adds complexity.
SurrealDB
Unified execution reduces coordination overhead, hardware usage, and system sprawl.
SurrealDB delivers enterprise-grade correctness and consistency
ACID across all data models
MongoDB supports ACID transactions, but they’re limited, costly under contention, and don’t span search, vectors, or graph traversal.
SurrealDB provides ACID transactions natively across all models in one engine.
No locking, predictable concurrency
MongoDB uses coordination-heavy concurrency control that adds overhead under concurrent workloads.
SurrealDB avoids global and table-level locks for concurrency, enabling predictable reads and writes.
Temporal correctness by design
MongoDB lacks temporal graph traversal - time filters can't participate directly in traversal semantics.
SurrealDB supports native temporal graph querying with time constraints built into traversal logic.
Enterprise takeaway
MongoDB is optimised for document-centric workloads.
SurrealDB is optimised for correctness, composability, and consistency across complex, evolving datasets.
SurrealDB is open and unified by design
One engine, not fragmented subsystems
MongoDB runs full-text and vector search through Atlas Search (Lucene) outside core CRUD, without full transactional consistency.
SurrealDB executes documents, graphs, vectors, and full-text search in one distributed engine.
Indexing without structural limits
MongoDB supports full-text indexing, but Atlas Search runs as a separate Lucene engine with delayed consistency and added overhead. Compound indexes are also limited with nested arrays, limiting efficient indexing of deeply nested or multi-array document models.
SurrealDB provides native full-text search and indexing across arrays, nested fields, vectors, and relationships without these constraints.
Flexible schema without trade-offs
MongoDB is a schema-optional database; its schema validation is enforced only at write time, does not encode relationships or retroactively protect existing data, and reduces performance.
SurrealDB allows you to start schemaless and progressively enforce schemas with DB-level guarantees, with native enforcement, preserving relationships and full transactional consistency.
Platform takeaway
SurrealDB replaces fragmented document-oriented architectures with a single, consistent platform capable of executing application and AI workloads end to end, including native support for custom in-database logic such as triggers, events, and procedural logic.
SurrealDB & MongoDB compared
A direct comparison of capabilities, architecture, and deployment options.
Business model
MongoDB
Source-available, with key capabilities gated behind commercial offerings and Atlas-managed services.
SurrealDB
Open source and available for use. Commercial offerings build on the same core engine without fragmenting capabilities.
Availability
MongoDB
Runs locally, on-premises, and in major clouds, but advanced search, vectors, and scaling mainly depend on Atlas, with limited self-managed support.
SurrealDB
Runs locally, on-premises, and on all major public clouds. Deployable as embedded, single-node, or distributed.
Architecture
MongoDB
Document-first with limited graph traversal and no planner-driven relational semantics. Secondary views, FTS and vectors require duplicated data and separate async pipelines.
SurrealDB
Unified, distributed multi-model engine. Query execution, indexing, storage, and transactions operate inside a single system. Designed for mixed read and write workloads.
Scale
MongoDB
Scales through sharding, which introduces operational complexity. Transaction coordination overhead increases as scale and concurrency grow.
SurrealDB
Horizontally scalable across reads and writes. No sharding required for query semantics. Designed for large, continuously evolving datasets.
Resilience
MongoDB
Separate subsystems introduce additional operational dependencies. Search and vector results are not transactionally consistent with core data.
SurrealDB
Distributed execution without dependency on separate subsystems. Failures do not fragment query correctness or transactional consistency.
Transactional consistency
MongoDB
ACID transactions are limited, costly under contention, and don’t extend to search, vectors, or graph traversal.
SurrealDB
ACID transactions across documents, relational joins, graph traversal, vector search, and full-text search. No global or table-level locks.
Models
MongoDB
Document-first. Graph traversal support is limited and non-composable. Relational semantics are limited and not planner-driven.
SurrealDB
Native support for document, relational, graph, key-value, time-series, vector, full-text search, and geospatial access patterns in one engine.
Temporal capabilities
MongoDB
No temporal graph querying. Time filters cannot participate directly in traversal semantics.
SurrealDB
Temporal querying is first-class. Time constraints participate directly in graph traversal and filtering.
Indexing
MongoDB
Compound indexes may include only one array field. Deeply nested or multi-array document models cannot be efficiently indexed.
SurrealDB
Indexing across arrays, nested fields, vectors, and relationships without compound multikey restrictions.
Query execution
MongoDB
Queries split into multiple stages, with $search required first. There's no unified planner across document, $search, vector, and graph operations, increasing latency from execution boundaries and data handoffs.
SurrealDB
Single declarative query language with a unified execution plan. All retrieval primitives are co-planned and optimised together.
Pricing
MongoDB
Costs increase with sharding, coordination overhead, Atlas dependency, and duplicated subsystems. Operational complexity grows as scale increases.
SurrealDB
Straightforward pricing with architectural efficiency reducing infrastructure and operational cost as scale grows. A unified engine eliminates the need for separate search, vector, and graph systems.





