2020-06-04 20:17
Page 1

Databases

Lecture 6: Functional Dependencies and Normal Forms

Page 2

Functional Dependencies

Definition

Page 3
Functional Dependencies

Example 2 (from last time)

Page 4
Functional Dependencies

Notation

Page 5

Properties of Functional Dependencies

Transitivity

Page 6
Properties of Functional Dependencies

Augmentation

a b → d implies a b c → d

Page 7
Properties of Functional Dependencies

Reflexivity and trivial dependencies

Page 8
Properties of Functional Dependencies

F- Minimal basis (minimal cover)

Page 9
Properties of Functional Dependencies
Page 10

Functional Dependencies

Page 11
Functional Dependencies

Split tables to avoid redundancy

Page 12

Another Example (1)

Page 13

Another Example (2)

Page 14
Another Example (2)

A better design

Page 15

Database design using FDs

Another way detect and fix the problems with the original table

Page 16

Normal Forms

Page 17

1NF: First Normal Form

Page 18
1NF: First Normal Form
Page 19

Purpose of Normal Forms (beyond 1NF)

Page 20

2NF: Second Normal Form

Page 21
2NF: Second Normal Form

Convert to 2NF by splitting the table

Page 22

3NF: Third Normal Form

Page 23
3NF: Third Normal Form

Convert to 3NF by splitting the table

Page 24

About 3NF…

Does it avoid all problems with redundancies?

Page 25
About 3NF…

Example

Page 26

BCNF: Boyce-Codd Normal Form

Page 27

BCNF Normalisation Algorithm

To normalise a relation R(S)

Page 28
BCNF Normalisation Algorithm

Example

Page 29
BCNF Normalisation Algorithm → Example
Page 30

Another BCNF Normalisation example

Page 31

Multivalued Dependencies (MVDs)

Page 32
Multivalued Dependencies (MVDs)

Another Example

Page 33

Properties of Multivalued Dependencies

Page 34

4NF: Fourth Normal Form

Page 35

4NF Normalisation algorithm

To normalise a relation R(S)

Page 36

Good to know

Page 37

Database Design workflow

Page 38

Further reading