ormDB
Alpha v0.1.0 — Open Source (MIT)

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

Your Application
ORM (Prisma, Django, etc.)
SQL Translation Layer

Objects → SQL strings → flat rows → objects

PostgreSQL / MySQL
  • 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

Your Application
ORM (Prisma, Django, etc.)
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.

How ormDB eliminates N+1 →
🔀

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.

How graph queries work →
⚠️

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.

Learn about migration grading →
🗑️

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.

How change streams work →

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.

Traditional ORM + PostgreSQL (N+1)
// 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

Same ORM + ormDB (single query)
// 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.

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.

Learn about consulting