Data Base: Normalization
Data Base: Normalization
Normalization
Main objective in developing a logical data model forrelational database systems is
to create an accuraterepresentation of the data, its relationships, andconstraints.
To achieve this objective, must identify a suitable setof relations.
Four most commonly used normal forms are first (1NF),second (2NF) and third
(3NF) normal forms, and Boyce.Coddnormal form (BCNF).
Data Redundancy
Major aim of relational database design is to groupattributes into relations to
minimize data redundancy andreduce file storage space required by base relations.
Problems associated with data redundancy are illustratedby comparing the following
Staff and Branch relationswith the StaffBranch relation.
DATA BASE
Data Redundancy
StaffBranch relation has redundant data: details of abranch are repeated for every member of
staff. In contrast, branch information appears only once foreach branch in Branch relation
and only branchNo isrepeated in Staff relation, to represent where eachmember of staff
works.
Update Anomalies
Relations that contain redundant information maypotentially suffer from update anomalies.
Types of update anomalies include:
. Insertion,
. Deletion,
. Modification.
Lossless-join and Dependency Preservation Properties
Two important properties of decomposition:
Lossless-join property enables us to find any instanceof original relation from
corresponding instances in thesmaller relations.
Dependency preservation property enables us to enforcea constraint on original
relation by enforcing some constrainton each of the smaller relations.
Functional Dependency
Main concept associated with normalization.
Functional Dependency. Describes relationship between attributes in arelation.
Diagrammatic representation:
1NF to 2NF
Identify primary key for the 1NF relation.
Identify functional dependencies in the relation.
If partial dependencies exist on the primary key removethem by placing them in a
new relation along with copy oftheir determinant
Third Normal Form (3NF)
Based on concept of transitive dependency:. A, B and C are attributes of a relation
such that ifA B and B C,. then C is transitively dependent on A through B.
(Provided that A is not functionally dependent on Bor C).
3NF - A relation that is in 1NF and 2NF and in which nonon-primary-key attribute is
transitively dependent onthe primary key.
2NF to 3NF
Identify the primary key in the 2NF relation.
Identify functional dependencies in the relation.
If transitive dependencies exist on the primary keyremove them by placing them in a new
relation along withcopy of their determinant.