CISC 332 Lecture Notes - Lecture 4: Referential Integrity, Unique Key, Relational Model

41 views2 pages

Document Summary

Primary key the candidate key that"s chosen to represent the tuples o o. Have foresight just because an attribute is unique at the moment, doesn"t mean it will always be unique when you add data. Ex a last name in a class may be unique at one point, but if someone adds the class, they may have a duplicate last name. A better option would be student number, as this doesn"t have duplicates. Also: make sure, it will never be null (ex a sin number non-citizens may not have one) Shouldn"t be able to change to change a primary key, you have to delete and re- add the tuple. Constraint value in one relation must appear in another i. e. keys that link two tables example of a referential integrity constraint foreign key always refers to the primary key of another relation o. Ex: teaches has 4 foreign keys that relate to the section relation because section has 4 primary keys.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents