ER Model

GATE CS previous year questions · 2 questions

GATE CS 2024 Set 1 | Question 20

MCQ · 1 mark · −0.33

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?

ER diagrams (i) and (ii), with entity sets in rectangles and relationships in diamonds. In (i), Instructor–Teaches–Course and Classroom–Allocation–Course, a Registration rectangle is attached directly to Course, and a Student diamond joins Course to a Guides diamond that joins Instructor; in (ii), Instructor–Teaches–Course, Classroom–Allocation–Course, Course–Registration–Projects and Instructor–Guides–Projects.
ER diagrams (iii) and (iv), with entity sets in rectangles and relationships in diamonds. In (iii), Instructor–Teaches–Course, Course–Registration–Student and Instructor–Guides–Student, while Classroom is joined to Course by a plain line and the Allocation diamond hangs from Course alone; in (iv), Instructor–Teaches–Course, Classroom–Allocation–Course, Course–Registration–Student and Instructor–Guides–Student.
Options for GATE CS 2024 Set 1 | Question 20

Explanation

Answer: (D)

The specification has four entity sets (Instructor, Course, Student and Classroom) and four relationships: Teaches (Instructor–Course), Registration (Student–Course), Allocation (Course–Classroom) and Guides (Instructor–Student). In an ER diagram entity sets are rectangles, relationships are diamonds, and two entity sets are linked only through a relationship.

  • (i) swaps the roles: Student is drawn as a relationship and Registration as an entity set.
  • (ii) has no Student entity set at all; Projects, which the specification never mentions, takes its place.
  • (iii) joins Classroom straight to Course with a plain line, and its Allocation diamond is connected to Course only.
  • (iv) shows exactly the four entity sets joined through the four relationships.

Answer: D

GATE CS 2024 Set 2 | Question 20

MCQ · 1 mark · −0.33

In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?

Options for GATE CS 2024 Set 2 | Question 20

Explanation

Answer: (A)

A weak entity set has no key of its own. A weak entity is identified only by combining its partial key (discriminator) with the key of the owner entity it is linked to through the identifying relationship. A weak entity without an owner could not be identified at all, so every weak entity must take part in that relationship: the weak entity set has total participation.

The owner side has no such requirement. With Employee as the owner and Dependent as the weak entity set, for example, an employee may have no dependents. So the owner's participation can be partial, which rules out B and C, and D fails because the weak side must be total.

Answer: A