Answer to Exercise ER-1

The cardinality and existence are shown in the ER diagrams below. You did not have to draw these diagrams. You could have just used words to describe the cardinality and existence.

1

Only current marriages in system.

q1-1a.png
q1-1b.png
q1-1c.png
q1-1d.png

2

Students are entered into the database before they earn a degree. When a new degree is created, it is entered into the database before any students have earned it. Cardinality: 1-M. Existence: optional.

q1-2.png

3

Optionality on the left might be mandatory if only parents are in the parent table. If parents-to-be are included, then the figure shown below is correct. Cardinality: 1-M. Remember, this is for child to parent. If I had asked what's the cardinality between child and parent, you would say M-M. Existence: mandatory.

q1-3.png

4

Mandatory on the left assumes that a team can join the league without any players. Mandatory on the right assumes that a player is not included until assigned to a team. All teams that a players has played for are recorded. Cardinality: 1-M. Existence: mandatory.

q1-4.png

5

Students are included before they have even enrolled in a class. Courses are included before enrollment period has begun. Cardinality: 1-M. Existence: optional.

q1-5.png

Return to ER exercises.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License