0% found this document useful (0 votes)
25 views6 pages

ER Diagram Assignment

Uploaded by

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

ER Diagram Assignment

Uploaded by

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

Kingdom of Saudi Arabia ‫المملكة العربية السعودية‬

Ministry of Higher Education ‫وزارة التعليم العالي‬


University of Hail ‫جامعة حائل‬
College of Computer Science and Engineering
‫كلية علوم وهندسة الحاسب اآللي‬
Department of Computer Science and Software
Engineering ‫قسم علوم الحاسب وهندسة البرمجيات‬

SENG 351
Semester 2 - 2024/2025

Assignment
Submission Date: April 30, 2025 Total Marks: 10

Course Instructor: Dr. Kusum Yadav --

Student Name & ID __________________________________________

Instructions:

1. Late submissions after the deadline will not be accepted.


2. Complete the compulsory questions (1-4) thoroughly.
3. Submit your ERDs for questions 1-4 in the word file
4. Ensure your diagrams are neat, clearly labelled, accurately represent the relationships
and cardinalities, and include all specified attributes with primary keys marked.
5. Double-check that you have appropriately handled any Many-to-Many relationships
using associative entities.

The following are strictly forbidden for the assignment:

• Cheating

Assignment: Entity-Relationship Diagrams (ERDs)

Course: Database Management Systems

Objective: To practice modeling real-world scenarios using Entity-Relationship Diagrams, correctly identifying
entities, attributes, primary keys, and relationships (including cardinalities).

Instructions:

• This assignment consists of 10 ERD modeling problems.

• Compulsory Questions (1-3): You MUST complete these three questions. Your solutions for these
questions will be evaluated and graded.

• Practice Questions (4-10): These seven questions are provided for your practice and self-assessment.
They cover similar concepts and will help reinforce your understanding. Submission is not required for
practice questions.
1|3
• For each question, draw a clear and legible Entity-Relationship Diagram (ERD).

• Clearly label all entities, attributes, and relationships.

• Indicate the primary key (PK) for each entity.

