Database Reference
In-Depth Information
Figure 10.31. Working with a self-referencing relationship
Continue this procedure until you've eliminated all of the entries on the matrix. When
you've finished identifying the official relationships among the tables in the database, you
canthengothroughtheprocessof
establishing
eachrelationshipintheappropriatemanner.
Establishing Each Relationship
This process involves defining an explicit logical connection between a pair of related
tables. The type of relationship that exists between the tables determines the manner in
which you define the connection.
One-to-One and One-to-Many Relationships
Youusea
primary key
anda
foreign key
toestablishtheconnectionbetweentablesparticip-
ating in a one-to-one or one-to-many relationship. (You'll learn the definition of a foreign
key in just a moment.)
The One-to-One Relationship
In this type of relationship, one table serves as a parent table and the other serves as a child
table. A record must exist in the parent table
before
you can enter a related record in the