Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. (40 points) The following database schema is part of a bank database Branch(bname, bcity, assets) Account(accountNo, bname, balance) Client(cID, cname, cstreet, c_city) Loan(loanNo, bname,
2. (40 points) The following database schema is part of a bank database Branch(bname, bcity, assets) Account(accountNo, bname, balance) Client(cID, cname, cstreet, c_city) Loan(loanNo, bname, amount) Borrower(cID, loanNo) Depositor(cID, accountNo) . Each bank branch is identified by the value of the attribute bname. The relation "Account" describes the account information each bank branch has. Each bank branch owns one or more accounts and an account number is unique across all bank branches . Each client is identified by the value of the attribute clD The relation "Loan" describes the loans approved by the branches. Each bank branch has one or more loans and a loan number is unique across all bank branches The relation "Borrower" describes the association between the clients and the loans they have. Each client can have one or more loans and each loan can belong to one or more clients The relation "Depositor, describes the association between the clients and the accounts they have. Each client can have one or more accounts and each account can belong to one or more clients. (a) Find the primary key and foreign key (if any) for each relation. (b) Pick one foreign key between two relations of your choice. Give one example of inserts and one example of deletes to these two relations, which can cause a violation of the referential integrity constraint. 2. (40 points) The following database schema is part of a bank database Branch(bname, bcity, assets) Account(accountNo, bname, balance) Client(cID, cname, cstreet, c_city) Loan(loanNo, bname, amount) Borrower(cID, loanNo) Depositor(cID, accountNo) . Each bank branch is identified by the value of the attribute bname. The relation "Account" describes the account information each bank branch has. Each bank branch owns one or more accounts and an account number is unique across all bank branches . Each client is identified by the value of the attribute clD The relation "Loan" describes the loans approved by the branches. Each bank branch has one or more loans and a loan number is unique across all bank branches The relation "Borrower" describes the association between the clients and the loans they have. Each client can have one or more loans and each loan can belong to one or more clients The relation "Depositor, describes the association between the clients and the accounts they have. Each client can have one or more accounts and each account can belong to one or more clients. (a) Find the primary key and foreign key (if any) for each relation. (b) Pick one foreign key between two relations of your choice. Give one example of inserts and one example of deletes to these two relations, which can cause a violation of the referential integrity constraint
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started