Active Record


Active Record is the model layer in Ruby on Rails.
It also refers to a software architecture pattern which is implemented as Active Record in Rails.

Active Record as Pattern

"an object that wraps a row in a database table, encapsulates the database access, and adds domain logic to that data."
Martin Fowler in Patterns of Enterprise Application

Active Record as an ORM Framework

Active Record gives us the ability to do the following using Ruby objects: