2.12

Consider the bank database of Figure 2.18. Assume that branch names and customer names uniquely identify branches and customers, but loans and accounts can be associated with moren than one customer.
a. What are the appropriate primary keys?
b. Given your choice of primary keys, identify appropriate foreign keys.


Relation Name Primary key
branch branch_name
customer ID
loan loan_number
borrower {ID, loan_number}
account account_number
depositor {ID, account_number}
  1. Relation Name Foreign key
    branch No Foreign Key
    customer No Foreign Key
    loan branch_name
    borrower ID - a foreign key referencing customer relation, loan_number - a foreign key referencing loan relation
    account branch_name
    depositor ID - a foreign key referencing customer relation, account_number - a foreign key referencing account relation