Normalization in DBMS, notes prepared by Mahendra Patil Normalization: A te chnique for pr oduc ing a se t of ta ble s wi th desira bl e pr opert ies that su pport th e requirements of a user or company. Process of decomposing relations with anomalies to produce smaller, well-structured relations. Normalisation is a process for deciding which attributes should be grouped together in a relation. Use to val ida te and imp rove log ica l de sign to sat isf y certai n constrain ts - avo id unnecessary duplication of data. Objective of Normalization : The basic objectives of normalization are: 1) To reduce redundancy which means that information is to be stored only once. 2) To reduce file storage space required by base tables. 3) To reduce the inconsisten cy caused by redunda ncy. 4) To make it feasible to represent any relation in the database. 5) To free relations from undesirable insertion, update, and deletion anomalies. Properties of Normalized Relations: a. No data value should be du plicated in d ifferent rows unnecessarily. b. A value must be specified (and required) for every attribute in a ro w. c. Each relation should be self-contained. In other words, if a row from a relation is deleted, important information should not be accidentally lost. d. When a row is added to a rela tion, other relations in the database should not be affected. e. A value of an attribute in a tuple may be changed independent of ot her tuples in the relation and other relations. 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Normalization in DBMS, notes prepared by Mahendra Patil
Normalization:
A technique for producing a set of tables with desirable properties that support therequirements of a user or company.
Process of decomposing relations with anomalies to produce smaller, well-structuredrelations.
Normalisation is a process for deciding which attributes should be grouped together in
a relation.
Use to validate and improve logical design to satisfy certain constraints - avoidunnecessary duplication of data.
Objective of Normalization:
The basic objectives of normalization are:1) To reduce redundancy which means that information is to be stored only once.2) To reduce file storage space required by base tables.
3) To reduce the inconsistency caused by redundancy.4) To make it feasible to represent any relation in the database.
5) To free relations from undesirable insertion, update, and deletion anomalies.
Properties of Normalized Relations:
a. No data value should be duplicated in different rows unnecessarily.
b. A value must be specified (and required) for every attribute in a row.
c. Each relation should be self-contained. In other words, if a row from a relation is
deleted, important information should not be accidentally lost.
d. When a row is added to a relation, other relations in the database should not be
affected.
e. A value of an attribute in a tuple may be changed independent of other tuples in the
Normalization in DBMS, notes prepared by Mahendra Patil
Second normal form (2NF) :
A relation is in 2NF if it is in 1NF and every non-key attribute is fully dependent on
primary key of the relation.
2NF only applies to tables with composite primary keys.
Functional dependency :
Functional Dependency
Describes relationship between attributes in a relation or columns in a table.
If A and B are columns of table R, B is functionally dependent on A if each value
of A in R is associated with exactly one value of B in R. It is represented by A->B. Weare interested in finding such functional dependencies among database relations
Normalization in DBMS, notes prepared by Mahendra Patil
Third normal form (3NF) :
A relation R is in third normal form if it is in 2NF and every non-key attribute of R is
non-transitively dependent on primary key of R.
For example, consider a table with A, B, and C. If B is functional dependent on A(A-> B) and C is functional dependent on B (B-> C), then C is transitively
dependent on A via B (provided that A is not functionally dependent on B or C).
If a transitive dependency exists on the primary key, the table is not in 3NF.
2NF to 3NF :
Steps:
1. Identify the primary key in the 2NF relation.2. Identify functional dependencies in the relation.
3. If transitive dependencies exist on the primary key, remove them by placing them
in a new relation along with copy of their determinant.
Normalization in DBMS, notes prepared by Mahendra Patil
Fourth Normal Form(4 NF):A relation is in 4NF⇔whenever there exists an multi-
valued dependence (MVD), say A→→B, then all attributes are also functionally
dependent on A, i.e. A→X for all attribute X of the relation
For Ex: Relation CTX (not in 4NF)
Course Teacher Text
Physics Prof. Green Basic Mechanics
Physics Prof. Green Principles of Optics
Physics Prof. Brown Basic Mechanics
Physics Prof. Brown Principles of Optics
Physics Prof. Black Basic Mechanics
Physics Prof. Black Principles of Optics
Math Prof. White Modern Algebra
Math Prof. White Projective Geometry
A tuple (C, T, X) appears in CTX ⇔ course C can be taught by teacher T and usesX as a reference. For a given course, all possible combinations of teacher and text
appear – that is, CTX satisfies the constraint: if tuples (C, T1, X1), (C, T2, X2)
both appears, then tuples (C, T1, X2), (C, T2, X1) both appears also. CTX contains redundancy
CTX is in BCNF as there are no other functional determinants
But CTX is not in 4NF as it involves an MVD that is not an FD at all, let alone an
FD in which the determinant is a candidate key Anomalies in insert: For example, to add the information that the physics course
uses a new text called Advanced Mechanism, it is necessary to create three new