awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
doctrine avatar

doctrine/dbal

0
View on GitHub↗
9,699 stars·1,375 forks·PHP·MIT·28 viewswww.doctrine-project.org/projects/dbal.html↗

Dbal

This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting with multiple relational database systems. It includes a driver wrapper to standardize connections and result sets, a fluent query builder for constructing portable SQL statements, and a type mapper for converting database-specific data types into native application types and vice versa.

The library enables programmatic schema management through a schema manager that can introspect database metadata, model structures as objects, and generate the SQL required to migrate between different schema versions. It also supports a middleware-based execution pipeline, allowing the interception of database operations for logging or profiling.

The system covers a broad range of database capabilities, including portable SQL generation for various dialects, transaction management with support for savepoints and isolation levels, and security primitives such as prepared statements and parameter binding to prevent SQL injection. It also provides utilities for result set normalization and CRUD operation helpers.

The project includes a command-line interface for executing raw SQL statements directly against database connections.

Features

  • Database Abstraction Layers - Provides a consistent object-oriented interface for interacting with multiple relational database systems via a unified abstraction layer.
  • Fluent Query Construction - Provides a fluent query builder for programmatically constructing portable SQL statements using method chaining.
  • Schema and Migration Tools - Analyzes differences between two schema representations and generates the SQL required to migrate between them.
  • Bidirectional Type Mappers - Includes a type mapper for converting database-specific data types into native application types and vice versa.
  • Connection Establishment - Establishes authenticated sessions with relational databases using configuration parameters or connection strings.
  • Data Type Mappings - Converts data types between a relational database and the application using built-in and user-defined mappings.
  • Database Driver Abstractions - Implements a driver wrapper that standardizes connections and result sets across various relational database vendors.
  • Database Drivers - Implements custom adapters and middleware to connect applications to proprietary or specialized relational database APIs.
  • Database Object Abstractions - Represents tables, columns, and indexes as structured objects to ensure consistent normalization and quoting.
  • Database Agnostic Generators - Provides a mechanism to generate SQL that is compatible across different database vendors and versions.
  • Schema Introspection - Retrieves detailed metadata about tables, columns, and indexes to create an in-memory representation of the schema.
  • Database Schema Managers - Programmatically inspects, models, and modifies database structures like tables and indexes using an object-oriented approach.
  • Database Transaction Management - Controls groups of database operations as single units of work with support for savepoints and isolation levels.
  • Object Oriented Querying - Offers a consistent object-oriented interface to interact with multiple relational database vendors.
  • Prepared Statements - Implements prepared statements using placeholders to ensure security against injection and enable statement reuse.
  • SQL Placeholder Bindings - Uses positional and named placeholders to separate SQL logic from input data and prevent injection attacks.
  • Relational Database Abstractions - Provides a consistent object-oriented interface to interact with multiple relational database systems regardless of vendor.
  • Programmatic Schema Forge Tools - Provides a programmatic API to execute DDL statements and control database structure without writing raw SQL.
  • SQL Dialect Adapters - Adapts queries to ensure compatibility and feature support across different relational database platforms.
  • Dialect-Specific SQL Generation - Translates abstract query requests into dialect-specific SQL strings based on the connected database version.
  • SQL Query Builders - Ships a fluent query builder for programmatically constructing portable SQL statements across different dialects.
  • Portable SQL Generation - Creates database-specific queries and schema definitions that work across different relational database engines and versions.
  • Database Wrappers - Implements a driver wrapper that standardizes connections and result sets across different relational database vendors.
  • Format Conversions - Translates application objects into the specific string formats required by the underlying database platform.
  • Type Mapping - Provides a system for translating database-specific data types into native application types and vice versa.
  • SQL Injection Prevention - Implements security primitives using prepared statements and parameter binding to prevent SQL injection attacks.
  • Database Type Converters - Translates database-specific data types into native language types to ensure consistent data handling.
  • Schema Modeling Objects - Creates an object-oriented representation of tables, sequences, and indexes to generate platform-specific SQL.
  • Common Table Expressions - Supports the creation of named temporary result sets using Common Table Expressions (CTEs) within queries.
  • Savepoints - Emulates nested transactions by managing SQL savepoints to allow partial rollbacks within a single connection.
  • Application Type Mappings - Enables implementing custom conversion logic between application objects and database values via an extensible type system.
  • Database Type Mappings - Allows overriding default vendor type mappings to control how database columns are interpreted by the application.
  • Nested Transactions - Emulates nested transactions using SQL savepoints to allow partial rollbacks within a single connection.
  • Retriable Transactions - Identifies transient failures like deadlocks to trigger automatic retry logic for transactions.
  • Autoincrement Implementations - Creates self-incrementing primary keys using identity columns to ensure consistent ID generation across platforms.
  • Indexes and Constraints - Creates and manages indexes and foreign key constraints across different database platforms.
  • In-Memory Schema Representations - Represents database structures as an object graph to calculate differences and generate migration SQL.
  • Query Expression Builders - Includes a dedicated expression builder for generating nested logic and comparison snippets for SQL filters.
  • Query Result Fetching - Allows retrieving query results as associative arrays, numeric arrays, or indexed key-value pairs.
  • Array Placeholder Expansion - Rewrites SQL queries to flatten arrays into placeholder lists for use in IN expressions.
  • Portable Snippets - Generates vendor-specific SQL snippets and function calls to ensure consistent execution across different engines.
  • SQL CRUD Operations - Provides simplified CRUD operation helpers to insert, update, or delete rows using associative arrays.
  • SQL Literal Escaping - Quotes and escapes string values to ensure they are treated as literals within database statements.
  • Transaction Demarcation & Isolation - Provides manual transaction demarcation and the ability to configure isolation levels for units of work.
  • Middleware Pipelines - Includes a middleware-based execution pipeline for intercepting database operations for logging and profiling.
  • Database Operation Interceptors - Features a middleware-based execution pipeline to intercept database operations for logging and profiling.

