Build
Connect & operate
Design & teams
Start hereScope a build in one callBring a spec, a wireframe, or a paragraph. You leave with an architecture, a timeline, and a number.Book a scoping call
AI software
LLM & data systems
Vibe coding
Ready to ship?Put AI where the work isAgents, RAG, and private LLMs wired into the systems your team already uses — not a chatbot bolted to a homepage.Discuss an AI project
Domain firstWe learn your workflow before we model itRegulated, operational, or high-volume — the constraints belong in the schema, not in a training doc.Talk about your domain
Plan smarterEstimate before you commitCost ranges, scope templates, and the questions we ask in discovery — free, no form.Open the cost calculator
Real conversationsTalk with a technical leadNo SDR, no discovery gauntlet. The person on the call is the one who scopes the build.Book a call
Open-Source Databases · SeaQL

sea-orm

SeaORM is a Rust ORM library for relational databases (PostgreSQL, MySQL, MariaDB, SQLite) with a focus on type safety and async support. It handles relationship modeling (1-1, 1-N, M-N), query generation, migrations, and nested object persistence through a batteries-included API.

Source: GitHub — github.com/SeaQL/sea-orm
9.8k
GitHub stars
714
Forks
Rust
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositorySeaQL/sea-orm
OwnerSeaQL
Primary languageRust
LicenseApache-2.0 — OSI-approved
Stars9.8k
Forks714
Open issues224
Latest release2.0.0-rc.42 (2026-07-04)
Last updated2026-07-08
Sourcehttps://github.com/SeaQL/sea-orm

What sea-orm is

SeaORM provides async/await-native database abstraction with smart entity loading (join for 1-1, data loader for 1-N to prevent N+1), macro-based entity definition, migration support, and raw SQL fallback. Version 2.0 introduces dense entity format with nested persistence and automatic schema synchronization.

Quickstart

Get the sea-orm source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/SeaQL/sea-orm.gitcd sea-orm# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

REST/GraphQL/gRPC API backends

SeaORM is explicitly designed for building web service APIs. Includes filtering, pagination, nested queries, and multiple web framework integrations (Actix, Axum, Rocket, Poem).

Multi-database applications requiring type safety

Single codebase works across PostgreSQL, MySQL, SQLite, and MariaDB with compile-time type checking and dialect-aware SQL generation.

Applications with complex relational schemas

Smart entity loader and nested persistence eliminate boilerplate for complex relationships; M-N relations with junction tables are first-class citizens.

Implementation considerations

  • Async runtime required; Tokio is the primary ecosystem. Integration with sync code requires bridge patterns or `sea-orm-sync`.
  • Entity definition via macros; `sea-orm-cli` can generate from existing databases, reducing hand-coding but introducing tooling dependency.
  • Migration management is built-in but requires explicit schema versioning; entity-first workflow (2.0) automates detection but requires `entity-registry` and `schema-sync` features.
  • Nested persistence (2.0) simplifies object graphs but only works with dense entity format; older sparse format not supported.
  • Raw SQL support mitigates limitation for complex queries, but parameterization via `raw_sql!` macro requires careful attention to prevent injection.

When to avoid it — and what to weigh

  • Synchronous-only requirement — SeaORM is async-first. Synchronous support exists via optional `sea-orm-sync` crate but is not the primary path.
  • Non-relational database primary storage — SeaORM is built for SQL databases only. NoSQL, document stores, or key-value systems are out of scope.
  • Minimal dependency footprint critical — SeaORM brings a full ecosystem (tokio, sqlx, migrations). Lightweight projects may prefer lower-level database drivers.
  • Unstable schema or prototype-stage projects — While entity-first workflow (2.0) aids iteration, generation and migration workflows add overhead vs. raw SQL for highly experimental codebases.

License & commercial use

Apache License 2.0 (Apache-2.0). Permissive OSI-approved license allowing commercial use, modification, and distribution with attribution and liability disclaimer.

Apache-2.0 is a permissive license compatible with commercial use. No royalties, proprietary modifications allowed. Attribution required in documentation. Consult your legal team for enterprise compliance (patents, indemnification scope).

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Parameterized queries via `raw_sql!` macro help prevent SQL injection; however, responsibility lies with developer to use macros correctly. No security audit history provided in data. Connection pooling and driver-level security inherit from underlying database drivers (sqlx). Review password handling, connection secrets management, and query logging in production deployments.

Alternatives to consider

sqlx

Lower-level async SQL toolkit; more control, less abstraction. Suitable for smaller queries or non-relational workloads.

Diesel

Synchronous Rust ORM with strong compile-time checking. Preferred if async is not required and type safety at compile time is paramount.

Tokio-native custom queries / async-sqlx wrapper

Avoid ORM overhead entirely for simple CRUD or specialized query patterns; trade convenience for minimal footprint.

Software development agency

Build on sea-orm with DEV.co software developers

Our Rust engineers can architect your API backend, optimize queries, and manage database migrations. Let's discuss your relational data needs.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

sea-orm FAQ

Does SeaORM support NoSQL databases?
No. SeaORM is designed exclusively for relational SQL databases (PostgreSQL, MySQL, MariaDB, SQLite).
Can I use SeaORM in a synchronous context?
Primarily no; SeaORM is async-first with Tokio. Optional `sea-orm-sync` crate provides synchronous API for lightweight use cases (e.g., CLI with SQLite).
How does SeaORM prevent N+1 queries?
Smart entity loader uses joins for 1-1 relations and data loaders for 1-N, consolidating results in multiple targeted queries. Nested queries with `.with()` specify preload strategy explicitly.
Is SeaORM production-ready?
Yes. 250k+ weekly downloads, 9,777 stars, active development (last push 2026-07-08), and claimed adoption by startups and enterprises. Version 2.0 is in release candidate stage (2.0.0-rc.42).

Build it with a software development company

Pairing sea-orm with the rest of your stack is where most open-source databases projects stall. DEV.co is a software development agency that does the integration work — plus AI development when models are in scope.

Ready to build with SeaORM?

Our Rust engineers can architect your API backend, optimize queries, and manage database migrations. Let's discuss your relational data needs.