Lab 09 - Entity-Relationship Diagrams (ERD)
Lab 09 - Entity-Relationship Diagrams (ERD)
Class: BSCS-14
Lab 09: Entity-Relationship Diagrams (ERD)
Introduction
This lab will focus on the ERD part of Database. It discusses how to create relations and link
different types of entities in DBMS.
Objectives
To provide practical experience in creating Entity-Relationship Diagrams (ERD).
To understand the identification of entities, attributes, and relationships.
To design ERDs for real-world problems using different notations and
conventions.
Tools/Software Requirement
1. Entities:
o Student: Student_ID, Name, Email
o Course: Course_ID, Title, Credit Hours
o Professor: Professor_ID, Name, Department
2. Relationships:
o Enrolls (between Student and Course): A student can enroll in multiple courses.
o Teaches (between Professor and Course): A professor teaches multiple courses.
3. Process:
o Identify all entities (Student, Course, Professor).
o List attributes for each entity (Student_ID, Name, etc.).
o Define relationships (Enrolls, Teaches).
o Draw ER diagram using correct notation.
ERD:
Lab Tasks
Problem Statement:
"A hospital has doctors who treat patients. Each patient can be treated by multiple doctors, and a
doctor can treat multiple patients. Patients are admitted into rooms. Each room can accommodate
only one patient at a time."
Instructions:
1. Identify the entities (e.g., Patient, Doctor, Room).
2. List attributes for each entity (e.g., Patient_ID, Name, Room_Number).
3. Define relationships (e.g., Treated_By, Admitted_To).
4. Draw the ER diagram using a diagramming tool.
Problem Statement:
"A library has books and members. Each member can borrow multiple books, and each book can
be borrowed by multiple members. Each book has a title, ISBN, and author. Each member has a
name, membership ID, and address."
Instructions:
1. Identify the entities (e.g., Member, Book).
2. Define relationships (e.g., Borrows, Has).
3. Draw the ER diagram with the appropriate cardinality and attributes.
Instructions:
1. Identify the entities (e.g., Customer, Order, Product).
2. List the attributes for each entity.
3. Define relationships between entities (e.g., Places, Contains).
4. Draw the ER diagram.
Problem Statement:
"A bank has customers, accounts, and branches. A customer can have multiple accounts. Each
account is linked to exactly one branch. Each account has an account number, balance, and
type."
Instructions:
1. Identify the entities (e.g., Customer, Account, Branch).
2. Define relationships (e.g., Has, Located_At).
3. Draw the ER diagram with attributes and relationships.
Problem Statement:
"A university has staff, which can be divided into two types: teaching staff and non-teaching
staff. Teaching staff have subject specialties, while non-teaching staff work in specific
departments."
Instructions:
1. Create an entity for Staff, with subtypes for Teaching and Non-Teaching.
2. Use specialization/generalization notation to represent the two subtypes.
3. Draw the ER diagram.
Problem Statement:
"A school has students, teachers, classes, and subjects. Each student is enrolled in multiple
classes, and each class has multiple students. Teachers teach multiple subjects, and each subject
is taught in multiple classes."
Instructions:
1. Identify the entities (e.g., Student, Teacher, Class, Subject).
2. Define relationships (e.g., Enrolls, Teaches).
3. Draw the ER diagram with appropriate cardinality and participation constraints.
Deliverables
Submit your ERDs in the form of a single PDF/Word or as individual image files.
Include all tasks from Task 1 to Task 6, clearly labeled.
Explanations or comments for each ERD to describe its concept.
A brief summary (3–5 sentences) explaining your work.
1. File Format:
a. Name your file as: Database_Systems_Lab9_YourName.docx
b. Ensure the document is well-organized with appropriate headings and labeled
screenshots.
2. Submission Instructions:
Submit the Word or PDF file through LMS before the deadline (April 09, 5:00 PM).
Strict Guidelines:
No ChatGPT or AI-generated content is allowed. Submissions will be checked using
GPTZero and Turnitin.
Individual Work: This lab will be done individually.
Submission Deadline:
Important Note:
Ensure academic integrity; plagiarism or AI-generated content will result in zero marks.
Rubrics
Assessment Does not Meets Exceeds
meet Expectations expectations
expectations
(3/4) (5)
(1/2)
What is the capacity The student The student The student show
of the student to does not understands the very positive and
operate under
understand the problem to quick response to
guidance to develop
ERD for retrieving problem and designed ERD for guidance
information from a developed ERD retrieving provided and use
relational database does not information from their design skills
retrieve the a relational for the
complete database. The development of
information queries designed generic ERD for
required from are semi reusable retrieving
the relational information from
database. a relational
database.
Ethics and Adherence The student does The student partially The student clearly
to Laboratory Safety not demonstrate demonstrates demonstrates
Rules commitment to commitment to commitment to
professional ethics professional ethics by professional ethics by
by following following ethical following ethical
ethical norms norms applicable to norms applicable to
applicable to the the software industry the software industry
software industry such as referencing such as referencing
such as and and
referencing and acknowledgement acknowledgement
acknowledgement while using publicly while using publicly
while using available data/ code. available data/ code.
publicly available Does not disturb the Encourages others to
data/ code. lab environment, maintain lab
Disturbs the lab takes care of safety decorum, and alerts
environment, measures, and is them to follow safety
doesn’t take care punctual. measures.
of safety
measures, and/or
isn’t punctual.