Star history

Star history chart for doctrine/dbalStar history chart for doctrine/dbal

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Dbal

Similar open-source projects, ranked by how many features they share with Dbal.
  • doctrine/ormdoctrine avatar

    doctrine/orm

    10,172View on GitHub↗

    Doctrine ORM is a PHP object-relational mapper that connects application objects to relational database tables. It uses the data mapper and identity map patterns to decouple the in-memory object model from the database schema, allowing developers to manage data persistence without writing manual SQL. The project features a dedicated object-oriented query language and programmatic builder for retrieving data based on entities rather than tables. It implements a unit-of-work system to track object changes during a request and synchronize them via atomic transactions. The capability surface inc

    PHPhacktoberfest
    View on GitHub↗10,172
  • lib/pqlib avatar

    lib/pq

    9,903View on GitHub↗

    pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection library and protocol implementation that translates application data types into the binary and text formats required by PostgreSQL. The project provides specialized utilities for high-performance data ingestion using bulk data loading and a dedicated bulk data importer. It also features an implementation for listening to asynchronous server notifications and provides tools for connection load balancing across multiple hosts and ports. The driver covers a broad surface of database i

    Go
    View on GitHub↗9,903
  • sqlalchemy/sqlalchemysqlalchemy avatar

    sqlalchemy/sqlalchemy

    11,612View on GitHub↗

    SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a

    Pythonpythonsqlsqlalchemy
    View on GitHub↗11,612
  • codeigniter4/codeigniter4codeigniter4 avatar

    codeigniter4/CodeIgniter4

    5,924View on GitHub↗

    CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web applications. It provides a lightweight toolkit with minimal configuration, organizing application logic into controllers, models, and views for clean separation of concerns. The framework includes a fluent query builder for constructing SQL statements programmatically, PSR-4 autoloading with namespace mapping, and a service-based dependency injection container for managing shared class instances. The framework distinguishes itself through its comprehensive set of built-in tools

    PHPcodeignitercodeigniter4framework-php
    View on GitHub↗5,924
See all 30 alternatives to Dbal→

Frequently asked questions

What does doctrine/dbal do?

This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting with multiple relational database systems. It includes a driver wrapper to standardize connections and result sets, a fluent query builder for constructing portable SQL statements, and a type mapper for converting database-specific data types into native application types and vice versa.

What are the main features of doctrine/dbal?

The main features of doctrine/dbal are: Database Abstraction Layers, Fluent Query Construction, Schema and Migration Tools, Bidirectional Type Mappers, Connection Establishment, Data Type Mappings, Database Driver Abstractions, Database Drivers.

What are some open-source alternatives to doctrine/dbal?

Open-source alternatives to doctrine/dbal include: doctrine/orm — Doctrine ORM is a PHP object-relational mapper that connects application objects to relational database tables. It… lib/pq — pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection… sqlalchemy/sqlalchemy — SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for… codeigniter4/codeigniter4 — CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web… encode/databases — This project is an asyncio database abstraction layer that provides a common interface for performing non-blocking… go-pg/pg — pg is a PostgreSQL object-relational mapper (ORM) for Go that maps Go structs to database tables and provides a fluent…