Chapter 2
Chapter 2
Candidate Key
Super key (K) such that no proper subset is a super key
within the relation.
Must ensure two properties to be a candidate key
In each tuple of R, values of K uniquely identify that tuple
(uniqueness).
No proper subset of K has the uniqueness property (irreducibility).
Alternate Keys
Candidate keys that are not selected to be
primary key.
Foreign Key
Attribute, or set of attributes, within one
relation that matches candidate key of some
(possibly same) relation.
12-Nov-18 Database Systems (CENG 4407) 16
Relational Keys- example
Consider Employee and
Department Entities
View
Dynamic result of one or more relational
operations operating on base relations to
produce another relation.
Relationship Occurrence/Instance:
Relationship between entity occurrences/Instances
MANY-TO-MANY: one tuple is associated with many other tuples and from the
other side, with a different role name one tuple will be associated with many tuples
E.g. Student – Courseas a student can take many courses and a single course can be
attended by many students.