Professional Documents
Culture Documents
RELATIONAL MODEL Exercise in Database Systems
RELATIONAL MODEL Exercise in Database Systems
RELATIONAL MODEL Exercise in Database Systems
Consider the following schema for a bank accounts and loan enterprise system.
1. Get the number, name, city and assets of all Branches in city “Brooklyn”.
5. Get a list of account-no, branch name having branch number “B-25” and balance
greater than 2560. (use Cartesian Product method)
6. Get the list of customer’s name, customer’s city for loan numbers above or same as
“L-15”.
7. Get the list of customer’s name, customer’s city and Depositor’s account number,
who have branch in city “Perryidge”.
8. List the names of all bank customers who have either an account or a loan or both.
9. Find all customers who have an account but not a loan. (use of minus) (Taking out all
elements of 2nd set out of 1st set)
10. Get the list of all customers who have both a loan and an account.
11. Find the names of all customers who have a loan at the branch name “Perryidge”. (use
of Cartesian Products)
12. Find the names of all customers in city “Princeton”, who have a loan at the bank, and
find the amount of the loan as well.
13. Find all customers who have an account at all the branches located in “Brooklyne”.
14. List of customer-no, branch-no and loan amount of all borrower customers who
withdraw loan amount or not.
15. Find the largest account balance in bank. (Use of rename column, cartesian product
and minus).
16. Delete all those customer records from Depositor where customer number is 56475.
18. Insert a deposit record for a customer-no 22341 having balance amount of $1200 for
account number A-984 at branch number 2556
19. Give 6% raise to those account holders who have balance amount more than $1000.
20. List of customers’ Customer-no, Address (rename attribute for street) where city is
“Perryridge”.