---
title: "SurrealDB vs. MongoDB | Database comparison"
description: "A comparison of SurrealDB and MongoDB features and capabilities."
url: https://surrealdb.com/comparison/mongodb
---

# SurrealDB vs. MongoDB

SurrealDB is a unified, transactional, multi-model database. MongoDB is a document-oriented database with multiple specialised subsystems.

[Migrate from MongoDB](https://surrealdb.com/docs/build/migrating/from-other-databases/from-mongodb) [Contact us](https://surrealdb.com/contact)

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

KEY ADVANTAGES

## Why teams choose SurrealDB over MongoDB

MongoDB started as a document store and later added search, vector, and limited graph features through separate systems. SurrealDB runs all of this natively in one engine.

### True multi-model engine

Document, relational, graph, vector, full-text, temporal, and geospatial access patterns natively in one system.

### Temporal graph querying

Time is treated as a first-class constraint within graph traversal.

### Unified indexing

No compound multikey limitations across arrays or nested fields.

### ACID without locking

Transactions across all data models without global or table-level locking.

HOW IT COMPARES

## How SurrealDB and MongoDB differ

As apps demand richer models, temporal logic, and AI retrieval, document-centric systems with external subsystems hit composability limits. SurrealDB runs everything in one distributed engine.

Feature

MongoDB

SurrealDB

Architecture

Document-first with secondary views, full-text search, and vectors requiring duplicated data and separate async pipelines.

Unified, distributed multi-model engine. Query execution, indexing, storage, and transactions operate inside a single system.

Models

Document-first. Graph traversal support is limited. Relational semantics are not planner-driven.

Native support for document, relational, graph, key-value, time-series, vector, full-text search, and geospatial.

Transactional consistency

ACID transactions are limited, costly under contention, and don't extend to search, vectors, or graph traversal.

ACID transactions across documents, relational joins, graph traversal, vector search, and full-text search.

Query execution

Queries split into multiple stages, with $search required first. No unified planner across document, search, vector, and graph operations.

Single declarative query language with a unified execution plan. All retrieval primitives are co-planned.

Indexing

Compound indexes may include only one array field. Deeply nested or multi-array document models cannot be efficiently indexed.

Indexing across arrays, nested fields, vectors, and relationships without compound multikey restrictions.

Temporal capabilities

No temporal graph querying. Time filters cannot participate directly in traversal semantics.

Temporal querying is first-class. Time constraints participate directly in graph traversal.

Pricing

Costs increase with sharding, coordination overhead, Atlas dependency, and duplicated subsystems.

Unified engine eliminates the need for separate search, vector, and graph systems. Costs scale linearly.

TRUSTED BY

## Enterprise teams building on SurrealDB

From knowledge graphs to AI assistants - how enterprise teams are building on SurrealDB.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg) DATABASE

### [Unlocking insights with knowledge graphs](https://surrealdb.com/customer/samsung)

Samsung Ads uses SurrealDB to build dynamic, real-time knowledge graphs for smarter campaign execution - collapsing three legacy data stores into one.

Read case study

![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg) DATABASE

### [AI assistant empowering 10,000 technicians](https://surrealdb.com/customer/verizon)

Verizon uses SurrealDB to power a generative AI assistant for 10,000 field technicians, delivering instant access to documentation, outage updates, and workflows.

Read case study

![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg) DATABASE

### [Unified infrastructure monitoring](https://surrealdb.com/customer/tencent)

Tencent consolidated nine backend tools into one real-time monitoring platform powered by SurrealDB's multi-model context graph.

Read case study

![PolyAI](https://surrealdb.com/assets/static/c5fa07c66cd05131.BnC7wHcc.svg) DATABASE

### [High-performance customer service AI powered by RAG](https://surrealdb.com/customer/polyai)

PolyAI connects SurrealDB to Agent Studio for low-latency, customer-controlled RAG across voice AI experiences.

Read case study

![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue-white.pDJ9HGmf.svg) DATABASE

### [AI-powered personalisation at massive scale](https://surrealdb.com/customer/saks)

Saks Fifth Avenue uses SurrealDB's vector search and graph capabilities to deliver real-time, AI-powered personalisation across 5 million luxury customers and 45 million monthly product-recommendation queries.

Read case study

FREQUENTLY ASKED QUESTIONS

## Common questions about MongoDB

How is SurrealDB different from MongoDB?

Can SurrealDB replace MongoDB?

How does SurrealDB's query language compare to MongoDB's?

GET STARTED

## Migrate from MongoDB

Documents you already know, plus the graphs, vectors, and SQL MongoDB leaves to other systems.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)![NVIDIA](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)![Apple](https://surrealdb.com/assets/static/f7dc2519e0d212bc.Cn8MYAK7.svg)![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Migration guide](https://surrealdb.com/docs/build/migrating/from-other-databases/from-mongodb)

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Mongodb","item":"https://surrealdb.com/comparison/mongodb"}]}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How is SurrealDB different from MongoDB?","acceptedAnswer":{"@type":"Answer","text":"MongoDB is a document-oriented database that adds search, vector, and limited graph features through separate subsystems. SurrealDB is a unified multi-model engine that natively supports documents, graphs, vectors, full-text search, temporal queries, and relational semantics in one system."}},{"@type":"Question","name":"Can SurrealDB replace MongoDB?","acceptedAnswer":{"@type":"Answer","text":"Yes. SurrealDB supports flexible document storage with optional schema enforcement, making it compatible with document-oriented application patterns. A migration guide is available in the documentation."}},{"@type":"Question","name":"How does SurrealDB's query language compare to MongoDB's?","acceptedAnswer":{"@type":"Answer","text":"MongoDB uses an aggregation pipeline with JSON-based operators. SurrealDB uses SurrealQL, a declarative query language that combines SQL-like syntax with graph traversals, vector search, and document operations in a single statement."}}]}
```
