SurrealDB is a multi-model database — document, graph, key-value, and time-series in one. It includes auth, permissions, real-time queries, and a built-in API.
What You Get for Free
- Multi-model — documents, graph, KV, time-series
- SurrealQL — SQL-like with graph traversal
- Built-in auth — JWT, scopes, record-level permissions
- Real-time — live queries via WebSocket
- REST + WebSocket API — no backend needed
- Embedded or server — use as library or service
- Single binary — Rust, no dependencies
Quick Start
surreal start --user root --pass root memory
SurrealQL
-- Create records
CREATE user SET name = 'Alice', email = 'alice@example.com';
-- Graph relations
RELATE user:alice->follows->user:bob;
-- Traverse graph
SELECT ->follows->user.name FROM user:alice;
-- Live query
LIVE SELECT * FROM user;
SurrealDB vs MongoDB + Neo4j
| Feature | SurrealDB | MongoDB + Neo4j |
|---|---|---|
| Models | All-in-one | Separate DBs |
| Graph | Built-in | Neo4j needed |
| Auth | Built-in | External |
| Query | SurrealQL | MQL + Cypher |
Need database architecture? Check my work on GitHub or email spinov001@gmail.com for consulting.
Top comments (0)