As Ruby on Rails developers, we do not have to worry too much about the operations in the database due to the Object-Relational-Mapping or ORM. The ORM allows us to focus more on the logic of the business while it handles the operations with the database on our behalf. Understanding is vital to create a web application that behaves as you expect and avoid a good dose of frustration. In Rails, an association is a connection between two Active Record models. associations Let's imagine we have a client asking us to build a hospital management web app. Depending on the hospital needs we would need to create some Active Record Models. Now let's take a couple of these models as an example: one for the doctors and one for the patients. We need to tell Rails that a doctor has many patients and one patient might have one or more doctors, we achieve these trough associations. Rails supports six types of associations: : Specific for relationships of type one-to-one (1: 1) with another model (class). This method can be used only if this class contains the foreign key. If the other class contains the foreign key must use instead. belongs_to has_one belongs_to < ApplicationRecord class DoctorOffice :doctor end : Specific for relationships of type one-to-one (1: 1) with another model. This method can be used only if the other class contains the foreign key. If the current class contains the foreign key must use instead. has_one belongs_to has_one < ApplicationRecord class Doctor :doctor_office end : Specify an association of one to many (1: N). The referenced model must implement . has_many belongs_to has_many < ApplicationRecord class Doctor :patients end : Specify an association of many to many (N: M) with another model. This association indicates that the declaring model can be matched with zero or more instances of another model by proceeding a third model. has_many :trough through has_many has_many , belongs_to belongs_to has_many has_many , < ApplicationRecord class Doctor :appointments :patients through: :appointments end < ApplicationRecord class Appointment :doctor :patient end < ApplicationRecord class Patient :appointments :doctors through: :appointments end : Specify an association of one to one (1: 1) with another model. This association indicates that the declaring model can be matched with one instance of another model by proceeding a third model. has_one :trough through has_one has_one , belongs_to has_one belongs_to < ApplicationRecord class Patient :account :account_history through: :account end < ApplicationRecord class Account :patient :account_history end < ApplicationRecord class AccountHistory :account end : Specify a direct association of many to many (N: M) with another model, with no intervening model. has_and_belong_to_many has_and_belongs_to_many has_and_belongs_to_many < ApplicationRecord class Doctor :patients end < ApplicationRecord class Patient :doctors end If you are new to Rails associations or Rails, in general, I hope this quick introduction contributed to clarify some of your doubts about this topic.