Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience real numbers from our own analytics — open to see them
–Visitors
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · counted by iTechGuides's own first-party analytics, bots removed, every figure rounded down · how we count

Head-to-head · Database Query Builders

Doctrine DBAL QueryBuilder vs Doma

  • Updated Oct 2026
  • Both researched from official sources
  • 4 checks side by side
Higher score Doctrine DBAL QueryBuilder #5 in Database Query Builders 8.7/10 Free plan Free plan✓ 2 of 3 features Visit Doctrine DBAL
Doma #7 in Database Query Builders 7.9/10 Free plan Free plan✓ 2 of 3 features Visit Doma

Doctrine DBAL QueryBuilder leads on 0 checks, Doma on 0, and 4 are even. Who comes out ahead on the 4 yes/no, price and count checks where we have data for both products. The editor score weighs everything else too.

Our verdict

  • Highest scoreDoctrine DBAL QueryBuilder · 8.7/10
  • Free planboth

Doctrine DBAL QueryBuilder scores higher on our rubric for database query builders: 8.7 against 7.9 out of 10; our editors rank them #5 and #7.

On type safety, Doma gives you Static where Doctrine DBAL QueryBuilder offers None.

Doctrine DBAL QueryBuilder is the better fit for PHP teams needing a standalone SQL query builder. Doma is the better fit for java or Kotlin teams wanting generated, type-safe queries.

  • Doctrine DBAL QueryBuilder fits best

    PHP teams needing a standalone SQL query builder

  • Doma fits best

    Java or Kotlin teams wanting generated, type-safe queries

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.

Side by side

Feature Doctrine DBAL QueryBuilder 8.7/10 Visit ↗ Doma 7.9/10 Visit ↗
At a glance
Editor score 8.7 7.9
Ranking #5 in Database Query Builders #7 in Database Query Builders
Best for PHP teams needing a standalone SQL query builder Java or Kotlin teams wanting generated, type-safe queries
Pricing model Free Free
Starting price Free plan Free plan
Free plan ✓ ✓
Free trial — —
Deployment Self-hosted Self-hosted
Support Community Community, Docs
Built for Solo, Small business, Mid-market, Enterprise Solo, Small business, Mid-market, Enterprise
Features Doctrine DBAL QueryBuilder 2/3 · Doma 2/3
Async queries — —
Raw SQL support ✓ ✓
Compile without execution ✓ ✓
Specs
Languages PHP Java, Kotlin
SQL dialects MySQL, MariaDB, Oracle, Microsoft SQL Server, PostgreSQL, IBM Db2, SQLite DB2, H2, HSQLDB, Microsoft SQL Server, MySQL, Oracle Database, PostgreSQL, SQLite
Type safety None Static
Our review
Pros
  • Builds SELECT, INSERT, UPDATE and DELETE statements, plus CTEs and UNIONs
  • Binds named or positional parameters and compiles queries to SQL text
  • Abstracts SQL generation across seven database platforms
  • 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.
Cons
  • Offers no type safety
  • Does not support asynchronous queries
  • Uses self-hosted deployment with community support
  • Self-hosted library, not a managed database service.
  • Asynchronous queries are not supported.
  • Kotlin projects use the separate doma-kotlin library.
Our verdict

Doctrine DBAL QueryBuilder is a PHP library for constructing SQL through a fluent API, and it can be used independently of Doctrine ORM. It is suited to PHP developers who want a standalone way to assemble queries before execution,…

Read the review →

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…

Read the review →
  1. Doctrine DBAL QueryBuilderDatabase Query Builders 8.7Free plan
  2. DomaDatabase Query Builders 7.9Free plan

Strengths and trade-offs

  • Doctrine DBAL QueryBuilder — where it wins

    • Builds SELECT, INSERT, UPDATE and DELETE statements, plus CTEs and UNIONs
    • Binds named or positional parameters and compiles queries to SQL text
    • Abstracts SQL generation across seven database platforms

    Where it doesn't

    • Offers no type safety
    • Does not support asynchronous queries
    • Uses self-hosted deployment with community support
  • Doma — 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.

More comparisons

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

Last updated · How we research and update