The database that speaks
ORM natively
ormDB is a relational database engine that replaces PostgreSQL. Keep your ORM. Swap your database. N+1 queries eliminated by design.
cargo install ormdb-server What is ormDB?
ormDB is a relational database engine written in Rust. It replaces PostgreSQL, MySQL, or SQLite as the database in your stack. Your ORM stays the same — ormDB understands what it's asking for.
Without ormDB
Objects → SQL strings → flat rows → objects
- N+1 queries on every relation traversal
- Impedance mismatch between objects and rows
- Migrations risk downtime and data loss
- No built-in cache invalidation
With ormDB
Native graph queries — no SQL translation needed
- Entire object graph in one round-trip
- Database understands entities and relations natively
- Migrations graded A-D with safety guarantees
- Built-in change streams for cache invalidation
The problems ormDB solves
These aren't ORM problems. They're database problems. ormDB fixes them at the source.
N+1 Queries
The Problem
Your ORM fires one query per relation. A page showing 10 users with their posts generates 11+ queries.
ormDB's Solution
ormDB returns entire object graphs in a single round-trip. Declare what you need, get it all at once.
Impedance Mismatch
The Problem
ORMs translate objects to SQL and back. Data is lost, mangled, or requires complex mapping layers.
ormDB's Solution
ormDB speaks entities and relations natively. No translation needed. Structured entity and edge blocks, not flat rows.
Risky Migrations
The Problem
ALTER TABLE on a large table can lock it for minutes. You find out it's destructive when it's too late.
ormDB's Solution
Every migration gets a safety grade: A (online, no blocking) through D (destructive). You know before you run it.
Cache Invalidation
The Problem
When data changes, how do your caches know? You build custom solutions, and they're always wrong.
ormDB's Solution
Built-in change streams with version tokens. Subscribe to entity and relation changes. Cache invalidation solved at the database level.
One query. Entire object graph.
Fetch a user with their posts and comments in a single round-trip. No N+1. No joins to reconstruct.
// Query 1: Get user
SELECT * FROM users WHERE id = 1;
// Query 2: Get user's posts
SELECT * FROM posts WHERE user_id = 1;
// Query 3-12: Get comments for each post
SELECT * FROM comments WHERE post_id = 101;
SELECT * FROM comments WHERE post_id = 102;
// ... 10 more queries 12+ round-trips to the database
// Your Prisma/Django code stays the same
// ormDB handles it in ONE round-trip
const user = await db.fetch({
entity: "User",
where: { id: userId },
include: {
posts: {
include: {
comments: true
}
}
}
}); 1 round-trip. Structured entity blocks returned.
Built for ORM workloads, from the ground up
ormDB is a complete relational database with ACID transactions, constraints, and joins — plus native support for graph queries, vector search, and change streams.
Core Database
The foundation: a relational database that understands ORM semantics natively
Graph Fetches
Fetch entire object graphs in a single round-trip. No more N+1 queries. Declare what you need, and ormDB returns structured entity and edge blocks.
Learn more →Native Relations
First-class support for one-to-one, one-to-many, and many-to-many relationships. Relations are part of the database schema, not an ORM afterthought.
Learn more →ACID Transactions
Full relational guarantees with constraints, foreign keys, and joins. MVCC-based isolation ensures consistent reads without blocking writes.
Learn more →ORM Adapters
Drop-in adapters for Prisma, Drizzle, TypeORM, Sequelize, Kysely, SQLAlchemy, and Django. Keep your ORM. Swap your database.
Learn more →Zero-Copy Protocol
Wire protocol based on rkyv zero-copy serialization. Sub-microsecond deserialization for large result sets. Memory-mapped result buffers.
Learn more →Search & Discovery
Vector, full-text, and geographic search built into the database
Vector Search
HNSW-indexed k-nearest neighbor search for AI embeddings. Store and query vectors alongside your relational data in a single database.
Learn more →Full-Text Search
BM25-ranked text search with phrase matching, boolean queries, and stemming. No need for a separate search engine like Elasticsearch.
Learn more →Geo Search
R-tree indexed geographic queries. Radius search, bounding box, and polygon containment built into the database.
Learn more →Security & Guardrails
Row-level security, query budgets, and audit logging
Row-Level Security
Policy-based access control at the row and field level. Audit logging with entity and field granularity. Capabilities-based auth built in.
Learn more →Query Budgets
Prevent runaway queries with limits on depth, fanout, total rows, and execution time. No more accidental full-table scans from ORM-generated queries.
Learn more →Operations
Safe migrations and real-time change streams
Safe Migrations
Every migration gets a safety grade (A through D). Online changes run without downtime. Destructive changes are flagged before they execute.
Learn more →Change Streams
Built-in CDC (Change Data Capture) with version tokens. Subscribe to entity and relation changes for real-time cache invalidation and event-driven architectures.
Learn more →Works with your ORM
Drop-in adapters for the ORMs you already use. Keep your code. Swap your database.
Ready to try ormDB?
ormDB is open source (MIT). Install it, point your ORM at it, and see N+1 queries disappear.
Need help with database architecture?
incredlabs consults on databases, distributed systems, and migration planning.