You are on page 1of 5

BCSE302P DATABASE SYSTEMS

CHALLENGING TASK
Date: 10-03-2023 Time: 1 hour

Max Marks: 15

Create a database schema for the Indian Bank using the following tables.

For the above schema, perform the following:

1. Create the tables with the appropriate integrity constraints.(2M)


2. Insert at least 5 records in each of the tables.(2M)
3. Change the data type of loan amount from integer to real.(1M)
4. List the branch name that starts with a character ‘C’.(1M)
5. List the number of customers are from ‘Chennai’.(1 M)
6. Find the acct_no and loan_no of the customers whose loan amount is between 10,000and
20,000

Answers :-

Create the tables with the appropriate integrity constraints

1. customer (acct_no:integer, cust_name:string, cust_city:string)


2. loan (loan_no:integer, branch_name:string, amount:integer)

4. borrower (acct_no:integer, loan_no:integer, loan_date:date, branch_name:string,interest_rate:real )

Insert at least 5 records in each of the tables.

FOR CUSTOMER
FOR LOAN
For borrower
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’.

SELECT customer.cust_name,

cust.name,cust_city.city

FROM ACC_no, customer

WHERE salesman.city = customer.city;

You might also like