The ONLamp rails tutorial part 1 and part 2 - be sure to read both parts before getting started. There are some updates at the end of the second part that will influence how you install MySql.
Module: ActiveRecord::Associations::ClassMethods Associations are a set of macro-like class methods for tying objects together through foreign keys. They express relationships like "Project has one Project Manager" or "Project belongs to a Portfolio". Each macro adds a number of methods to the class which are specialized according to the collection or association symbol and the options hash. It works much the same was as Ruby’s own attr* methods.