1. (20 pts) Given the following BANKING database, formulate a Relational Algebra
ID: 3711179 • Letter: 1
Question
1. (20 pts) Given the following BANKING database, formulate a Relational Algebra expression for each of the following questions. SELECT should be performed before any JOIN operation. Notation: use the symbol S for SELECT, P for PROJECT, J for INNER JOIN,* for NATURAL JOIN, U for LEFT JOIN, RJ for RIGHT JOIN, R for RENAME, and F for FUNCTION. Please type your answer; hand-writing is not accepted. branch(branch_name, branch_city, assets) customer (customer_name, customer _street, customer_city) loan (loan_number, branch_name, amount) borrower (customer_name, loan_number) account (account_number, branch_name, balance) depositor (customer_ name, account.number) a. Find the names of all borrowers who have a loan in branch "Downtown" and whose loan values are higher than $20,000. Among customers with loans, list each of the customer's name, the number of loans borrowed by the customer, and the average loan amount of the customer. b.Explanation / Answer
a.
Pcustomer_name(branch_name = "Downtown" and amount>20000 (borrower J loan))
b.
Pcustomer_name,count(loan_number),avg(amount) group by customer_name ( borrower J loan)
Do ask if any doubt. Please upvote.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.