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. (i): Instructor-Teaches-Course; Course-Allocation-Classroom; Course linked to an entity Registration and to a relationship Student, and Instructor-Guides-Student (Student drawn as a relationship). (ii): Instructor-Teaches-Course; Course-Allocation-Classroom; Course-Registration (relationship) linked to an entity Projects; Instructor-Guides-Projects. (iii): Instructor-Teaches-Course; Classroom joined directly to Course by a line, with Allocation attached only to Course; Course-Registration-Student; Instructor-Guides-Student. (iv): Instructor-Teaches-Course; Course-Allocation-Classroom; Course-Registration-Student; Instructor-Guides-Student.
Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2024 answer key

Solution

Verify that all four nouns (Instructor, Course, Student, Classroom) are represented as entity rectangles and all four associations (Teaches, Registration, Allocation, Guides) are relationship diamonds connecting the right entities.

From specification S, there are four entity sets (Instructor, Course, Student, Classroom - drawn as rectangles) and four binary relationship sets (Teaches, Registration, Allocation, Guides - drawn as diamonds):

  • In (i), Registration is drawn as an entity rectangle and Student as a relationship diamond (incorrect).
  • In (ii), the bottom entity is Projects instead of Student (incorrect).
  • In (iii), there is an invalid direct line connecting the Classroom entity rectangle directly to the Course entity rectangle.
  • In (iv), all four entity sets and four relationship sets are properly represented and connected.

Therefore, (iv) is the correct ER diagram.

Final answer

Option (D)

Common trap

Selecting (iii) without noticing the extra diagonal line directly connecting the Classroom entity to the Course entity.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
Question
20 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.