Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Bank Example

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CS4750 – The Bank Database – from Database System Concepts

branch(branch-name, branch-city, assets)


customer(customer-name, customer-street, customer-city)
account(account-number, branch-name, balance)
loan(loan-number, branch-name, amount)
depositor(customer-name, account-number)
borrower(customer-name, loan-number)

Branch Table Customer Table

Account Table Loan Table

Depositor Table Borrower Table


Example Questions for the Bank Database

1. Find all loans over $1200.

2. Find the loan number for each loan of an amount greater than $1200.

3. Find the names of all customers who have a loan, an account, or both from the bank.

4. Find the names of all customers who have a loan and an account at the bank.

5. Find the names of all customers who have a loan at the Perryridge branch.

6. Find the names of all customers who have a loan at the Perryridge branch, but no account at
any branch of the bank.

7. Find the names of all customers who have an account at the Downtown and Mianus branches.

8. Find the total amount each branch has in accounts.

9. Find the average loan amount of each customer

10. Find the names of all customers who have an account at every branch located in Brooklyn.

You might also like