CS 4400 Chapter Notes - Chapter 9: Surrogate Key, Unique Key, Foreign Key
Document Summary
For each regular/strong entity type, create a relation r that includes all the simple attributes. Choose 1 key attribute as the primary key for the relation r. If the key is composite, the set of simple attributes will make up the primary key of r. For each weak entity type w with owner entity type e, create a relation r and include all simple attributes of w as attributes of r. Include foreign key attributes of r the primary key attributes of the relations that correspond to the owner entity type. Primary key r is the combination of the primary key(s) of the owner(s) and the partial key of the weak entity type w, if any. Step 3: mapping of binary 1:1 relation types. Identify relationships s and t that correspond to the entity types participating in relationship type r. Choose one of the relations - s - and include a foreign key in s of the other relation t.