GATE / CS ARCHIVE

GATE CSE 2024 SET 1 / QUESTION 20

Translate relationships into an ER diagram

Database Management Systems · Database Models, Architecture & ER Diagrams · Full GATE CSE 2024 Set 1 paper

GATE 2024 Set 1, Q20 1 mark · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 20, GATE 2024: Choose the ER diagram for: instructors teach courses; students register for courses; courses receive classrooms; instructors guide students. Rectangles denote entities and diamonds denote relationships. A diagram (i) uses a Student diamond and Registration rectangle. B diagram (ii) uses a Projects entity in place of Student. C diagram (iii) directly links Classroom to Course while its Allocation diamond is attached only to Course. D diagram (iv) has entities Instructor, Course, Student, Classroom and relationships Teaches(Instructor,Course), Registration(Student,Course), Allocation(Course,Classroom), Guides(Instructor,Student).
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Approach: Identify the objects first, then check the two endpoint entities of each relationship.
1. The four object categories are Instructor, Course, Student and Classroom. These must be entity rectangles. The verbs or associations become relationship diamonds: Teaches, Registration, Allocation and Guides.
2. Teaches must connect Instructor to Course; Registration must connect Student to Course; Allocation must connect Course to Classroom; Guides must connect Instructor to Student. Diagram (iv) satisfies all four requirements.
3. Diagram (i) interchanges the semantic roles of Student and Registration, using the wrong kinds of symbols. Diagram (ii) introduces Projects instead of the specified Student entity.
4. Diagram (iii) has a direct Classroom–Course edge and does not connect Classroom through Allocation; the named allocation relationship is therefore not properly represented.
Answer: D. The specification does not give cardinality constraints such as one-to-many, so there is no need to invent them when selecting the diagram.

Original paper, page 14 · Answer key