0% found this document useful (0 votes)
124 views

Bank Example

The document describes a bank database with 6 tables: branch, customer, account, loan, depositor, and borrower. The branch table stores branch information. The customer table stores customer information. The account table stores account numbers, associated branches and balances. The loan table stores loan numbers, associated branches and amounts. The depositor table links customers to their accounts. The borrower table links customers to their loans. The document provides 10 example queries that can be performed on this bank database.

Uploaded by

Aqsa Kiran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views

Bank Example

The document describes a bank database with 6 tables: branch, customer, account, loan, depositor, and borrower. The branch table stores branch information. The customer table stores customer information. The account table stores account numbers, associated branches and balances. The loan table stores loan numbers, associated branches and amounts. The depositor table links customers to their accounts. The borrower table links customers to their loans. The document provides 10 example queries that can be performed on this bank database.

Uploaded by

Aqsa Kiran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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