Normalization
Normalization
e F o ur e n t s :
Th n dm
m a i t
Com t Co m m
h a l
Th o uS n c y of
•
e d u n da
No R
Fact C l u t ter
S h a lt
u
• Tho cts
No Fa
u S h alt
• Tho rve
Prese tion
f o r m a
In
S h a lt
u
• Tho rve
Prese nal
io
Funct encies
nd
Depe
FLT-SCHEDULE
flt# weekday airline dtime from atime to
DL242 MO DELTA 10:40 ATL 12:30 BOS
DL242 WE DELTA 10:40 ATL 12:30 BOS
DL242 FR DELTA 10:40 ATL 12:30 BOS
SK912 SA SAS 12:00 CPH 15:30 JFK
SK912 SU SAS 12:00 CPH 15:30 JFK
AA242 MO AA 08:00 CHI 10:10 ATL
AA242 FR AA 08:00 CHI 10:10 ATL
FLIGHTS
flt# date airline plane#
DL242 10/23/00 Delta k-yo-33297
DL242 10/24/00 Delta t-up-73356
DL242 10/25/00 Delta o-ge-98722
AA121 10/24/00 American p-rw-84663
AA121 10/25/00 American q-yg-98237
AA411 10/22/00 American h-fe-65748
FLIGHTS-AIRLINE DATE-AIRLINE-PLANE
flt# airline date airline plane#
DL242 Delta 10/23/00 Delta k-yo-33297
AA121 American 10/24/00 Delta t-up-73356
AA411 American 10/25/00 Delta o-ge-98722
10/24/00 American p-rw-84663
10/25/00 American q-yg-98237
10/22/00 American h-fe-65748
FLIGHTS-AIRLINE DATE-AIRLINE-PLANE
flt# airline date airline plane#
DL242 Delta 10/23/00 Delta k-yo-33297
AA121 American 10/24/00 Delta t-up-73356
AA411 American 10/25/00 Delta o-ge-98722
10/24/00 American p-rw-84663
10/25/00 American q-yg-98237
10/22/00 American h-fe-65748
X Y
FLIGHTS
flt# date airline plane#
FLIGHTS
flt# date airline plane#
address
Armstrong’s Axioms:
– sound
– complete
F is minimal if:
• every dependency in F has a single
attribute as right-hand side
• we can’t replace any dependency X
→A in F with a dependency Y→A
where Y⊂X and still have a set of
dependencies equivalent with F
• we can’t remove any dependency
from F and still have a set of
dependencies equivalent with F
Database Group, Georgia Tech
© Leo Mark 19
Normalization
How to guarantee
lossless joins
R1 R2=R
F+=(F1∪... ∪ Fk)+
• Determinant: an attribute on
which some other attribute is fully
functionally dependent.
Database Group, Georgia Tech
© Leo Mark 23
Normalization
Example of Normalization
FLT-INSTANCE
flt# date plane# airline from to miles
airline
flt# from
plane#
date to
miles
miles
2NF: airline
flt# flt# from
plane#
date to
miles
airline
3NF & flt# from
BCNF: to
flt#
plane# from
date to
miles
Database Group, Georgia Tech
© Leo Mark 25
Normalization
3NF that is not BCNF
R
A B C
A
C
B
A decomposition:
R1 R2
C B A C