ITPEC FE Subject A April 2025 Question 20

Topic: DatabasesAlso asked in October 2020

In the UML data model shown in the figure below, which of the following is a multiplicity that should be inserted in blanks I and II?

[Conditions]

(1)One or more employees belong to a department.(2)An employee belongs to any one department.(3)The history of the departments to which an employee has belonged is recorded as the assignment history.
DepartmentAssignment historyEmployeeIII11Department codeDepartment nameStart dateEnd dateEmployee codeName
OptionIII

Explanation

One or more in both blanks — every department and every employee has at least one assignment history record, so I and II are both 1..*.

  • •Blank I, records per department: by condition (1) a department always has at least one employee, and each belonging is recorded, so one or more records
  • •Blank II, records per employee: by condition (2) every employee belongs to a department, so at least the current assignment is recorded, and by condition (3) past departments add more records, so one or more
  • •The fixed 1s: each assignment history record refers to exactly one department and one employee

Answer (d)

Why not others:

  • •(a) — 0..* in both blanks allows a department with no employees and an employee with no department, breaking conditions (1) and (2)
  • •(b) — 0..* in blank I allows a department with no members, contradicting condition (1)
  • •(c) — 0..* in blank II allows an employee who belongs to no department, contradicting condition (2)

Key rule: The lower bound of a multiplicity comes from the "must" rules (mandatory gives 1, optional gives 0); the upper bound comes from whether several links, such as a history, are allowed.

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.