Unified multi-model database with SurrealDB
SurrealDB combines relational tables, document stores, graph relationships, and vector embeddings in a single query engine — with live queries, Row-Level Security, and built-in AI vector search.
Key highlights
Why SurrealDB is redefining the database landscape.
Multi-model from the ground up
Store and query data as relational tables, JSON documents, or graph nodes — all in a single database. SurrealDB's query engine seamlessly traverses relationships, merges documents, and computes graph paths in one query.
Native vector search
Built-in vector indexing and similarity search for AI embeddings. Store vectors alongside your relational data and query by semantic similarity — no separate vector database or complex pipeline required.
Row-Level Security
Define security policies at the row level using SurrealQL. Users can only see, insert, or update records that match their permissions — enforced at the database engine level, not in application code.
Why SurrealDB for modern applications
The database that adapts to your data model, not the other way around.
Graph queries for connected data.
SurrealDB's graph engine lets you traverse relationships naturally — "find all products that users in the same organization purchased" becomes a single query. No JOINs, no recursive CTEs, no ORM magic. Perfect for social networks, recommendation engines, and fraud detection.
Vector search for AI-powered apps.
Build RAG pipelines without a separate vector database. Store embeddings alongside your source data, run similarity searches with filters on any field, and combine vector results with relational queries — all in SurrealQL.
Live queries and real-time subscriptions.
Subscribe to query results and receive updates whenever the underlying data changes. Build real-time dashboards, live feeds, and collaborative applications without polling or WebSocket infrastructure — SurrealDB pushes changes to your app.
Schema-less or schema-full — your choice.
Start with flexible document storage and add strict schemas as your data model matures. SurrealDB supports both approaches, letting you move fast in early stages and enforce constraints in production.
Why we recommend SurrealDB
SurrealDB is our top recommendation for teams wanting a unified multi-model database.
SurrealDB is a genuinely novel approach to database architecture — one that eliminates the need to stitch together separate relational, document, graph, and vector databases. Its multi-model engine lets you store and query data in any paradigm, all within a single database with a unified query language we've found remarkably productive.
We recommend SurrealDB when your application needs more than one data model but you don't want the operational complexity of managing multiple databases. Instead of running PostgreSQL for relational data, Neo4j for graph relationships, and Pinecone for vector search, SurrealDB handles all three — and lets you combine them in a single query. Find all products with similar embeddings that were purchased by friends of the current user: that's one SurrealQL query, not three separate systems to coordinate.
The built-in Row-Level Security is another standout feature. Security policies are defined at the database level using SurrealQL, not scattered across application code. Each user sees only the data they're authorized to access, enforced by the query engine itself — no middleware, no attribute-based access control frameworks, no risk of a forgotten check in a controller.
For AI applications, SurrealDB's native vector support is a game-changer. Store embeddings alongside your source data, query by semantic similarity with filters on any field, and combine vector search with graph traversal or relational joins — all without a separate vector database, synchronization pipeline, or complex architecture. It's a genuinely simpler approach to building AI-powered applications.
Where SurrealDB fits in the stack
Understanding the architectural role of SurrealDB in modern applications.
Unified database replacing PostgreSQL + Neo4j + vector DB
SurrealDB can serve as your single database for applications that need relational data, graph relationships, and vector search. This eliminates synchronization overhead, reduces operational complexity, and enables cross-model queries that are impossible with separate databases.
Real-time app backend with live queries
SurrealDB's live query subscriptions enable real-time application features without WebSocket infrastructure. Subscribe to a query, and SurrealDB pushes changes whenever the underlying data changes — ideal for collaborative apps, live dashboards, and real-time feeds.
AI application backend with vector search
Store embeddings from OpenAI, Claude, or any embedding model alongside your relational data. Run similarity searches combined with traditional filters — "find support articles similar to this query that were published in the last month" — all in a single query without a separate vector database.
Multi-tenant SaaS with built-in RLS
SurrealDB's Row-Level Security makes multi-tenant architectures simple. Define policies like WHERE tenant_id = $auth.tenant_id at the database level — no middleware, no query filters in application code, no risk of data leakage between tenants.
How to choose the right SurrealDB for the job
Guidance on when SurrealDB is the right choice — and when it isn't.
When to choose SurrealDB
A decision framework for project leaders.
Ideal for
- Applications needing graph, document, and relational models
- AI-powered apps with vector search and embedding storage
- Real-time applications with live query subscriptions
- Multi-tenant systems requiring Row-Level Security
- Projects wanting to reduce database complexity with one engine
Less suited for
- High-volume OLTP workloads where PostgreSQL excels
- Teams already deeply invested in another multi-model database
- Use cases requiring mature ecosystem and third-party tooling
- Very large datasets where specialized engines are more efficient
Ready to simplify your database stack?
Let's explore how SurrealDB can replace multiple databases with one unified engine.
Get in touch