Normalization Flashcards

1
Q

What is 1NF?

A

No multivalued columns

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

What is 2NF?

A

1NF & no partial dependencies

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

What is 3NF?

A

2NF & no transitive dependencies

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

What is BCNF?

A

3NF & every dependency has the form X -> Y where, Y ⊆ X or X is a super key

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

What are the 3 Armstrong Axioms?

A

Reflexivity
Augmentation
Transitivity

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

What is Reflexivity?

A

If X ⊆ Y
then Y -> X

If you have A, B, C -> A, B, C

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

What is Augmentation?

A

If X -> Y
then X, Z -> Y, Z

If we have A, B -> C then we can say A, B, Z -> C, Z

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

What is Transitivity?

A

If X -> Y and Y -> Z

then X -> Z

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

What are the 6 steps in ‘Table Decompositions’?

A
  1. Determine FDs
  2. Determine all CKs
  3. Identify PD & TDs
  4. Gather all PDs & TDs that have the same determinant into a single FD statemen
  5. Decompose table T with respect to the largest PD statement
  6. Repeat steps 1-5 until no tables have PDs or TDs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When decomposing tables. What does T1 contain?

A
  • All columns from T except the dependent columns of the largest PD
  • A single FK in T1 on the determinant columns of the largest PD referencing the primary key of T2
  • Bring down all the constraints that were in T
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When decomposing tables. What does T2 contain?

A

Contain all columns from the largest PD

The determinant of the largest PD becomes the PK of T2

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

What is ‘Determinant’?

A

Left side of all functional dependencies

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

What are ‘Dependent Columns’

A

Right side of all functional dependencies

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

What are ‘Partial Dependencies’?

A

A FD where 1 or more non-key attributes are dependent on only part of a candidate key

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

What are ‘Transitive Dependency’?

A

A FD where 1 or more non-key attributes are dependent on a determinant that includes a non-key attribute

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

Decompose T into a normalized set of tables (BCNF)

T(A, B, C, D, E, F)

A, B -> C
A, B -> D, E
C -> D, E
E -> F

A

Non-trivial FDs:
C -> F
A, B -> F

CK: (A,B)

T1(#A, #B, <u>C</u>)
T2(#C, D, E)
T3(#E,F)

17
Q

Decompose T into a normalized set of tables (BCNF)

T(A, B, C, D)

A, B -> C
A, B -> D
B, C -> D
A -> D

A

Non-trivial FDs:
A -> D
B, C -> D

CK: (A,B)

T1(<u>#A</u>, #B, C)
T2(#A, D)

18
Q

What is 4NF?

A

BCNF &

Table has no multi-valued dependencies

19
Q

What are the anomalies that lead to issues due to redundancy?

A
  • Insertion Anomaly
  • Deletion Anomaly
  • Updation Anomaly
20
Q

What is an ‘Insertion Anomaly’?

A

To insert redundant data for every new row