PHP libraries that implement the active record pattern for database interaction and object relational mapping.
This project is a MongoDB Eloquent ORM and NoSQL query builder for the Laravel framework. It provides an active record implementation that maps MongoDB collections and documents to programmable models for data manipulation. The system enables schemaless data management, allowing applications to handle dynamic data structures without the need for rigid database migrations or predefined tables. It integrates MongoDB into Laravel applications to store and retrieve flexible document data using standard PHP patterns. The library covers document store querying and Eloquent model mapping, utilizing a fluent interface to construct and execute database queries without requiring raw query language.
This library provides an Active Record implementation for MongoDB within the Laravel ecosystem, offering a fluent query builder and relationship management that aligns with your requirements, though it is specifically tailored for NoSQL rather than traditional relational databases.
This project is a MongoDB database driver and object-relational mapper that brings MongoDB support to the Laravel Eloquent model and query builder. It provides a NoSQL model mapper that allows MongoDB collections to be mapped to object-oriented models using the Active Record pattern. The integration enables the use of a fluent query builder for constructing queries and aggregation pipelines without writing raw database syntax. It supports schema-less model integration, allowing applications to manage unstructured data while maintaining compatibility with standard object-oriented patterns. The library covers a broad range of document database capabilities, including geospatial querying, atomic field updates, and document array manipulation. It includes tools for database management such as index configuration, transaction management, and soft deletions, as well as a backend implementation for managing job queues and failure logs. The system also provides specialized base classes for identity management and user authentication using a MongoDB backend.
This library implements the Active Record pattern for MongoDB within the Laravel ecosystem, providing a fluent query builder and relationship management that fits the requested ORM functionality, though it is specifically tailored for a NoSQL document store rather than traditional relational databases.
This project is a full-stack web framework that provides a comprehensive environment for building server-side applications. It utilizes a model-view-controller architecture to separate application logic into distinct layers for data management, user interface presentation, and request handling. The platform manages the entire request-response lifecycle, including security, session handling, and background task processing, while using an object-relational mapping layer to translate database records into programmable objects. The framework distinguishes itself through a central service container that manages class instantiation and dependency resolution to decouple application components. It facilitates rapid development by providing pre-built components for common tasks such as authentication and database management. Developers interact with databases through a fluent query builder abstraction and manage schema changes through version-controlled code files, ensuring consistency across environments. The system architecture is built around a route-based request dispatcher and a middleware pipeline that filters incoming data before it reaches core logic. It includes a template engine that compiles server-side views into plain code for execution, and an event-driven observer pattern that allows components to communicate without direct coupling. Modular service providers handle the bootstrapping of application services during the startup phase.
This is a full-stack web framework that includes Eloquent, a robust implementation of the Active Record pattern, providing the fluent query builder, migration support, and relationship management you need for database interactions.
Laravel is a comprehensive full-stack web framework designed for building scalable server-side applications. It provides an integrated development environment that centers on an object-relational mapper for database abstraction, a robust routing system, and a sophisticated service container for dependency injection. The framework is built to handle complex application requirements through a modular architecture that emphasizes convention over configuration. What distinguishes Laravel is its deep integration of background processing and event-driven communication. It features a task queue orchestrator that manages asynchronous job execution, retries, and worker lifecycles, allowing developers to offload resource-intensive operations from the main request cycle. This is complemented by an event-driven observer pattern that decouples application logic, enabling components to trigger and listen for asynchronous events across the system. The framework also provides a complete suite of tools for maintaining data integrity and application reliability. This includes a fluent schema migration system for version-controlled database evolution, a layered middleware pipeline for intercepting HTTP requests, and extensive testing utilities that support everything from database state assertions to simulated HTTP request cycles. These features are supported by a command-line interface that facilitates scaffolding, database management, and test suite execution.
Laravel includes Eloquent, a powerful and feature-rich Active Record ORM that provides a fluent query builder, relationship management, and migration support, though it is bundled as part of a full-stack framework rather than a standalone library.
Sequelize is an object-relational mapping library that provides a unified interface for managing relational data through code. By implementing the Active Record pattern, it maps database tables to application objects, allowing developers to perform standard create, read, update, and delete operations using high-level method calls. The library abstracts complex database interactions by translating these calls into optimized, engine-specific SQL statements, ensuring consistent behavior across different database systems. The project distinguishes itself through a comprehensive suite of tools for managing relational complexity and data integrity. It features a robust association system that supports one-to-one, one-to-many, and many-to-many relationships, including polymorphic associations and nested join mapping. To maintain consistency during complex operations, it includes an asynchronous transaction coordinator and a lifecycle management framework that triggers custom logic through hooks and validation rules. Furthermore, it provides a schema synchronization engine that aligns application model definitions with the underlying database structure, supporting versioned migrations to track changes over time. Beyond its core mapping capabilities, the library offers extensive support for database management and performance tuning. This includes connection pooling to manage concurrent requests, read replication for distributed query operations, and query scopes for reusable data retrieval patterns. It also provides native support for TypeScript, allowing for type-safe data definitions and model configurations. The library is designed for modular integration and includes utilities for query logging, custom data type definitions, and soft deletion.
This is a robust ORM for the Node.js ecosystem, but it is built for JavaScript and TypeScript rather than the PHP environment requested.
Yii2 is a professional PHP web framework designed for developing high-performance, scalable enterprise web applications. It utilizes a Model-View-Controller architecture to separate data logic, user interfaces, and request handling, ensuring maintainability for large-scale projects. The framework includes a built-in PHP code generator that automates the creation of boilerplate controllers and models by scanning database schemas. It provides an Active Record object-relational mapping system where classes represent tables and instances represent rows to manage data persistence. Additional capabilities include a comprehensive internationalization framework for extracting translatable strings and managing locale-specific messages. The system also supports component-based architecture via a service locator and uses front-controller routing to centralize request processing.
Yii2 is a full-stack web framework that includes a robust, built-in Active Record ORM implementation, making it a suitable choice if you are looking for a comprehensive solution that handles database interactions alongside application architecture.
Kysely is a TypeScript SQL query builder that provides a type-safe interface for constructing and executing database queries. It functions as a database layer that ensures schema compliance and prevents runtime errors by using a fluent interface and a programmable way to build complex SQL statements. The project features a type-safe database layer capable of inferring return types and aliases from SQL selections and joins. It also includes a SQL migration manager to track and apply schema changes across different environments to keep database versions synchronized. The toolkit covers relational database integration through dynamic query construction and the execution of raw SQL statements. It allows for the creation of parameterized SQL snippets and the ability to reference tables and columns dynamically at runtime.
This is a TypeScript-based SQL query builder rather than a PHP Active Record ORM, making it a different tool for database interaction that does not support the requested language or pattern.
Knex is a multi-dialect database client that provides a programmatic SQL query builder, a connection pool manager, and a versioned schema migration tool. It enables programmatic database interaction across multiple SQL engines, including PostgreSQL, MySQL, SQLite3, SQL Server, CockroachDB, and Oracle. The project distinguishes itself through a fluent interface for constructing complex SQL statements and a dedicated framework for database seeding. It utilizes specialized dialects to translate generic query representations into database-specific syntax while maintaining a consistent API across different vendors. The platform covers a broad range of relational database management capabilities, including atomic transaction control, schema definition, and relational constraint management. It also provides tools for query result pagination, stream-based processing for large datasets, and the ability to execute stored procedures and raw SQL expressions. A command-line interface is available for automating the execution of database migrations and seeding workflows.
This is a JavaScript-based SQL query builder and migration tool, which does not provide the PHP-based Active Record implementation required for your project.