Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database System - Relational Algebra Queries (30 points) Consider the relational database of a bank with the following schema: Branch (branch-name, branch-city) Customer (customer-name, customer-city,

image text in transcribed

Database System - Relational Algebra Queries (30 points) 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 Loan (loan-number, branch-name, amount) Depositor (customer-name, Borrower (customer-name, loan-number) t-numbe r. branch-name, balance) number Please answer the following queries using a relational algebra expression: (No sequential assignment notation or expression tree) 1. Find the names of all customers who have at least one loan and one account at any branch (not necessarily same). (5 points) 2. 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) 3. 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) 4. 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) Database System - Relational Algebra Queries (30 points) 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 Loan (loan-number, branch-name, amount) Depositor (customer-name, Borrower (customer-name, loan-number) t-numbe r. branch-name, balance) number Please answer the following queries using a relational algebra expression: (No sequential assignment notation or expression tree) 1. Find the names of all customers who have at least one loan and one account at any branch (not necessarily same). (5 points) 2. 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) 3. 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) 4. 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

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

7. Where Do We Begin?

Answered: 1 week ago

Question

2. What recommendations will you make to the city council?

Answered: 1 week ago