Database Reference
In-Depth Information
Types of Relationships
Before you begin to establish relationships between tables in the database, you must know
what types of relationships canexistbetweenagivenpairoftables.Knowinghowtoidenti-
fy them properly is an invaluable skill for designing a database successfully.
There are three specific types of relationships that can exist between a pair of tables: one-
to-one, one-to-many, and many-to-many. Thetablesparticipatein only one typeofrelation-
shipatanygiventime.(You'llrarelyneedtochangethetypeofrelationshipbetweenapair
of tables. Only major changes in either of the table's structures could cause you to change
the relationship.)
Note
The discussion for each type of relationship begins with a generic example of
the relationship. Learning how to visualize a relationship generically enables you
to understand the principle behind the relationship itself. Once you understand
how and why the relationship works, you'll be able to determine whether it exists
between a given pair of tables quite easily.
Each discussion also includes an example of how to diagram the relationship. I
provide special instructions pertaining to the diagramming process where appro-
priate and explain the symbols incorporated within the diagram as necessary. This
allows you to learn the diagramming method at a reasonable pace and keeps you
from having to memorize the entire set of diagram symbols all at once.
Figure 10.2 shows the first symbols you will use to diagram a table relationship.
Figure 10.2. Diagramming symbols for a data table and a subset table
Search WWH ::




Custom Search