Multiple Occurrences of the Same Fact
One of the goals of a relational database is to maximize data integrity. To do so, it is important to represent each fact in the database once and only once, otherwise errors can begin to enter into the data. The only exception to this rule (one fact in one place) is in the case of key attributes, which can appear multiple times in a database. The integrity of keys, however, is managed using referential integrity.
Multiple occurrences of the same fact often point to a flaw in the original database design. In the following figure, you can see that including “employee‑address” in the CHILD entity has introduced an error in the database design. If an employee has multiple children, the address must be maintained separately for each child.
“employee-address” is information about the EMPLOYEE, not information about the CHILD. In fact, this model violates second normal form, which states that each fact must depend on the entire key of the entity in order to belong to the entity. The example above is not in second normal form because “employee-address” does not depend on the entire key of CHILD, only on the “employee-id” portion, creating a partial key dependency. If you place “employee-address” back with EMPLOYEE, you can ensure that the model is in at least second normal form.
Copyright © 2023 Quest Software, Inc. |