Remember all those great relationships we created in our database to relate our tables together? If you need a refresher, then head back over to the Relationships section of Chapter 2, Database Layout and Design. Basically, the primary types of relationships are as follows:
One-to-many (OTM)
Many-to-one (MTO)
One-to-one (OTO)
Many-to-many (MTM)
We won't focus on the OTO relationship because it is really uncommon. In most situations, if there is a need for a one-to-one relationship, it should probably be consolidated into the main table.
The most common type of relationship we will map is a one-to-many (OTM) and the other way—many-to-one (MTO). If you remember, these are just two different sides of the same relationship, as seen in the following screenshot:
This is a simple one-to-many (OTM) relationship where a Contact can be associated with zero to many OrderHeader records (because the relationship fields allow nulls). Notice that the Foreign Key for...