Chapter 15: Basics of Functional Dependencies and Normalization For Relational Databases
Chapter 15: Basics of Functional Dependencies and Normalization For Relational Databases
Deletion anomalies
Modification anomalies
EXAMPLE OF AN UPDATE
ANOMALY (1)
Consider the relation:
EMP_PROJ ( Emp#, Proj#, Ename, Pname, No_hours)
Update Anomaly: Changing the name of
project # P1 from “Billing” to “Customer-
Accounting” may cause this update to be
made for all 100 employees working on
project P1.
EXAMPLE OF AN UPDATE
ANOMALY (2)
Insert Anomaly: Cannot insert a project unless
an employee is assigned to .
Inversely - Cannot insert an employee unless
an he/she is assigned to a project.
Delete Anomaly: When a project is deleted, it
will result in deleting all the employees who work
on that project. Alternately, if an employee is the
sole employee on a project, deleting that
employee would result in deleting the
corresponding project.
Figure 10.3 Two relation schemas
suffering from update anomalies
Figure 15.4 Example States for EMP_DEPT
and EMP_PROJ
Guideline to Redundant Information
in Tuples and Update Anomalies
GUIDELINE 2: Design a schema that does
not suffer from the insertion, deletion and
update anomalies. If there are any present,
then note them so that applications can be
made to take them into account
1.3 Null Values in Tuples
Definition:
Transitive functional dependency - a FD