# doctrine/dbal

Doctrine Database Abstraction Layer

Repository: https://github.com/doctrine/dbal
Canonical: https://ross.abutalabs.com/products/dbal
Homepage: https://www.doctrine-project.org/projects/dbal.html
Language: PHP
License: MIT
License Family: permissive
Topics: database, mysql, postgresql, oracle, ibm-db2, sqlite, sql-server, mariadb
Last push: 2026-08-13T14:32:30+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 94, longevity 100
- inputs: {"age_days": 5949, "days_push": 20, "days_rel": 43, "gap_med": 0, "n_releases_24m": 30}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9703, forks 1377 (observed 2026-08-28T04:10:36.853714+00:00)

## What it is
Doctrine DBAL is a PHP database abstraction layer providing a unified API over multiple database platforms such as MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and MariaDB. It offers database schema introspection, schema management, and portable query construction across supported drivers.

## Use cases
- connect to mysql and postgresql from php with one api
- manage database schema migrations across databases
- introspect existing database tables and columns
- write database-agnostic sql queries in php
- run raw sql queries with parameter binding
- support multiple database vendors in one application

## When to choose
- you need a vendor-agnostic database layer in PHP
- you want programmatic schema introspection or diffing
- you are building on top of Doctrine ORM or need its lower-level foundation

## When to avoid
- you want a full ORM with entity mapping and unit of work
- you use a language other than PHP
- you need only a thin native driver with no abstraction overhead

## Facets
- artifact type: library
- maturity: stable
- function: database, database-driver, orm
- domain: databases, backend, web-development, developer-tools
- platform: php, cross-platform
- tags: dbal, schema-management, sql-abstraction, doctrine, mysql, postgresql, sqlite, sql-server, oracle, mariadb

## Member repositories
- doctrine/dbal (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:36.853714+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:21:15.168907+00:00, confidence not recorded.
  - readme: https://github.com/doctrine/dbal (fetched 2026-08-28T04:10:36.853714+00:00, sha c79061d0cd11)
  - homepage: https://www.doctrine-project.org/projects/dbal.html (fetched 2026-08-29T08:20:59.423865+00:00, sha d7c0e6ae520e)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.4/index.html (fetched 2026-08-29T08:20:59.426576+00:00, sha 54156819b58f)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/index.html (fetched 2026-08-29T08:20:59.428799+00:00, sha 4204be1d2548)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.5/index.html (fetched 2026-08-29T08:20:59.430692+00:00, sha da152a54c0dd)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.3/index.html (fetched 2026-08-29T08:20:59.432472+00:00, sha 8fee630b41f1)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.2/index.html (fetched 2026-08-29T08:20:59.434663+00:00, sha 4ed22a75f4c8)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.1/index.html (fetched 2026-08-29T08:20:59.436626+00:00, sha e692ab22f812)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.0/index.html (fetched 2026-08-29T08:20:59.438567+00:00, sha 13056951c481)
  - site_page: https://www.doctrine-project.org/projects/doctrine-dbal/en/3.10/index.html (fetched 2026-08-29T08:20:59.440297+00:00, sha b1b4979b11cb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
