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?


Answer
(D)
Explanation
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