ITPEC FE Subject A October 2024 Question 19
Which of the following is an appropriate ER diagram after considering the conditions below?
Explanation
Program in the middle, one-to-many on both sides — each college has one or more programs, and each program has one or more employees.
The multiplicity next to an entity says how many instances of that entity relate to one instance at the other end of the line:
- •An employee has exactly 1 program, so
1.goes next to Program; a program has at least one employee, so.1 1.goes next to Employee.* - •A program belongs to 1 college, so
1.goes next to College; a college has one or many programs, so.1 1.goes next to Program.*
Only (b) links College 1. to 1. Program and Program 1. to 1. Employee.
Answer (b)
Why not others:
- •(a) — reverses the Program–Employee labels:
1.next to Program and.* 1.next to Employee say an employee has many programs and a program exactly one employee.1 - •(c) — links employees to the college instead of a program, and
1.next to Program says a college has exactly one program.1 - •(d) — its College–Program link is right, but employees hang off the college, so nothing records which program an employee belongs to
Key rule: Write a rule “each X has n Y” as n next to Y, at the far end from X; then check that every relationship in the conditions connects the entities it names.
Databases · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.