Representation of Relationship Sets
Let R be a relationship set involving entity sets .
The table corresponding to the relationship set R has the following attributes:
If the relationship has k descriptive attributes, we add them too:
- 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.
Non-binary Relationship Sets
The ternary relationship of Figure gives us the table of figure 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.