Active record pattern
From CSSEMediaWiki
Revision as of 21:24, 17 October 2010 by James Ashford (Talk | contribs)
An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.
How it works
An object is directly related to the row in a table or view. It is very similar to the Row data gateway pattern except that it contains the behavior of the object (as well as the data).
When to use it
Simple objects with simple business rules.