CMPT 354 Study Guide - Quiz Guide: Third Normal Form, Superkey, Foreign Key

132 views12 pages

Document Summary

Translate each strong entity type to a table. Translate a relationship set into a new table if it is many-to-many. Translate a one-to-many, many-to-one, one-to-one relationship by adding it to the table of the entity set that is one . Translate attributes in er to attributes in tables. Translate keys in er to keys in tables. Identify ( using bold face or some other way) the foreign keys in each table you define. Specific situations: (bold = foreign key, underline = primary key, underlined bold = foreign key acting as primary key) X(k1, k2, a1) (k2 needs to be unique) Y(k2, k1, a2) (k1 needs to be unique) Xy(k1, a1, k2, a2) this implies total participation, half points deducted. Y(k1, k2, a2) (k1 cannot be null ) X(k1, a1, k2) (if it is 1:1 requires k2 to be unique) Studno, courseno, major+ = studno, studname, courseno, ctitle, Studno, major+ = studno, studname, major, advisor.