Normal Forms
Normal Forms
• There are now others that are generally accepted, but 3NF
is widely considered to be sufficient for most applications.
STUDENT
Partial
Dependency
CUSTOMER
EMPLOYEE
Subject Table
Subject_ID Subject
Author Table
1 MySQL
Author_ID Last Name First Name
2 Computers
1 Silberschatz Abraham
2 Korth Henry
Book Table
Publisher Table
1 McGraw-Hill
Book Table
ISBN Title Pages Publisher_ID
BOOK
BOOK
BOOK
ORDER
ORDER
ORDER
PART
PART
STUDENT
STUDENT
STUDENT
Stud_ID Name
101 Lennon
125 Jonson
STUDENT_COURSE
Composite
Primary Key
STUDENT
STUDENT
STUDENT COURSE
Transitive
Dependency
EMPLOYEE
EMPLOYEE
EMPLOYEE
DEPARTMENT
Dept_ID Dept_Name
1 Acct
2 Mktg
Boyce-Codd Normal Form
A relation schema R is in BCNF with respect to a set F of functional
dependencies if for all functional dependencies in F+ of the form
– For R1
• The only nontrivial functional dependencies in F+ are those with cust-num
as a member of the left-side of the FD
• As cust-num is a superkey of R1, these functional dependencies satisfy the
second condition for 3NF. i.e satisfy BCNF conditions.
Third Normal Form
• R1 = (cust-num, name, house-num, street, city, state)
cust-num name, house-num, street, city, state
– For R2
There are two kinds of nontrivial functional dependencies in F+:
– Those with (house-num, street, city, state) as a subset of the left
hand side of the FD: As (house-num, street, city, state) is a
superkey for R2, these functional dependencies satisfy the
second condition for 3NF
– Those of the form {zip} {state} where
For any such functional dependency:
( {state}) – ( {zip}) = {state} (or = )
Because state is part of a candidate key of R2, such functional
dependencies satisfy the third condition for 3NF
Create Tables
Assume the supply department in a company is in charge of
bringing parts from different manufacturers. A part is uniquely
identified by its name and manufacturer; for convenience, a part
is also given an id.