You are on page 1of 3

In-class assignment 1 (10 points)

Name- Mohammad Fazla Sharafat Ullah

ID- 1922035630

1. For each of the following pairs of related entities, indicate whether (under typical
circumstances) there is a one-to many, a many-to-many or a one-to-one relationship.
Then, using the shorthand notation or text notation, introduced in the text, draw a
diagram for each of the relationships.

 STUDENT and COURSE (students register for courses)

Many to Many Relationship

Courses
Student
Course ID
Student ID
Course Name
Student Name
Student ID

 BOOK and BOOK COPY (books have copies)

One to Many Relationship

Copy
Book
Copy Category
Book ID
Edition Number
Book Name
Book ID

 COURSE and SECTION (courses have sections)

One to Many Relationship

Section
Course
Section Number
Course ID
Course ID
Course Name

 SECTION and ROOM (sections are scheduled in rooms)


One to Many Relationship

Room
Section
Room Number
Section ID
Time
Section Number
Section ID

 INSTRUCTOR and COURSE (instructors instruct courses)

Many to Many Relationship

Courses
Instructor
Course ID
Instructor ID
Course Name
Instructor Name
Instructor ID

2. Following figure shows an enterprise data model (entity relationship diagram) for
a pet store
Please determine the following:

 What is the relationship between Pet and Store (one-to one, many-to-many, or
one-to-many)? Please explain.

Ans: The relationship between pet and store is one to many. The reason is the store
can contain multiple pets but one pet cannot be in multiple stores.

 What is the relationship between Customer and Pet? Please explain.

Ans: The relationship between customer and pet is one to many. One customer can
buy one or multiple pets, but one pet cannot be sold to multiple customers.

 Do you think there should be a relationship between Customer and Store? Explain
the reason if it YES or NO.

Ans: The relationship between customer and the store is one to many. Since here we
are talking about only the store, the store is singular and it servers multiple customers.

You might also like