Professional Documents
Culture Documents
Printer,
Fax,
Printer Fax Modem 1 Fulton , Bruce 555-1222 Modem
Fax 1 Jones, Bill 555-1223 Fax
Product
Printer
Fax Solution
Modem
Fax
2nd Normal Form
INVENTORY INVENTORY
PartID PartID WarehouseID Quantity
WareHouseID 1 1 5
Quantity 1 2 3
WareHouseAddress 2 1 2
3 1 2
4 2 4
Solution:
INVENTORY
PartID WarehouseID Quantity
1 1 5
1 2 3
2 1 2
3 1 2
4 2 4
Source: https://www.youtube.com/watch?v=zc7ucOoj0pg
Problem:
WarehouseAddress
Tucson
Phoenix
Tucson
Tucson
Phoenix
WAREHOUSE
WarehouseID WarehouseAddress
1 Tucson
2 Phoenix
1 Tucson
1 Tucson
2 Phoenix
ORDERS
OrderNum OrderDate ItemNum Description
51614 10/13/2015 FD11 Rocking Horse
51614 10/13/2015 NI27 Bobo Doll
51619 10/15/2015 FD11 Rocking Horse
SOLUTION:
ORDER
OrderNum OrderDate NumOrdered
51614 10/13/2015 1
51619 10/15/2015 2
ITEM
ItemNum Description
FD11 Rocking Horse
NI27 Bobo Doll
FD11 Rocking Horse
ORDER LINE
OrderNum ItemNum NumOrdered QuotedPrice
51614 FD11 1 124.95
51614 NI27 1 59.95
51619 FD11 2 124.95
NumOrdered QuotedPrice
1 124.95
1 59.95
2 124.95
3rd Normal Form
Relations with a single primary key are automatically in 2nd normal form
Relation in 2nd normal form may still have problems with redundancy
Relations are in third normal form when the relation is 2nd normal form
Each primary key provides a fact that is independent of other non-key attributes and depend only on the key
Each non-key attrbute is dependent on the primary key and only on the primary key. Non key
attributes are not derived and are not dependent on other non key attribute
All attributes are non-transitively dependent on the primary key
The only determinants are candidate keys(Boyce Codd Normal Form)
CUSTOMER Problem:
CustomeNum
CustomerName CUSTOMER
Balance CustomerNum
CreditLimit 126
RepNum 440
RepLname 502
RepFname
SOLUTION:
CUSTOMER
CustomerNum
126
440
502
CUSTOMER REPS
RepNum
15
45
15
s and depend only on the key
y key. Non key
RepLname RepFname
Rafael Campos
Tian Hui
Rafael Campos
EMPLOYEE Problem:
EmpID
EmpFname EMPLOYEE
EmpLname EmpID EmpFname EmpLname DeptNo
DeptNo 101 Bruce Fulton D1
DeptName 102 Fred Rogers D2
103 Roger Hammerstein D1
EMPLOYEE
EmpID EmpFname EmpLname
101 Bruce Fulton
102 Fred Rogers
103 Roger Hammerstein
EMPLOYEE-DEPARTMENT
EmpID DeptNo
101 D1
102 D2
103 D1
DeptName
Finance
Manufacturing
Finance
DEPARTMENT
DeptNo DeptName
D1 Finance
D2 Manufacturing
A relation is in Fourth Normal Form when it is in third normal form
No instance contains two or more independent multivalued facts about an entity
There are no multivalued dependencies
EMPLOYEE-SKILLS
EmpID SkillCode
101 1
101 1
101 1
102 2
EMPLOYEE-LANGUAGE
EmpID LangCode
101 1
101 2
101 3
102 1
102 2
LANGUAGE
LangCode SkillProficiency LangProficiency
1 Archery French
2 Archery German
3 Archery Chinese
1 Badminton French
2 Badminton German
3 Badminton Chinese
1 Darts French
2 Darts German
3 Darts Chinese
1 Badminton French
2 Badminton German
1 Badminton French
2 Badminton German
SkillProficiency
Archery
Badminton
Darts
Badminton
LangProficiency
French
German
Chinese
French
German