Schema Refinement and �Normal Forms
Dr.S.Sivakumar,Principal
C.P.A College, Bodinayakanur
The Evils of Redundancy
Functional Dependencies (FDs)
Example: Constraints on Entity Set
Example (Contd.)
Can we change W in just the first tuple of SNLRWH?
What if we want to insert an employee and don’t know the hourly wage for his rating?
If we delete all employees with rating 5, we lose the information about the wage for rating 5!
Hourly_Emps2
Wages
Refining an ER Diagram
class
dname
budget
did
since
name
Works_In
Departments
Employees
ssn
class
dname
budget
did
since
name
Works_In
Departments
Employees
ssn
Before:
After:
Reasoning About FDs
Reasoning About FDs (Contd.)
Reasoning About FDs (Contd.)
Normal Forms
Boyce-Codd Normal Form (BCNF)
Third Normal Form (3NF)
What Does 3NF Achieve?
Decomposition of a Relation Scheme
Example Decomposition
Problems with Decompositions
Lossless Join Decompositions
More on Lossless Join
Dependency Preserving Decomposition
Dependency Preserving Decompositions (Contd.)
Decomposition into BCNF
BCNF and Dependency Preservation
Decomposition into 3NF
Minimal Cover for a Set of FDs
Summary of Schema Refinement