ActiveRecord (Rails)
From Wikipedia, the free encyclopedia
ActiveRecord is a Ruby library that implements the like-named object-relational mapping (ORM) pattern 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. | ” |
It creates a persistable domain model from business objects and database tables, where logic and data are presented as a unified package.
ActiveRecord adds inheritance and associations to the pattern above, solving two substantial limitations of that pattern. A set of macros acts as a domain language for the latter, and the SingleTableInheritance pattern is integrated for the former; thus, ActiveRecord increases the functionality of the active record pattern approach to database interaction.
ActiveRecord is the default model component of the Model-view-controller web-application framework Ruby on Rails, and is also a stand-alone ORM package for other Ruby applications. In both forms, it was conceived of by David Heinemeier Hansson, and has been improved upon by a number of contributors.

