Lecture 2 - Normalisation Basics Flashcards

1
Q

What is another name for normalization?

A

progressive decomposition

  • of unsatisfactory (bad) relations by breaking
    up their attributes into smaller good relations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the degree of normalization?

A

The normal form i.e. how far relations have been decomposed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What degrees of normalization do we need to know about?

A

1NF
2NF
3NF
BCNF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the goal of normalization?

A

Optimal relations, so that when they’re rejoined we do not have fictions tuples and no redundancy. The guidelines are followed throughout the process!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a prime attribute?

A

attribute that belong to some candidate key of a relation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a non-prime attribute?

A

attribute that is not a member of any candidate key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is 1NF?

A

First Normal Form

This form disallows nested attributes and multi valued attributes. i.e. attributes are atomic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do we expect from relations in 1NF?

A

Redundancy and repeated values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is 2NF?

A

Second normal form

A relation R is in 2NF if every non-prime attribute A in R is
fully functionally dependent on the primary key of R

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do we go from 1NF to 3NF?

A

remove all prime attributes from the primary
key, which cause partial dependencies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does : verbosity in PK mean?

A

removing any attribute in PK can’t identify the instance uniquely anymore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is 3NF?

A

Third Normal Form

A relation R is in 3NF (being already in 2NF) if there is no non-
prime attribute which is transitively dependent on the primary key. This means all non-prime attributes should be directly determined from the PK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to go from 2NF to 3NF?

A

Split the original relation into two relations: the non-prime transitive attribute. (the one that joins prime and other non-prime).

transitive attribute becomes PK in new relation and FK in the original relation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is tricky with 3NF?

A

That the transitive attribute can be a candidate key / prime attribute, which would then mean the transitive functional dependency is ok.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is generalized 3nF?

A

Every non-prime attribute A in relation R:
- is fully functionally dependent on every candidate key in R.
- is non-transitively dependent on every candidate key in R

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is BCNF>

A

Boyce-Codd Normal Form

any attribute should be functionally dependent only on the Primary Key (left hand side of a funcional dependency is a PK)

17
Q

Equation for split relation amount?

A

n! / k! (n-k)! where n is the amount of attributes and k is the amount of target relations

18
Q

How should we decompose a relation breaking BCNF ?

A

Then, the relation R should be decomposed into two relations:
- R1 with attributes: R{A} (all attributes in R apart from A)
- R2 with attributes: {X} U {A} (put together X and A)

  • repeat if R1 or R2 not in BCNF (recursive process)