2. 2
First Normal Form (1NF)
• A relation or table can only be considered in 1NF if it contains only
single atomic values.
• 1NF disallows having a set of values, a tuple of values, or a
combination of both as an attribute value for a single tuple.
• In other words, 1NF disallows relations within relations or relations
as attribute values within tuples.
• The only attribute values permitted by 1NF are single atomic values.
4. 4
Second Normal Form
• Second normal form (2NF) is based on the concept of full functional
dependency.
• A functional dependency X → Y is a full functional dependency if
removal of any attribute A from X means that the dependency does
not hold anymore; that is, for any attribute A ε X, (X − {A}) does
not functionally determine Y.
• A functional dependency X → Y is a partial dependency if some
attribute A ε X can be removed from X and the dependency still
holds; that is, for some A ε X, (X − {A}) → Y.
• A relation schema R is in 2NF if every nonprime attribute A in R is
fully functionally dependent on the primary key of R.
6. 6
Third Normal Form
• Third normal form (3NF) is based on the concept of transitive
dependency.
• A functional dependency X → Y in a relation schema R is a
transitive dependency if there exists a set of attributes Z in R that is
neither a candidate key nor a subset of any key of R, and both X →
Z and Z → Y hold.
• A relation schema R is in 3NF if it satisfies 2NF and no nonprime
attribute of R is transitively dependent on the primary key.
8. 8
Boyce Codd Normal Form (BCNF)
• Boyce-Codd normal form (BCNF) was proposed as a simpler form
of 3NF, but it was found to be stricter than 3NF.
• That is, every relation in BCNF is also in 3NF; however, a relation
in 3NF is not necessarily in BCNF.
• A relation schema R is in BCNF if whenever a nontrivial functional
dependency X → A holds in R, then X is a superkey of R.
9. 9
• Example schema that is not in BCNF:
in_dep (ID, name, salary, dept_name, building, budget )
because :
– dept_name building, budget (holds on in_dep)
but dept_name is not a superkey
• When decompose in_dept into instructor and department
– instructor is in BCNF
– department is in BCNF
10. 10
(a) LOTS1A is in 3NF but not in BCNF
(b) it is in 3NF, but not in BCNF due
to the f.d. C B.
→
11. 11
Fourth Normal Form
• A relation schema R is in 4NF with respect to a set D of functional
and multi-valued dependencies if for all multi-valued dependencies
in D+
of the form , where R and R, at least one
of the following hold:
– is trivial (i.e., or = R)
– is a superkey for schema R
• If a relation is in 4NF it is in BCNF
12. 12
(a) The EMP relation with two MVDs: Ename –>> Pname and
Ename –>> Dname. (b) Decomposing the EMP relation into two
4NF relations EMP_PROJECTS and EMP_DEPENDENTS.
13. 13
Fifth Normal Form
• A relation schema R is in fifth normal form (5NF) (or Project-Join
Normal Form (PJNF)) with respect to a set F of functional, multi-
valued, and join dependencies if,
– for every nontrivial join dependency JD(R1
, R2
, ..., Rn
) in F+
(that
is, implied by F),
• every Ri is a superkey of R.
• Discovering join dependencies in practical databases with hundreds
of relations is next to impossible. Therefore, 5NF is rarely used in
practice.