Professional Documents
Culture Documents
C20.0046: Database Management Systems Lecture #7: Matthew P. Johnson Stern School of Business, NYU Spring, 2004
C20.0046: Database Management Systems Lecture #7: Matthew P. Johnson Stern School of Business, NYU Spring, 2004
0046: Database
Management Systems
Lecture #7
Matthew P. Johnson
Stern School of Business, NYU
Spring, 2004
Their join:
R1 R2
Theater N’hood Theater Title
Angelica Village Angelica City of God
Film Forum Village Angelica Fog of War
Film Forum City of God
(R’)
Theater N’hood Title
Angelica Village City of God
Angelica Village Fog of War
Film Forum Village City of God
AArelation
relationRRisisin
in3rd
3rdnormal
normalform
formifif::
For
Forevery
everynontrivial
nontrivialdependency ...,AAnn
dependencyAA11,,AA22,,..., BB
for
for R,
R,{A{A11,,AA22,,...,
...,AAnn}}isisaasuper-key
super-keyfor
forR,R,
or
orBBisispart
partofofaakey,
key,i.e.,
i.e.,BBisisprime
prime
Tradeoff:
BCNF = no FD anomalies, but may lose some FDs
3NF = keeps all FDs, but may have some anomalies