Question

1. Given the following BANKING database, formulate a Relational Algebra expression for each of the following...

1. 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, LJ 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.

b. 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.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)

Add a comment
Know the answer?
Add Answer to:
1. Given the following BANKING database, formulate a Relational Algebra expression for each of the following...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Specify relational calculus expression for the following descriptions on the Library database schema shown in Figure...

    Specify relational calculus expression for the following descriptions on the Library database schema shown in Figure 4.6. a) Retrieve Publishers’ name and phone number whose books where borrowed from Baltimore Branch. b) List the book title, book id and branch name with less than 10 copies c) List customer card number, customer name, branch name and book title for books which are currently on loan. BOOK Book id Title Publisher_name BOOK_AUTHORS Book idAuthor name PUBLISHER Name Address Phone BOOK COPIES...

  • Consider the bank database of Figure 5.25. Write an SQL trigger to carry out the following...

    Consider the bank database of Figure 5.25. Write an SQL trigger to carry out the following action: On delete of an account, for each owner of the account, check if the owner has any remaining accounts, and if she does not, deleteher from the depositor relation branch(branch name, branch city, assets) customer (customer name, customer street, cust omer city) loan (loan number, branch name, amount) borrower (customer name, loan number) a ccount (account number, branch name, balance ) depositor (customer...

  • Write the following queries in Relational Algebra, for the following bank schema: account (ano, bname, balance)...

    Write the following queries in Relational Algebra, for the following bank schema: account (ano, bname, balance) branch (bname, bcity, assest) customer (Cname, cstreet, ccity) loan (lno, bname, amount) deposit (cname, ano) borrower (cname, ino) -Select all loan tuples where branch name is Abha. -Select all loan tuples where branch name is Abha and loan amount less than 200000.   Please type the solution on the keyboard so that I can copy and paste

  • Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient...

    Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient way. The schema is given in the following. Emp(eno, ename, title, city) Proj(pno, pname, budget, city) Works(eno, pno, since) SELECT ename FROM Works , Emp WHERE Works.pno = ‘P150’ AND Works.eno = Emp.eno

  • Write SQL statements to answer the following questions using Assignment 3’s schema (tables from part 1)....

    Write SQL statements to answer the following questions using Assignment 3’s schema (tables from part 1). 1- Find how many branches had have loans over $2000.00. 2- For each branch, find the most expensive loan. Your output should include Branch Id, loan amount for the highest loan for that Branch. 3- Find how many accounts there are for each customer. The output should include customer id and number of accounts for that customer. 4- Find the total balance amount of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT