Professional Documents
Culture Documents
CHAPTER 3 - Stud
CHAPTER 3 - Stud
REFERENTIAL INTEGRITY – if a
3.3.2 Relational Keys
foreign key exists in a relation, either the
Superkey
foreign key value must match a candidate key Candidate key
value of some tuple in its home relation or the Primary key
Foreign key
foreign key value must be wholly null.
3.3.3 Representing Relational Database
Schema
Using the Dreamhouse database, we
have this example:
BRANCH (branchNo, street, city, postcode)
STAFF (staffNo, Fname, Lname, position,
gender, DOB, salary, branchNo)
PROPERTYforRENT (propertyNo, street, city,
postcode, type, rooms,
rent, ownerNo,
staffNo,
branchNo)
CLIENT (clientNo, Fname, Lname, TelNo,
prefType, maxRent)
PRIVATEOWNER (ownerNo, Fname, Lname,
address, TelNo)
VIEWING (clientNo, propertyNo, viewDate,
comment)
REGISTRATION (clientNo, branchNo, staffNo,
dateJoined)
ENTERPRISE CONSTRAINTS
- users additional constraints that the data must
satisfy.