1. Database System Sunita M. Dol
Page 1
HANDOUT#03
Aim:
Draw E-R Diagram for a specific application.
Theory:
Entity-Relationship Diagram
E-R diagram can express the overall logical structure of a database graphically. E-R diagrams
are simple and clear qualities that may well account in large part for the widespread use of the E-
R model.
Such a diagram consists of the following major components:
• Rectangles, which represent entity sets
• Ellipses, which represent attributes
• Diamonds, which represent relationship sets
• Lines, which link attributes to entity sets and entity sets to relationship sets
• Double ellipses, which represent multivalued attributes
• Dashed ellipses, which denote derived attributes
• Double lines, which indicate total participation of an entity in a relationship set
• Double rectangles, which represent weak entity sets
2. Database System Sunita M. Dol
Page 2
E-R Diagram for Banking Enterprise
Here are the major characteristics of the banking enterprise.
• The bank is organized into branches. Each branch is located in particular city and is
identified by a unique name. The bank monitors the assets of each branch.
• Bank customers are identified by their customer_id values. The bank store each
customer’s name and street and city where the customer lives. Customers may have
account and can take out the loans. A customer may be associated with a particular
banker who may act as a loan officer or personal banker for that customer.
• Bank employees are identified by their employee_id values. The bank administration
stores the name and the telephone number of each employee, the name of employee’s
dependents and employee_id number of employee’s manager. The bank also keeps track
of the employees’ start date and thus the length of employment.
3. Database System Sunita M. Dol
Page 3
• Bank offers two types of account- saving and checking account. Accounts can be held
by more than one customer and a customer can have more than one account. Each
account is assigned unique account number. The bank maintains a record of each
account’ balance and most recent date on which the account was accessed each customer
holding the account. Each saving account has an interest rate and overdrafts are recorded
for each checking account.
• The bank provides its customer with loans. A loan is originates at particular branch and
can be held by one or more customers. A loan is identified by a unique loan number. For
each loan, bank keeps track of the loan amount and the loan payment. Although a loan
payment number does not uniquely identify a particular payment among those for all
bank’s loan, a payment number does identify a particular payment for a specific loan.
The date and amount are recorded for each payment.
4. Database System Sunita M. Dol
Page 4
E-R Diagram for University Example
In university database, each instructor must have exactly one associated department. As a result,
there is a double line in E-R diagram between instructor and inst_dept, indicating total
participation of instructor in inst_dept; that is, each instructor must be associated with a
department. Further, there is an arrow from inst dept to department, indicating that each
instructor can have at most one associated department. Similarly, entity sets course and student
have double lines to relationship sets course_dept and stud_dept respectively, as also entity set
section to relationship set sec_time_slot. The first two relationships, in turn, have an arrow
pointing to the other relationship, department, while the third relationship has an arrow pointing
to time_slot.
Further, E-R diagram shows that the relationship set takes has a descriptive attribute grade, and
that each student has at most one advisor. The figure also shows that section is now a weak entity
set, with attributes sec_id, semester, and year forming the discriminator; sec_course is the
identifying relationship set relating weak entity set section to the strong entity set course.
6. Database System Sunita M. Dol
Page 6
E-R Diagram for Hospital Management System
Source: https://www.pinterest.com/pin/464011567830372544/
E-R Diagram for Hotel Management System
7. Database System Sunita M. Dol
Page 7
Source: https://www.pinterest.com/creately/entity-relationship-diagrams-er-diagrams/
Conclusion:
The entity-relationship (E-R) data model perceives the real world as consisting of basic objects,
called entities, and relationships among these objects. We have studied the different E-R
notations which were used to draw the E-R diagram of
• Banking Enterprise
• University
• Hospital Management System
• Hotel Management System
References:
• Database system concepts by Abraham Silberschatz, Henry F. Korth, S. Sudarshan
(McGraw Hill International Edition) sixth edition.
• Database system concepts by Abraham Silberschatz, Henry F. Korth, S. Sudarshan
(McGraw Hill International Edition) fifth edition.
• http://codex.cs.yale.edu/avi/db-book/db4/slide-dir/
• http://codex.cs.yale.edu/avi/db-book/db5/slide-dir/
• http://codex.cs.yale.edu/avi/db-book/db6/slide-dir/