Академический Документы
Профессиональный Документы
Культура Документы
1
Fourth normal form: 4NF
Normal forms
2
Fourth normal form: 4NF
3
Fourth normal form: 4NF
4NF
4
Fourth normal form: 4NF
Motivation - 4NF
5
Fourth normal form: 4NF
CTB
Course Tutors Books
Databases M. Ursu Introduction to DB
M. Ursu OO and Java
M. Harman DB Design
Languages J. Kuljis Pascal - How to ...
M. Ursu Programming in
Prolog
OO and Java
... ... ...
6
Fourth normal form: 4NF
1N relation
7
Fourth normal form: 4NF
Note
8
Fourth normal form: 4NF
Question
9
Fourth normal form: 4NF
Shortcomings
redundancy
therefore: update anomalies
• e.g. add a new tutor, C. Fox, for the Databases course: both
tuples, (Databases, C. Fox, Introduction to DB) and
(Databases, C. Fox, DB Design), have to be added
• could you think of a better solution?
10
Fourth normal form: 4NF
Common-sense solution
11
Fourth normal form: 4NF
Course Books
Course Tutors Databases Introduction to DB
Databases M. Ursu DB Design
M. Harman Languages Pascal - How to ...
Languages J. Kuljis Programming in
M. Ursu Prolog
OO and Java
12
Fourth normal form: 4NF
Bring to 1NF
Course Book
Course Tutor Databases Introduction to DB
Databases M. Ursu Databases DB Design
Databases M. Harman Languages Pascal - How to ...
Languages J. Kuljis Languages Programming in
Languages M. Ursu Prolog
Languages OO and Java
13
Fourth normal form: 4NF
Solution
14
Fourth normal form: 4NF
15
Fourth normal form: 4NF
16
Fourth normal form: 4NF
Multi-valued dependency
(Elmasri and Navathe, 2000, p. 514)
17
Fourth normal form: 4NF
Trivial MVDs
18
Fourth normal form: 4NF
Questions
is every FD a MVD?
is every MVD a FD?
19
Fourth normal form: 4NF
Towards 4NF
20
Fourth normal form: 4NF
Theorems
21
Fourth normal form: 4NF
4NF
22
Fourth normal form: 4NF
Fagin’s theorem
23
Fourth normal form: 4NF
Example
Course Book
Course Tutor Databases Introduction to DB
Databases M. Ursu Databases DB Design
Databases M. Harman Languages Pascal - How to ...
Languages J. Kuljis Languages Programming in
Languages M. Ursu Prolog
Languages OO and Java
24
Fourth normal form: 4NF
Discussion
25
Fourth normal form: 4NF
Discussion
26
Fourth normal form: 4NF
Discussion
what about
R = (Patient, Disease, Treatment, Nurse)
where
a patient can have a number of diseases (independently
of treatments and nurses)
a disease has a number of treatments (independently of
patients and nurses);
a treatment is administered by a number of nurses
(independently of patients and diseases).
27
Fourth normal form: 4NF
Discussion
what about
R = (Patient, Disease, Doctor, Nurse)
where
a patient has a number of diseases independently of
doctors and nurses
a patient has a unique doctor for a given disease
a doctor has (works with) a number of nurses,
independently of patients and diseases
28
Fourth normal form: 4NF
Conclusion
29