ER & EER Diagram Design: Step-by-Step Practical Case Studies
Before drawing a hospital ER diagram, ask whether a patient can see the same doctor twice. If yes, doctor and patient alone cannot identify a visit. Give the appointment its own identifier and store its date there.
How to Solve ER Diagram Questions in DAVV BCA Exams
In every semester examination at Devi Ahilya Vishwavidyalaya (DAVV), a 10-Mark or 14-Mark question asks students to design a complete ER diagram from a descriptive business paragraph.
Follow this proven 4-Step Formula to score full marks:
- Identify the Entities (Nouns): Scan the problem statement for tangible things or concepts (e.g.,
Student,Doctor,Account). - Identify the Attributes (Properties): Look for details describing each noun (e.g.,
Roll_No,Name,Balance). Identify which attribute is the Primary Key (underline it). - Identify the Relationships (Verbs): Look for actions linking the nouns together (e.g.,
Enrolls,Treats,Deposits). - Determine Cardinality and Participation: Decide if the link is
1:1,1:N, orM:N, and whether participation isTotal(double line) orPartial.
Case Study 1: University Management System (DAVV Model)
Problem Statement:
“A university has multiple departments. Each department offers multiple courses. Students enroll in courses. A faculty member belongs to one department and teaches several courses. Students may participate in multiple hobby clubs.”
Step-by-Step Breakdown:
A student and a course each have an identity. Enrolment connects them and can hold facts such as the semester or grade.
Relationships and Cardinality:
- DEPARTMENT to COURSE (
OFFERS):- Cardinality:
1:N(One department offers many courses; a course belongs to only 1 department).
- Cardinality:
- STUDENT to COURSE (
ENROLLS_IN):- Cardinality:
M:N(A student takes multiple courses; a course has multiple enrolled students). - Descriptive Attribute:
GradeorSemesteris attached to theENROLLS_INdiamond!
- Cardinality:
- PROFESSOR to DEPARTMENT (
BELONGS_TO):- Cardinality:
N:1(Many professors belong to 1 department). Total participation on Professor.
- Cardinality:
- PROFESSOR to COURSE (
TEACHES):- Cardinality:
1:N(A professor can teach several courses; each course is taught by 1 professor).
- Cardinality:
View diagram · Entity and Relationship Mapping: University System
Case Study 2: Hospital Management System
Problem Statement:
“A hospital consists of doctors, patients, and rooms. Doctors examine patients and prescribe medications. Each patient is assigned to at most one room during admission.”
Breakdown:
- Entities:
DOCTOR(Doc_ID, Name, Specialization, Contact)PATIENT(Patient_ID, Name, Age, Disease, Admission_Date)ROOM(Room_No, Room_Type, Daily_Charge)MEDICINE(Med_ID, Med_Name, Manufacturer, Price)
- Relationships:
- One doctor can treat several patients in this simplified model.
PRESCRIBES: Ternary or binary relationship with attributeDosageandDate.- Each admitted patient is assigned at most one room. A room can serve several patients over time.
View diagram · Hospital relationships
Case Study 3: Banking Database System (with EER Specialization)
Problem Statement:
“A bank maintains customer details and multiple accounts. Accounts are divided into Savings Accounts (with interest rate) and Current Accounts (with overdraft limit). Customers can take loans.”
Shared account details belong to the general account type. Subtypes such as savings accounts keep additional details of their own.
- Entities:
CUSTOMER(Customer_ID, Name, Phone, Aadhar_No)ACCOUNT(Superclass: Account_No, Balance)SAVINGS_ACCOUNT(Subclass:Interest_Rate)CURRENT_ACCOUNT(Subclass:Overdraft_Limit)
LOAN(Loan_No, Amount, Loan_Type)
- Relationships:
- Customers can share a joint account and one customer can hold several accounts.
- In this example, each loan application belongs to one customer.
View diagram · EER Hierarchy for Banking Accounts
Summary Checklist for University Exam ER Diagrams
To ensure maximum marks from the evaluator:
- Always underline the primary key attributes (e.g.,
<u>Roll_No</u>). - Clearly label cardinality ratios (
1,N,M) next to the connecting lines. - Use a double rectangle for weak entities and a double diamond for their identifying relationships.
- If an attribute can have multiple values (like mobile numbers), use a double ellipse.
- If an attribute is derived (like age calculated from DOB), use a dashed ellipse.
- Write a brief 4-line textual description explaining your entities and relationships alongside the diagram!
💡 DAVV Exam Preparation Tips
10-Mark / 14-Mark Question: “Design a complete Entity-Relationship (ER) diagram for a University Management System. Clearly specify all entities, attributes, primary keys, relationships, and cardinality ratios.”
- Follow the 4-step framework outlined above.
- Identify at least 4 strong entities (
STUDENT,PROFESSOR,DEPARTMENT,COURSE).- Show at least one
M:Nrelationship with a descriptive attribute (GradeinENROLLS_IN).- State the cardinalities explicitly in your written explanation.