• Use standard ERD notation (e.g., Crow's Foot notation is recommended) to clearly show the cardinality
(e.g., 1:1, 1:N, M:N) of each relationship.

• For Many-to-Many (M:N) relationships, ensure you include the necessary associative (linking) entity.

Compulsory Questions (Submit for Evaluation):

1. University Enrollment System:

o Scenario: A university needs a database to track student enrollments in various courses offered
each semester.

o Entities: STUDENT, COURSE.

o Relationship: A student can enroll in multiple courses, and a single course can have many
students enrolled. This represents a Many-to-Many (M:N) relationship.

o Task: Draw an ERD for this scenario. Remember that M:N relationships typically require an
associative entity (e.g., ENROLLMENT) to link the two main entities.

o Attributes:

▪ STUDENT: Student_ID (PK), Name, Email

▪ COURSE: Course_ID (PK), Course_Name, Credits

▪ (Consider: What attributes might belong to the associative entity linking STUDENT and
COURSE, such as Enrollment_Date or Grade?)

2. Hospital Patient Management:

o Scenario: A hospital needs to track which doctor is primarily responsible for treating each
admitted patient.

o Entities: PATIENT, DOCTOR.

o Relationship: A patient is assigned to and treated by one primary doctor during their stay, but a
doctor can be responsible for treating multiple patients simultaneously. This is a One-to-Many
(1:N) relationship from DOCTOR to PATIENT.

o Task: Design an ERD representing this patient-doctor assignment. Indicate the Foreign Key (FK)
relationship clearly.

o Attributes:

▪ PATIENT: Patient_ID (PK), Name, Date_of_Birth, (Consider: Where would


the Doctor_ID FK go?)

2|3
▪ DOCTOR: Doctor_ID (PK), Name, Specialty

3. Library Catalog System:

o Scenario: A library wants to catalog its books and the authors who wrote them.

o Entities: BOOK, AUTHOR.

o Relationship: A book can be written by one or more authors (co-authorship), and an author can
write multiple books. This is a Many-to-Many (M:N) relationship.

o Task: Draw an ERD, including the necessary associative entity (e.g., BOOK_AUTHORSHIP).

o Attributes:

▪ BOOK: Book_ID (PK), Title, Publication_Date

▪ AUTHOR: Author_ID (PK), Name, Biography

4. E-commerce Order System:

o Scenario: An online retail platform needs to manage customer orders.

o Entities: CUSTOMER, ORDER.

o Relationship: A customer can place multiple orders over time. However, each individual order
is placed by only one specific customer. This is a One-to-Many (1:N) relationship from
CUSTOMER to ORDER.

o Task: Create an ERD for this customer-order relationship. Clearly show the linkage and
cardinality.

o Attributes:

▪ CUSTOMER: Customer_ID (PK), Name, Email

▪ ORDER: Order_ID (PK), Order_Date, Total_Amount, (Consider: How is an ORDER linked


back to the specific CUSTOMER?)

Practice Questions (For Self-Study):

1. Project Management System:

o Scenario: A company needs to track which employees are assigned to which projects.

o Entities: PROJECT, EMPLOYEE.

o Relationship: An employee can be assigned to work on multiple projects concurrently or over


time, and a single project typically involves multiple employees. This is a Many-to-Many
(M:N) relationship.

3|3
o Task: Design an ERD, including an associative entity (e.g., ASSIGNMENT) to manage the
relationship.

o Attributes:

▪ PROJECT: Project_ID (PK), Project_Name, Start_Date

▪ EMPLOYEE: Employee_ID (PK), Name, Role

▪ (Consider: What attributes might the ASSIGNMENT entity have,


like Assigned_Date or Role_On_Project?)

2. School Class Scheduling:

o Scenario: A school needs to assign teachers to specific classes they will teach.

o Entities: TEACHER, CLASS.

o Relationship: A teacher may be responsible for teaching multiple classes (e.g., different
sections of the same subject or different subjects), but each specific class instance (e.g., "Math
101 - Section A") is taught by only one teacher. This is a One-to-Many (1:N) relationship from
TEACHER to CLASS.

o Task: Create an ERD showing how teachers are assigned to classes.

o Attributes:

▪ TEACHER: Teacher_ID (PK), Name, Subject

▪ CLASS: Class_ID (PK), Class_Name, Grade_Level, (Consider: How is a CLASS linked to its
TEACHER?)

3. Banking System:

o Scenario: A bank needs to manage customer accounts.

o Entities: CUSTOMER, ACCOUNT.

o Relationship: A customer can hold multiple accounts (e.g., savings, checking), but each
individual account belongs to only one primary customer (for simplicity, ignore joint accounts
here). This is a One-to-Many (1:N) relationship from CUSTOMER to ACCOUNT.

o Task: Draw an ERD representing the customer-account relationship.

o Attributes:

▪ CUSTOMER: Customer_ID (PK), Name, Address

▪ ACCOUNT: Account_ID (PK), Account_Type, Balance, (Consider: How is an ACCOUNT


linked to its owner CUSTOMER?)

4. Movie Database:

o Scenario: A database is needed to store information about movies and the actors who star in
them.

4|3
o Entities: MOVIE, ACTOR.

o Relationship: A movie typically features multiple actors, and an actor can appear in multiple
movies over their career. This is a Many-to-Many (M:N) relationship.

o Task: Design an ERD, including an associative entity (e.g., MOVIE_CAST or ROLE) to link movies
and actors.

o Attributes:

▪ MOVIE: Movie_ID (PK), Title, Release_Date

▪ ACTOR: Actor_ID (PK), Name, Biography

▪ (Consider: What attributes might the linking entity have, such as Character_Name?)

5. Sports League Management:

o Scenario: A sports league needs to track players and the teams they belong to.

o Entities: TEAM, PLAYER.

o Relationship: For this league, assume a player can only be registered to one team at a time,
while a team consists of multiple players. This is a One-to-Many (1:N) relationship from TEAM
to PLAYER.

o Task: Create an ERD for this team-player structure.

o Attributes:

▪ TEAM: Team_ID (PK), Team_Name, Sport

▪ PLAYER: Player_ID (PK), Name, Position, (Consider: How is a PLAYER associated with
their TEAM?)

6. Research Project Tracking:

o Scenario: A research institution needs to track researchers and the projects they are working
on.

o Entities: RESEARCHER, PROJECT.

o Relationship: A researcher can be involved in multiple projects simultaneously or over time,


and a research project often involves a team of multiple researchers. This is a Many-to-Many
(M:N) relationship.

o Task: Draw an ERD, using an associative entity (e.g., PROJECT_ASSIGNMENT) to model this
relationship.

o Attributes:

▪ RESEARCHER: Researcher_ID (PK), Name, Institution

▪ PROJECT: Project_ID (PK), Project_Name, Funding_Agency

5|3
▪ (Consider: What details might be tracked in the PROJECT_ASSIGNMENT,
like Role_On_Project or Contribution_Percentage?)

6|3

You might also like