Doma
Doma: A self-hosted database framework for teams that want generated, type-safe queries. Ranked #7 of 51 in Database Query Builders by our editors (7.9/10); pricing: Free plan; best for java or Kotlin teams wanting generated, type-safe queries.
At a glance
- Editor score7.9 / 10
- PricingFree plan
- Best forJava or Kotlin teams wanting generated, type-safe queries
- Free planYes
- Paid fromNone
- Type safetyStatic
- Facts checked4 Oct 2026
Where it wins
- Compile-time checks and generated metamodels catch query issues during compilation.
- Criteria and SQL builder APIs cover search, insert, update, and delete.
- Eight SQL dialects plus Spring Boot and Quarkus integrations.
Where it doesn't
- Self-hosted library, not a managed database service.
- Asynchronous queries are not supported.
- Kotlin projects use the separate doma-kotlin library.
Our verdict on Doma
Doma is an open-source database access framework for Java and Kotlin teams that want DAO-oriented mapping and query construction with static type safety. It provides a Unified Criteria API and SQL builders for search, insert, update, and delete, along with SQL templates and entity mapping. Compile-time checks and annotation processing generate source code and metamodels; developers can also inspect generated SQL without executing it. It is a library to deploy within a self-hosted application, rather than a hosted database service, and its published use cases span solo projects through enterprise teams.
The central distinction is how Doma balances generated queries with SQL control. The criteria and builder APIs support structured query construction, while SQL templates with conditional directives provide another way to express queries. A raw SQL escape hatch is available, and dialect configuration covers DB2, H2, HSQLDB, Microsoft SQL Server, MySQL, Oracle Database, PostgreSQL, and SQLite. Static type safety and query compilation suit teams that value checks during compilation; teams needing asynchronous queries should look elsewhere, since that capability is not supported.
Doma fits Java and Kotlin applications that can include a database library in their own deployment and want generated code rather than a hosted query service. Documentation covers Spring Boot and Quarkus integrations, and Kotlin usage is through the separate doma-kotlin library. The project is published under the Apache-2.0 license, with documentation and community support. Its focus is database access and mapping, not a managed environment or a broad application platform. Choose it when compile-time query checks, DAO mapping, and dialect options match the team's stack; consider another approach if asynchronous query support or a managed service is a requirement.
Your product? Our editors can test Doma in depth and publish a review, labelled as paid · from $99/mo →
Doma pricing
Doma fact sheet
| Free plan | Yes |
|---|---|
| Paid from | None |
| Languages | Java, Kotlin |
| SQL dialects | DB2, H2, HSQLDB, Microsoft SQL Server, MySQL, Oracle Database, PostgreSQL, SQLite |
| Type safety | Static |
| Async queries | No |
| Raw SQL support | Yes |
| Compile without execution | Yes |
| Deployment | Self-hosted |
| Support | Community, Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 2 integrations: Spring Boot, Quarkus |
| Pricing | Free plan |
| Website | docs.domaframework.org |
| Facts checked | 4 Oct 2026 |
Doma integrations
Doma lists 2 integrations on its own site.
- Spring Boot
- Quarkus
Alternatives to Doma
- jOOQA fluent SQL framework for JVM teams that want generated, type-safe database access.9.3
- SQLAlchemySQL construction, ORM, and database services for Python applications.9.1
- JetBrains ExposedA free, open-source Kotlin library with a type-safe SQL DSL and JDBC and R2DBC access.9.0
Doma vs the competition
- Doma vs jOOQ
- Doma vs SQLAlchemy
- Doma vs JetBrains Exposed
- Doma vs Laravel Query Builder
- Doma vs Doctrine DBAL QueryBuilder
- Doma vs gsql
Compare Doma with any tool side by side →
Used Doma? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used Doma for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
Doma is listed in our Database Query Builders directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/doma/"><img src="https://www.itechguides.com/best/badge/doma.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. How we rank.
Last updated · How we research and update
