Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

1. What are the E-R Constructors? Give an example on each of them in the UNIVERSITY context.

E-R Constructors in the UNIVERSITY context are used to model relationships between entities such
as students, courses, and departments. The three main types of E-R Constructors are generalization,
specialization, and aggregation. An example

Of generalization is representing a superclass 'Person' and its subclasses 'Student' and 'Faculty'.
Specialization is used to represent a subclass with additional attributes or relationships, such as
'Student' with attributes like 'Major' and 'GPA'. Aggregation represents a relationship where one
entity is composed of multiple instances of another entity, such as 'Department' composed of
multiple 'Course' instances.

2. What are the 3 degrees of a relationship? Give an example for each (different form the slides).

 Unary

In a particular class, we have many students, there are monitors too. So, here class monitors are also students.
Thus, we can say that only students are participating here. So the degree of such type of relationship is 1.

Students
R

 Binary

‘Student’ and ‘ID’ where each ‘Student’ has his ‘ID’. So, here two entity types are associating we can say it is a binary
relationship

ID has Student

 Ternary

We have three entity types ‘Teacher’, ‘Course’, and ‘Class’. The relationship between these entities is defined as the
teacher teaching a particular course, also the teacher teaches a particular class. So, here three entity types are
associating we can say it is a ternary relationship.

Course R
Teacher

Class
3. Draw the EER diagram for the following requirements:

o An instructor is defined by an ID (unique), name, office#, and mobile#.


o A student is defined by an ID (unique), name, section#, and email.
o A course is defined by a code (unique), name, and numberOfCredits.
o A project is defined by an ID (unique), name, and start date.
o An instructor may teach many courses.
o A course must be taught by one or more instructors.
o A student must take one or many courses.
o A course must be taken by many students.
o A course may be a pre-requisite for may courses.
o A course may have many pre-requisites.
o A student may participate in one project.
o A project has to have one or more students participating in it.
o A student has to be either a graduate student or an undergraduate student and can’t be both.
o Undergraduate students have a level and have to be supervised by one instructor only.
o An instructor has to supervise one or more undergraduate students.
o Graduate students have a thesis title.

You might also like