Chapter 4 Functional Dependency and Normalization
Chapter 4 Functional Dependency and Normalization
Chapter Four
Functional Dependency and Normalization
Informal Design Guidelines for Relation Schemas
2
Informal guidelines that may be used as measures to
determine the quality of relation schema design:
EmpNum EmpEmail
.
EmpLname
Functional Dependency
EmpNum EmpEmail
Transitive dependency
A B and B C.
DeptNum DeptName
Also,
any relation that is in BCNF, is in 3NF;
any relation in 3NF is in 2NF; and
any relation in 2NF is in 1NF.
Levels of Normalization
12
Levels of normalization based on the amount
of redundancy in the database.
Various levels of normalization are:
First Normal Form (1NF)
Second Normal Form (2NF)
Redundancy
Number of Tables
Third Normal Form (3NF)
Complexity
Boyce-Codd Normal Form (BCNF)
Fourth Normal Form (4NF)
Fifth Normal Form (5NF)
Domain Key Normal Form (DKNF)
Most
Mostdatabases
databasesshould
shouldbe
be3NF
3NFor
orBCNF
BCNFin inorder
orderto
toavoid
avoidthe
the
database
databaseanomalies.
anomalies.
Normalization
14
The benefit of higher normal forms is that update semantics for the
simpler.
A design that has a lower normal form than another design has
InvNum InvDate
EmployeeDept
ename ssn bdate address dnumber dname
dnumber dname.
Third Normal Form
27
Candidate keys
are? …
EmpNum EmpName DeptNum DeptName
BC
NF
student_no instr_no
course_no instr_no
Functional dependencies:
EMP_ID → EMP_COUNTRY
Candidate keys:
So it is in BCNF because left side part of both the functional dependencies is a key
Summary
37
38
Any Question?