ER Diagram Examples

Some ER Diagram Examples :

Question 1 :
(a) Construct an E-R diagram for the registrar's office. Document all assumptions you make about the mapping constraints.

Assumptions:
  • A class meets only at one particular place and time. This diagram does not attempt to model a class meeting at different places or at different times
  • There is no guarantee that the database does not have two classes meeting at the same place and time
  • Each class has a unique instructor
(b) Construct appropriate tables for the ER Diagram
Solution (a):

er diagram examples

Solution (b) :

Student(SS#, name)
Class(Course#, time, location, department)
Instructor(Iss#, name)
Teaches-class(Iss#, Course#, time, location)
Takes-class (SS#, Course#, time, location, grade)
Question 2 :
(a) A university registrar’s office maintains data about the following entities:
  • (a) courses, including number, title, credits, syllabus, and prerequisites;
  • (b) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom;
  • (c) students, including student-id, name, and program; and
  • (d) instructors, including identifcation number, name, department, and title.
Further, the enrollment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modeled. Construct an E-R diagram for the registrar’s ofce.Document all assumptions
that you make about the mapping constraints.

(b) Construct appropriate tables for the above ER Diagram :
Answer (a):
In the answer given here, the main entity sets are student, course, course-offering, and instructor. The entity set course-offering is a weak entity set dependent on course. The assumptions made are :
a. a class meets only at one particular place and time. This E-R diagram cannot
model a class meeting at different places at different times.
b. There is no guarantee that the database does not have two classes meeting
at the same place and time.

er diagram examples

Solution (b):

University registrar’s tables:
student (student-id, name, program)
course (courseno, title, syllabus, credits)
course-offering (courseno, secno, year, semester, time, room)
instructor (instructor-id, name, dept, title)
enrols (student-id, courseno, secno, semester, year, grade)
teaches (courseno, secno, semester, year, instructor-id)
requires (maincourse, prerequisite)
Question 3 : Consider an E-R diagram in which the same entity set appears several times. Why is allowing this redundancy a bad practice that one should avoid whenever possible?
Answer: By using one entity set many times we are missing relationships in the model. For example, in the following E-R diagram, the students taking classes are the same students who are athletes, but this model will not show that.
er diagram examples
Question 4 :
(a)Consider a university database for the scheduling of classrooms for final exams. This database could be modeled as the single entity set exam, with attributes course-name, section-number, room-number, and time. Alternatively, one or more additional entity sets could be defined, along with relationship sets to replace some of the attributes of the exam entity set, as
  •  course with attributes name, department, and c-number
  •  section with attributes s-number and enrollment, and dependent as a weak entity set on course
  •  room with attributes r-number, capacity, and building
Show an E-R diagram illustrating the use of all three additional entity sets listed.

(b) Explain what application characteristics would inuence a decision to include or not to include each of the additional entity sets.
Answer (a): 

er diagram examples - er diagram questions with solutions

Answer (b) : 
The additional entity sets are useful if we wish to store their attributes as part of the database. For the course entity set, we have chosen to include three attributes. If only the primary key (c-number) were included, and if courses have only one section, then it would be appropriate to replace the course (and section) entity sets by an attribute (c-number) of exam. The reason it is undesirable to have multiple attributes of course as attributes of exam is that it would then be difcult to maintain data on the courses, particularly if a course has no exam or several exams. Similar remarks apply to the room entity set.
Question 5: A university registrar’s office maintains data about the following entities:
  1. courses, including number, title, credits, syllabus, and prerequisites;
  2. course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom;
  3. students, including student-id, name, and program;
  4. instructors, including identication number, name, department, and title.
Further, the enrollment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modeled. Construct an E-R diagram for the registrar’s ofce.Document all assumptions that you make about the mapping constraints.
Answer :

er diagram examples

For more ER Diagram Example – Click Here

Reference : http://www.cs.umd.edu/class/spring2003/cmsc424-0401/HW1answers.htm

     

Incoming search terms:

  • a university registrars office maintains data about the following entities
  • er diagram for registrar office
  • er digram about a university register office maintain data about the entities:course course offering student instructor
  • er diagram for registrar office of university
  • university registrar er diagram
  • ER diagram of university registrar
  • e-r diagram of university registrar office
  • er diagram for university register office
  • er model diagram in class
  • ERD in registrars office

Leave a Reply