You are on page 1of 6

BCSE302 – Database Systems

CHALLENGING TASK - I

NAME: SHYLESH

REG_NO: 21BPS1502

DATE: 28.02.2023

1. Create a database schema for the XYZ Bank using the following tables. customer (acct_no:integer,
cust_name:string, cust_city:string) loan (loan_no:integer, branch_name:string, amount:integer)
borrower (acct_no:integer, loan_no:integer, loan_date:date, branch_name:string,
interest_rate:real ) For the above schema, perform the following: 1. Create the tables with the
appropriate integrity constraints.

2. Insert at least 5 records in each of the tables

. 3. Change the data type of loan amount from integer to real.

4. List the branch name that starts with a character ‘C’.

5. List the number of customers are from ‘Chennai’.

6. Find the last day of the month of the loan date.

7. Find the acct_no and loan_no of the customers whose loan amount is between 10,000 and 20,000
8. Find all customers name who have not borrowed the loan from the bank.

9. Find the average loan amount for each of the branch with minimum loan amount is greater than
20,000.

10. Find the loan_no and its loan amount greater than the amount of all the loans belong to the
branch ‘VIT University

SOLUTIONS:

1.
2.
3.

4.

6.

7.
8

5.
7

gfdsgfdggf

ffff
8

You might also like