Content deleted Content added
Adding better references Tag: Reverted |
GraziePrego (talk | contribs) Adding local short description: "Concept in software engineering", overriding Wikidata description "design pattern for software that stores in-memory object data in relational databases, with interface functions for insert, update and delete, and properties corresponding to the columns in the underlying database table" |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Short description|Concept in software engineering}}
In [[software engineering]], the '''active record pattern''' is
The active record pattern is an approach to accessing data in a [[database]]. A [[database table]] or [[View (database)|view]] is wrapped into a [[class (computer science)|class]]. Thus, an [[object (computer science)|object]] instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the database. When an object is updated, the corresponding row in the table is also updated. The wrapper class implements [[accessor]] [[Method (computer programming)|methods]] or properties for each column in the table or view.
Line 31 ⟶ 32:
== Criticism ==
===
Because the data and the database access methods are in the same file, those files end up being bigger.
=== Single responsibility principle and separation of concerns ===
Another critique of the active record pattern is that,
== See also ==
|