Questions: Entity-Relationship Diagrams

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A junior developer proposes storing which courses a student is enrolled in as a comma-separated list of course IDs in a single column of the students table. What is wrong with this approach?

ANothing — storing comma-separated values is a common and efficient technique for many-to-many data
BIt violates atomicity and makes querying, updating, and enforcing referential integrity extremely difficult
CIt works fine as long as there are fewer than 100 courses per student
DThe correct fix is to store a comma-separated list of student IDs in each course record instead
Question 2 Multiple Choice

An ER diagram shows a one-to-many relationship: one Department has many Employees, but each Employee belongs to exactly one Department. When translating to a relational schema, where does the foreign key go?

AIn the Department table, as a column referencing the Employee table
BIn both tables, with each holding a foreign key pointing to the other
CIn the Employee table, as a column referencing the Department table
DIn a new junction table between Department and Employee
Question 3 True / False

A many-to-many relationship in an ER diagram must be implemented as a junction (associative) table when translated into a relational schema.

TTrue
FFalse
Question 4 True / False

In an ER diagram, nearly every attribute of an entity should become its own separate table in the relational schema.

TTrue
FFalse
Question 5 Short Answer

What is the purpose of drawing an ER diagram before writing any SQL, and what key design decisions does it help you make?

Think about your answer, then reveal below.