Doctrine DBAL is a PHP database abstraction layer with schema introspection and schema management features. Applications import it via Composer to talk to many SQL backends through one API.
Overview
Doctrine Database Abstraction Layer (DBAL) is a PHP package that sits between application code and SQL databases. It focuses on abstracting connections and queries while offering tooling to inspect and manage database schemas.
The project documents installation through Composer and maintains separate release lines with documentation for each. It is widely depended on across the PHP ecosystem as a lower-level companion to higher-level Doctrine tools.
DBAL targets developers who need portable SQL access and programmatic schema operations without binding their code to a single database vendor API. Topic tags on the project reference common engines including MySQL, PostgreSQL, Oracle, DB2, SQLite, SQL Server, and MariaDB.
Key features
- Database abstraction for PHP applications
- Schema introspection
- Schema management helpers
- Composer-based installation
- Multiple SQL engine topic coverage
- Documented release lines
- Issue tracker and project website
Use cases
- Portable SQL code across database vendors
- Automated schema inspection in PHP apps
- Shared data access layer in Doctrine stacks
- Backend integration for MySQL or PostgreSQL services