Consider two entity sets and that both have the attribute (among others whose names are not relevant to this question).
a. If the two s are completely unrelated, how should the design be improved?
b. If the two s represent the same property and it is one that applies both to and to , how should the design be improved? Consider three subcases:
- is the primary key for but not
- is the primary key for both and
- is not the primary key for nor for
a. Rename the attribute to something that describes more info in both entity sets, so that it can have a different name in both the entity sets.
b.
Case 1: is the primary key for but not
In this case we would create a foreign-key constraint on the attribute of the entity set referencing the entity set .
Case 2: is the primary key for both and
In this case we merge the two entity sets and into one entity set . The new entity set will have the attribute as a primary key and moreover it will have all the other attributes of and (making proper attribute name modifications, if needed).
Case 3: is not the primary key for nor for
In this case we can create a new entity set called having a single attribute . And the attribute in and will be a foreign-key referencing the attribute in the entity set . This also gives room for storing more information about the attribute in side of the entity set .