Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write both relational algebra expression and SQL for each of the following queries. Branch(branch_name, branch_city, assets) Customer(customer_name, customer_street, customer_city) Loan(loan_number, branch_name, amount) Borrower(customer_name, loan_number)

please write both relational algebra expression and SQL for each of the following queries.

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)

List all the customers who live in NY together with their account balances.

2. List all branches whose average account balances are more than $10,000.

3. List the customers who have account(s) in a branch city that is different where he lives.

4. List the customers who have both loan and account in the same branch.

5. List the customers who have both loan and account in the bank.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago