Let R be a relationship set involving entity sets E1,E2, ...,Em.The table corresponding to the relationship set R has the following attributes:
m
U primary-key(Ei)
i=1
If the relationship has k descriptive attributes, we add them too:
m
U primary-key(Ei)U{a1,a2,...ak}
i=1
An example:
- The relationship set CustAcct involves the entity sets customer and account.
- Their respective primary keys are S.I.N. and account-number.
- CustAcct also has a descriptive attribute, date.
- This gives us the table of gure 2.17.
Non-binary Relationship Sets
The ternary relationship of Figure 2.13 gives us the table of figure 2.18. As required, we take the primary keys of each entity set. There are no descriptive attributes in this example.
Linking a Weak to a Strong Entity
These relationship sets are many-to-one, and have no descriptive attributes. The primary key of the weak entity set is the primary key of the strong entity set it is existence-dependent on, plus its discriminator. The table for the relationship set would have the same attributes, and is thus redundant.
