Questions: Converting ER Diagrams to Relational Schemas

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A university ER diagram has a many-to-many relationship between Student and Course, with an enrollment date as a relationship attribute. Which relational schema correctly represents this?

AAdd a course_id foreign key to the Student table and store enrollment_date there
BAdd a student_id foreign key to the Course table and store enrollment_date there
CCreate a junction table Enrollment(student_id FK, course_id FK, enrollment_date) with a composite primary key
DStore both student_id and course_id as a comma-separated list in a single Enrollment column
Question 2 Multiple Choice

A Student entity has a 'phones' attribute that can hold multiple phone numbers. How should this be mapped to a relational schema?

AAdd a phones column to the Student table storing all numbers separated by commas
BCreate a separate StudentPhone(student_id FK, phone) table
CAdd phone1, phone2, phone3 columns to Student to accommodate up to three numbers
DOmit phone numbers entirely — multivalued attributes cannot be represented relationally
Question 3 True / False

A one-to-many relationship between Department and Employee is correctly represented by adding a dept_id foreign key to the Employee table, with no separate junction table required.

TTrue
FFalse
Question 4 True / False

When converting a specialization hierarchy (e.g., Person → Student, Faculty) to a relational schema, the main correct approach is to create a separate table for each entity type in the hierarchy.

TTrue
FFalse
Question 5 Short Answer

Explain the difference between how a one-to-many and a many-to-many relationship are represented in a relational schema, and why this difference is necessary.

Think about your answer, then reveal below.