ER Diagrams   «Prev  Next»

Model One-to-Many Relationships - Exercise

Objective: State rules in both directions and place foreign keys on the many side.

Stories on CD case assumptions

A customer may place zero or many orders; each order belongs to exactly one customer. In this simplified supply model, a distributor may supply zero or many CD titles; each CD title has exactly one distributor. Several suppliers per title would require a different model.

Two relationships

  1. CUSTOMER:ORDER
  2. DISTRIBUTOR:CD

For each pair, write the business rule in both directions, give minimum and maximum counts, identify the one and many sides, and show the foreign key placement. Use CustomerID, OrderNo, DistributorID and CDNo as identifiers. A schema outline is sufficient; SQL is not required.

Department and Employee example

A department has zero or many employees; each employee belongs to exactly one department. Employee.DepartmentID references Department.DepartmentID. EMPLOYEE, the many side, receives the foreign key.

Self-assessment checklist

For both relationships, check the bidirectional rules, minimum/maximum counts, and many-side foreign key referencing the correct parent. The original exercise has no numeric point total; use this checklist. The page displays a model answer; it does not automatically grade free text.

Submit your response

Enter your answers, then select Submit to compare them with the model answer.