Question
Consider the relational database of a bank with the following schema: Branch (branch-name, branch-city) Customer (customer-name, customer-city, customer-street, gender) Account (account-number, branch-name, balance) Loan (loan-number,
Consider the relational database of a bank with the following schema:
Branch (branch-name, branch-city)
Customer (customer-name, customer-city, customer-street, gender)
Account (account-number, branch-name, balance)
Loan (loan-number, branch-name, amount)
Depositor (customer-name, account-number)
Borrower (customer-name, loan-number)
Please answer the following queries using a relational algebra expression: (No sequential assignment notation or expression tree).
Find the names of all customers who have at least one loan and one account at any branch (not necessarily same). (5 points)
Find the names of branches where all female customers have both an account as well as have taken a loan from the same branch. (7 points)
Find the names of all traveling customers who have taken at least one loan in a branch that is different from their depositor account branches (associated with their depositor accounts). (8 points)
Find the names of all valued customers at the Downtown branch in Champaign city, where a valued customer has never taken any loans at the branch, a bank balance greater than $5000 and lives in the same city as the branch. (10 points)
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