Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an active record?

Tags:

activerecord

What exactly is an active record? I hear this term used in Ruby post and nhibernate.

like image 944
mrblah Avatar asked Mar 27 '26 08:03

mrblah


2 Answers

Active record was initially a design pattern which involved wrapping database table operations in a class.

In a Rails context, however, it is also the proper name of a particular software component which implements the design pattern in Ruby for object-relational mapping, and the name of its associated module.

like image 97
DigitalRoss Avatar answered Mar 29 '26 21:03

DigitalRoss


Active record is a design pattern where you map each table to a class. This means that each object created from this class represents a row in the table.

http://martinfowler.com/eaaCatalog/activeRecord.html

http://en.wikipedia.org/wiki/Active_record_pattern

like image 28
Almond Avatar answered Mar 29 '26 21:03

Almond



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!