Create
Learn
Share

C175 Ch.3

rename
verickle's version from 2017-08-21 19:49

RELATIONAL DATABASE KEYS

Question Answer
KeyConsists of one or more attributes that determine other attributes
SuperkeyAn attribute or combination of attributes that uniquely identifies each row in a table
Candidate keyA minimal (irreducible) superkey; a superkey that does not contain a subset of attributes that is itself a superkey
Primary keyA candidate key selected to uniquely identify all other attribute values in any given row; cannot contain null entries
Foreign keyAn attribute or combination of attributes in one table whose values must either match the primary key in another table or be null
Secondary keyAn attribute or combination of attributes used strictly for data retrieval purposes
memorize

Referential Integrity

Question Answer
Cascade Delete RuleThis rule states that if an attempt is made to delete a record in one table where one or more records with matching foreign key values exist in another table, all associated records will be deleted.
Restrict Delete RuleThis rule states that if an attempt is made to delete a record in one table where one or more records with matching foreign key values exist in another table, that the delete operation will not be allowed.
Set-to-Null Delete RuleThis rule states that if an attempt is made to delete a record in one table where one or more records with matching foreign key values exist in another table, then the foreign key values are set to NULL so we know that the record they used to point to has been deleted.
memorize

ENTITY INTEGRITY

Question Answer
RequirementAll primary key entries are unique, and no part of a primary key may be null.
PurposeEach row will have a unique identity, and foreign key values can properly reference primary key values.
ExampleNo invoice can have a duplicate number, nor can it be null; in short, all invoices are uniquely identified by their invoice number.
memorize