Vous êtes sur la page 1sur 18

Normalization

Data normalization is a methodology for organizing attributes into tables so that redundancy
among the nonkey attributes is eliminated.
Each of the resultant table will describe a single entity type or single many to many relationship.
Foreign keys are needed exactly where they are required.
O/p of data normalization process is a properly structured relational database.
Also known as decomposition process.
Functional dependency:
Functional dependency: Attribute B has a functional dependency on attribute A if, for each value
of attribute A, there is exactly one value of attribute B. For example, Employee Address has a
functional dependency on Employee ID, because a particular Employee Address value
corresponds to every Employee ID value. An attribute may be functionally dependent either on
a single attribute or on a combination of attributes.
Or in other words, An attribute B is said to be functionally dependent on attribute A if, every
value of A uniquely determines the value of B. In this case, attribute A is determinant of B
Trivial functional dependency: A trivial functional dependency is a functional dependency of an
attribute on a superset of itself. {Employee ID, Employee Address} {Employee Address} is
trivial, as is {Employee Address} {Employee Address}.
Full functional dependency: An attribute is fully functionally dependent on a set of attributes X if
it is
a) functionally dependent on X, and
b) not functionally dependent on any proper subset of X. {Employee Address} has a functional
dependency on {Employee ID, Skill}, but not a full functional dependency, for it is also
dependent on {Employee ID}.
Transitive dependency: A transitive dependency is an indirect functional dependency, one in
which XZ only by virtue of XY and YZ.
Multivalued dependency: A multivalued dependency is a constraint according to which the
presence of certain value in a table implies the presence of certain other values. Or in other
words, a multivalued dependency is said to be existing between A and B if for each value of
attribute A, there is one or more associated value of attribute B.
Join dependency: A table T is subject to a join dependency if T can always be recreated by
joining multiple tables each having a subset of the attributes of T.
Normalisation
Is derivation of data as a set of
Non-Redundant,
Consistent and
Inter-Dependent Relations
Normalisation is a set of data design standards.
It is a process of decomposing unsatisfactory relations into smaller relations.
Like entityrelationship modelling were developed as part of database theory.
Normalisation - Advantages
Reduction of data redundancy within tables:
- Reduce data storage space
- Reduce inconsistency of data
- Reduce update cost
- Remove many-to-many relationship
- Improve flexibility of the system



Normal Forms


Normal Forms
First normal form
A Table is said to be in First Normal Form if
a) table doesnt contain repeating groups.
b) each attribute is indivisible (i.e. atomic attribute).
Second normal form
A Table is said to be in Second Normal Form if
a) It is in first Normal Form
b) Each non key attribute is functionally dependent on the entire key (primary key).
Third normal form
A Table is said to be in Third Normal Form if
a) It is in second Normal Form
b) it has no transitive dependency.
First normal form
A Table is said to be in First Normal Form if
a) table doesnt contain repeating groups.
b) each attribute is indivisible (i.e. atomic attribute).
Second normal form
A Table is said to be in Second Normal Form if
a) It is in first Normal Form
b) Each non key attribute is functionally dependent on the entire key (primary key).
Third normal form
A Table is said to be in Third Normal Form if
a) It is in second Normal Form
b) it has no transitive dependency.
Boyce-Codd Normal Form (BCNF )
A Table is said to be in BCNF if
a) It is in Third Normal Form
b) Each determinant is a candidate key .
Fourth normal form
A Table is said to be in Fourth Normal Form if
a) It is in BCNF
b) It contains no multi-valued dependency.
Fifth normal form
Also called as Projection-Join Normal Form (PJNF)
A Table is said to be in Fifth Normal Form if
a) It is in fourth Normal Form
b) Every join dependency in R is implied by candidate key if R.
Domain-Key Normal Form (DKNF)
A table is in DKNF if every constraint on the table is a logical consequence of the definition of
keys and domains.
In a table equivalent to 3NF/BCNF, any problems arising from functional dependencies are removed.
However it doesnt always avoid all problems related to dependencies. There is a different kind of
dependency that also can lead to the same types of problems.
That dependency is multivalued dependency.
Decomposition of the larger relation into the smaller relations to eradicate insertion, deletion
and updation anomalies.
Decomposition should be
o Lossless
o Dependency preserving


Recall that if X uniquely determines Y, then Y is functionally dependent on X.
The relation is a function because each of the elements of X maps exactly to one element of
Y.
For R satisfies the FD X -> Y if the following holds for every pair of tuples t1 and t2 in r:
If t1:X = t2:X, then t1:Y = t2:Y .

Questions:
1. Give a set of FDs for the relation schema R(A,B,C,D) with primary key AB under which R is in 1NF
but not in 2NF.
2. Give a set of FDs for the relation schema R(A,B,C,D) with primary key AB under which R is in 2NF
but not in 3NF.






A multivalued dependency is a full constraint between two sets of attributes in a relation.
In contrast to the functional independency, the multivalued dependency requires that certain
tuples be present in a relation. Therefore, a multivalued dependency is also referred as a tuple-
generating dependency. The multivalued dependency also plays a role in 4NF normalization.













Fifth normal form
Also called as Projection-Join Normal Form (PJNF)
A Table is said to be in Fifth Normal Form if
a) It is in fourth Normal Form
Every join dependency in R is implied by candidate key of R

Vous aimerez peut-être aussi