D Sample
D Sample
1. Draw an EER diagram for the following given information and obtain the database schema.
A bank is organized into branches. Each branch is located in a particular city and is identified by a
unique name. Each branch maintains its assets.
Bank customers are identified by a unique customer Identification Number. The branch stores
each customer’s Name, Address and Telephone number. Customers may have accounts and can
take loans. A customer may be associated with an employee, who may act as a loan officer or
personal banker for that customer.
Employees are identified by their Employee Numbers. The branch stores the Employee Number,
name, address and telephone no of each employee. The branch also keeps track of the employee’s
start date and the length of the employment.
Each branch offers two types of Accounts: Savings and Current Accounts. Each account is assigned
a unique Account Number. An account can be held by more than one customer, and a customer
can have more than one account. The branch maintains a record of each customer’s balance and
the most Recent Date on which the account was accessed. Savings Accounts are having an Interest
Rate and Current Accounts are having Overdrafts.
A loan is given at a particular branch. A loan is granted to one or more customers and a customer
can get more than one loan. A loan has a number. For each loan, the bank keeps track of the Loan
Amount and the Loan Payments. The Date and the Payment is recorded for each payment.
2.
a. Consider the following table of an insurance database. Construct the following SQL queries for this
relational database.
b) Schema’s follows:
4.
a. Create a Stored procedure with cursor in oracle to display the records in the Following Table?
EMP
ENO Marks
b) Using the Oracle function calculate the total marks of the above table?
C) Create a trigger to display message when the student table encounters with an update?
** Package/Function/ Procedure