IPA IP 2020 Question 57
A question IPA Japan published in 令和2年度 10月 ITパスポート試験 公開問題 問57, translated into English. ITPEC is based on the same exams.
An “Employee” table that is to be managed with a relational database is designed by using the items shown below. Which of the following is a redundant item that can be derived from other items?
Employee
Explanation
Current age — it can be calculated from the date of birth and today's date, so storing it is redundant.
An item that can be derived from other items needs no column of its own. Current age follows from the date of birth and the current date, and a stored age is also wrong as soon as a birthday passes unless every row is updated, an update anomaly. The date of birth never changes, so it is the item to keep, and the age is computed whenever it is needed.
Answer (b)
Why not others:
- •(a) Date of birth — cannot be derived from the age, which loses the day and month; it is the source of the age
- •(c) Address — independent information that no other item determines
- •(d) Hobby — independent information that no other item determines
Key rule: Don't store a value that can be calculated from other columns (an age, a total, a subtotal): derive it when needed, so it can never disagree with its source.
Databases · AI-written, may contain errors
This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.