GATE CS 2024 Set 1 — Question 20

MCQ+1 / -0.33EasyRelationshipsER ModelDatabases

Databases → ER Model → Relationships

Last updated

Question

Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?
Four ER diagrams labeled (i), (ii), (iii), and (iv) depicting relationships between Instructor, Course, Student, and Classroom
A.
(i)
B.
(ii)
C.
(iii)
D.
(iv)

Correct answer

(D) (iv)

Solution

The specification S consists of four relationships:
1.Instructors teach courses: A relationship between the Instructor and Course entities.
2.Students register for courses: A relationship between the Student and Course entities.
3.Courses are allocated classrooms: A relationship between the Course and Classroom entities.
4.Instructors guide students: A relationship between the Instructor and Student entities.
Let's analyze the given diagrams:
  • Diagram (i): The Allocation relationship is ternary, connecting Course, Classroom, and Student. This implies students are involved in the allocation of classrooms, which contradicts the specification. Also, there is no direct Registration relationship between Student and Course.
  • Diagram (ii): The Guides relationship connects Instructor to an entity labeled Projects (or similar), not Student. This contradicts the specification "Instructors guide students".
  • Diagram (iii): The Registration relationship connects Student to the Allocation relationship (associative entity), rather than directly to Course. This implies students register for a specific allocation, which is not the standard interpretation of "register for courses".
  • Diagram (iv):
  • Teaches connects Instructor and Course.
  • Registration connects Student and Course.
  • Allocation connects Course and Classroom.
  • Guides connects Instructor and Student.


This diagram correctly models all four specifications using binary relationships between the appropriate entities. Therefore, diagram (iv) is the correct representation.

More questions on ER Model

Practice GATE CS PYQs with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free