The database that speaks ORM natively. No more N+1 queries. No more impedance mismatch. Just declare your model graph and let the database do the rest.
Traditional databases force ORMs to translate object graphs into SQL, leading to:
- N+1 query problems that kill performance
- Impedance mismatch between objects and tables
- Risky migrations that require downtime
- Cache invalidation headaches with no built-in solution
ORMDB flips this around. The database understands your entities, relations, and constraints natively.
// Fetch a user with their posts and comments in ONE round-trip
const user = await db.fetch({
entity: "User",
where: { id: userId },
include: {
posts: {
include: { comments: true }
}
}
});- Graph Fetches - Fetch entire object graphs in a single query
- Native Relations - First-class support for one-to-one, one-to-many, and many-to-many
- ACID Transactions - Full relational guarantees with constraints and joins
- Safe Migrations - Online schema changes with automatic safety grading
- Change Streams - Built-in CDC for cache invalidation and real-time updates
- ORM Adapters - Drop-in support for Prisma, Drizzle, TypeORM, SQLAlchemy, and more
- Vector Search - HNSW-indexed k-nearest neighbor search for embeddings
- Geo Search - R-tree indexed geographic queries (radius, bounding box, polygon)
- Full-Text Search - BM25 ranked text search with phrase and boolean support
# Install the server
cargo install ormdb-server
# Or build from source
git clone https://github.com/incredlabs/ormdb.git
cd ormdb
cargo build --releaseormdb-server --data-dir ./data --port 5432TypeScript (Prisma adapter)
npm install @ormdb/clientimport { OrmdbClient } from '@ormdb/client';
import { PrismaAdapter } from '@ormdb/client/prisma';
const client = new OrmdbClient({ url: 'ormdb://localhost:5432' });
const prisma = new PrismaAdapter(client);Python (SQLAlchemy adapter)
pip install ormdb[sqlalchemy]from sqlalchemy import create_engine
engine = create_engine("ormdb://localhost:5432/mydb")| Guide | Description |
|---|---|
| Getting Started | Installation and first steps |
| Core Concepts | Graph queries, MVCC, storage architecture |
| Tutorials | Schema design, querying, mutations |
| ORM Adapters | Prisma, Drizzle, TypeORM, SQLAlchemy, Django |
| API Reference | Query API, mutations, configuration |
docs/architecture.md- System layers and execution pathsdocs/modeling.md- Schema model, relations, and constraintsdocs/querying.md- Graph fetch semantics and output shapesdocs/migrations.md- Online-safe migration enginedocs/security.md- RLS, field-level controls, auditing
ormdb/
├── crates/
│ ├── ormdb-core/ # Storage engine, query executor, catalog
│ ├── ormdb-server/ # Standalone database server
│ ├── ormdb-proto/ # Wire protocol (rkyv zero-copy)
│ ├── ormdb-lang/ # Query language parser
│ ├── ormdb-client/ # Rust client library
│ ├── ormdb-cli/ # Command-line interface
│ └── ormdb-gateway/ # HTTP/REST gateway
├── clients/
│ ├── typescript/ # @ormdb/client + ORM adapters
│ └── python/ # Python client + SQLAlchemy/Django
└── docs/ # Architecture documentation
ORMDB is designed to outperform traditional ORM+database stacks on graph-shaped queries.
# Run benchmarks
cargo bench
# Compare against SQLite and PostgreSQL
./scripts/run-comparison.shSee docs/benchmarks.md for methodology and results.
We welcome contributions! Please see our Contributing Guide for details.
# Development setup
git clone https://github.com/incredlabs/ormdb.git
cd ormdb
cargo build
cargo testSee docs/roadmap.md for implementation phases and milestones.
Current Status: Alpha (v0.1.0)
- GitHub Issues - Bug reports and feature requests
- Documentation - Full documentation site
This project is licensed under the MIT License.
Created by Dipankar Sarkar at Skelf Research