Database Assignment
Database Assignment
19k-0287
Section f
Abdul Ghaffar Ansari
Q1:
Branch => let assuming “BranchNo” as a primary key while
“PostCode” is the candidate key.
Staff => “StaffNo” is a primary key and there is no candidate key
except “StaffNo”.
PropertyForRent => “PostCode” is the only candidate key except
primary key.
Client => “telNo” and ”email” are the candidate keys.
PrivateOwner => “telNo”,” address”,” email” are the candidate keys.
Viewing => There is no any candidate key.
Registration => There is no any candidate key.
Q2:
“branchNo” is the Primary key in Branch Database, “branchNo” also
exist in Staff database, assume “branchNo” of Branch database is the
Primary key while “branchNo” of Staff database is the Foreign key.
Q3:
Insert into staff values (SA9,’Scott’,’Jeff’,’Clerk’,1,’1977-10-
01’,58000, B007);
Insert into registration values (CR56,’’,’’,’1990-12-07’);
delete from branch where branchNo=’B002’;
delete from privateOwner where name=’Tony Show’;