Question: SQL question ! 2. (12 marks) Consider the relations in a banking database given by the schemas below. BRANCH (branchName, address, city, sales, manager) CUSTOMER
SQL question !

2. (12 marks) Consider the relations in a banking database given by the schemas below. BRANCH (branchName, address, city, sales, manager) CUSTOMER (cID, firstName, lastName, address, city, birthDate, phoneNun, totalAssets) LOAN (LoanNum, branchName, amount, duration, interest) BORROWER (CID, loanNum) ACCOUNT (acctNum, branc, balance, type) DEPOSITER (CID, acctNum) BRANCH provides information on the branch name, it's street address, city, total sales thus far for the year, and the branch manager. CUSTOMER records customer information such as a customer ID (cID), their name, street address, city, birth date, telephone number, and total assets recorded. LOAN records information about loans, specifically, the loan number, the branch that opened the loan, the amount, duration period, and yearly interest rate. BORROWER associates a customer to a loan. ACCOUNT provides details about bank accounts such as the account number, the home branch, the current balance, and the type of account. Finally, DEPOSITOR associates a customer to an account. Given these schemas, answer the following questions: conditions under which each key would be valid. the appropriate primary to foreign key references. a) Identify a primary key for each relation. For each key, briefly state the assumptions or b) Given your choice of primary keys in (a), define four referential integrity constraints. State
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
