views:

117

answers:

1

What is ORM as it applies to Rails and what does it mean?

+4  A: 

ORM is Object Relational Mapper. It means you don't have to manually call the database yourself; the ORM handles it for you.

Ruby on Rails uses one called ActiveRecord, and it's a really good one.

ORM allows you to do things such as:

User.find(50).contacts

Instead of manually writing a SELECT statement with JOINs, WHEREs, etc.

Mike Trpcic
Now I got it mike.Is der any other ORM then active record?
Arun
There are other ORM tools for Ruby (DataMapper, Sequel, Friendly, etc.), and there are some for Ruby on Rails (DrySQL), but Active Record is generally used with Rails. There are many ORMs for other languages; Hibernate is probably the most well known.
JacobM
In Rails officially ("out of the box") these is just ActiveRecord. For Ruby there's a few other ORMs (one called DataMapper that seems to get a lot of attention), but these other ones take some work to get up and working in Rails
RyanWilcox