Active Record connects business objects and database tables to create a persistable domain model where logic and data is presented in one wrapping. It’s an implementation of the object-relational mapping (ORM) ”pattern” by the same name as described by Martin Fowler:
An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.
Active Record's main contribution to the pattern is to relieve the original of two stunting problems: lack of associations and inheritance. By adding a simple domain language-like set of macros to describe the former and integrating the SingleTableInheritance pattern for the latter, Active Record narrows the gap of functionality between the data-mapper and active record approach.
Active Record is also the model part of the php framework Akelos.
Forget XML configuration files. Active Record is configured on-the-fly without a need for a build phase.
MySQL, PostgreSQL (7.4+), and SQLite are supported out of the box. Oracle, MSSQL and others are supported but not verified as Akelos.
Active Record uses transactions to ensure that dependent deletes are carried out atomically and you can write your own transaction-safe methods as well.
Describe relationships between classes using natural-language macros, such as has_many and belongs_to.
Put the business object in charge of determining the validity of its attributes.
Manage multiple locales of the same value using multilingual columns by prefixing column names with a locale code.
Built in events allow you to intercept the model during its life cycle.
Make a model act a list, tree, nested set or define your own easily.
Handy functionality for performing calculations like count, average, minimum, sum, maximum…