Database Reference
In-Depth Information
3.5 Identifying, Representing, and Implementing
Relationships
As mentioned earlier, a relationship is an inherent mapping involving two or more
relations. In planning a relational database, it is very important to know how to
identify and represent relationships. Of course, the ultimate objective is successful
implementation of the model. Let us take some time to discuss these issues:
3.5.1 Identifying Relationships
To identify relationships, you have to know what a relationship is (review section 3.1) and
what types of relationships there are. There are six types of relationships:
One-to-one (1:1) Relationship
One-to-many (1:M) Relationship
Many-to-one (M:1) Relationship
Many-to-many (M:M) Relationship
Component Relationship
Subtype Relationship
The first four types of relationships are referred to as traditional relationships
because up until object model (for database design) gained preeminence, they were
essentially the kinds of relationships that were facilitated by the relational model. Observe
also, that the only difference between a 1:M relationship and an M:1 relation is a matter
of perspective; thus, a 1:M relationship may also be described as an M:1 relationship (so
that in practice, there are really three types of traditional relationships). Put another way:
For traditional relationships, to determine the type of relationship between two
relations (entities) R1 and R2, ask and determine the answer to the following questions:
How many records of R1 can reference a single record of R2?
How many records of R2 can reference a single record of R1?
To test for a component relationship between any two relations R1 and R2, ask and
determine the answer to the following questions:
Is (a record of ) R1 composed of (a record of ) R2?
Is (a record of ) R2 composed of (a record of ) R1?
 
Search WWH ::




Custom Search