0% found this document useful (0 votes)
8 views8 pages

Lab 09 - Entity-Relationship Diagrams (ERD)

The document outlines Lab 09 for the CS220 Database Systems course, focusing on creating Entity-Relationship Diagrams (ERD) for various real-world systems. It includes objectives, tasks for different systems such as a hospital, library, online shopping, and banking, along with submission guidelines and assessment rubrics. Students are required to submit their ERDs by April 9, 2025, ensuring adherence to academic integrity and individual work standards.

Uploaded by

ehtishamanjum04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views8 pages

Lab 09 - Entity-Relationship Diagrams (ERD)

The document outlines Lab 09 for the CS220 Database Systems course, focusing on creating Entity-Relationship Diagrams (ERD) for various real-world systems. It includes objectives, tasks for different systems such as a hospital, library, online shopping, and banking, along with submission guidelines and assessment rubrics. Students are required to submit their ERDs by April 9, 2025, ensuring adherence to academic integrity and individual work standards.

Uploaded by

ehtishamanjum04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Faculty of Computing

CS220: Database Systems

Class: BSCS-14
Lab 09: Entity-Relationship Diagrams (ERD)

Date: March 12, 2025


Time: 2:00-05:00 PM

Instructor: Ms. Hirra Anwar

Lab Engineer: Hafiz M. Arslan


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

 Draw.io / Lucidchart / Microsoft Visio / Pencil Project or pen and paper.

ERD Example - University Management System

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

Task 1: ERD for a Hospital System

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.

Task 2: ERD for a Library System

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.

Task 3: ERD for an Online Shopping System


Problem Statement:
"An online store has customers and products. Each customer can place multiple orders. Each
order consists of multiple products. Each product has a name, price, and description."

 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.

Task 4: ERD for a Banking System

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.

Task 5: ERD with Specialization/Generalization

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.

Task 6: ERD for a School Management System (Bonus Task)

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.

 Students must demonstrate independent problem-solving and ethical conduct


during lab and in their submissions.
 50% Marks will be deducted on late submission.
 No submission will be allowed after the cutoff datetime. (April 09, 11:59 PM)

Submission Deadline:

9th April 2025, 5:00 PM


(50% Marks will be deducted on late submission).

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.

Individual and team The student The student The student


work does not works effectively works very
understands his as an individual effectively as an
responsibility but does not individual and
individually and work properly as take the
does no work in a team member. responsibility and
team. work efficiently
as a team
member with
leading abilities.

You might also like