4. Design Principles Flashcards

1
Q

Reasons for nomalization

A

Eliminates redundancy

Makes database more robust to changes

Makes database easier to understand

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

𝑅{𝐴, 𝐡, 𝐢}

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

Normalization terminology

A

𝑅{𝐴, 𝐡, 𝐢} - Denotes a relation R with attributes A, B, C

Functional dependency

Left-irreducability

Heath’s Theorem

𝑋 β‡’ π‘Œ ∢ X Implies Y

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

Functional Dependencies

A

For two given subsets of the attributes of a relation x and y, 𝑋 β‡’ π‘Œ ∢ X Implies Y means that Y is functionally dependent on X

Means that: given a specific value of X, we can find its corresponding Y value

A dependency is trivial if Y is a subset of X

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

Closure

A

The closure of F is the set of all functional dependencies logically implied by F

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

Left Irreducibility

A

When 𝑋 β‡’ π‘Œ ∢ Y is irreducibly dependent upon X if X is as small a subset as possible

i.e. make your primary key a single column if possible

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

Heath’s Theorem

A

Let 𝑅{𝐴, 𝐡, 𝐢} be a relational variable where 𝐴, 𝐡 and 𝐢 are
sets of attributes.

If I satisfies the functional dependency 𝐴 β‡’ 𝐡, R is equal to the join of its projections {A,B}, {A,C}

Meaning: we can split R into 2 relations –> one containing {A,B}, and one containing {A,C} –> then use join to recover the full table

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

Normalization

A

The decomposition of 𝑅 into 𝑅1, 𝑅2, 𝑅n, … , 𝑅τ€―‘ is non-loss if 𝑅
is equal to the join of 𝑅1, … , 𝑅n

Normal Forms: Categories of normalization –> based on treatment of non-key attributes

Objective of normalization is to reduce risks of potential errors
–> so degrees of normal form are essentially degrees of risk you are open to

If a table meets a higher normal form, then it automatically meets the conditions of all of the lower ones

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

1st Normal Form

A

Relational variable is in 1st normal form iff every legal value of that relational variable contains exactly one value

No composite attributes

No multi-value attributes

Each row must be unique –> something must qualify as key

Each column must be unique –> no repeating groups of attributes

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

2nd Normal Form

A

Iff:

1) Requirements for 1st NF are met

2) Every non-key attribute is irreducibly dependent upon the primary key

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

Non-key attribute

A

Attribute that does not participate in the primary key

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

3rd Normal Form

A

Iff:

1) Requirements of 2NF are met

2) Every non-key attribute is non-transitively dependent upon the primary key

3) Every non-key attribute is Mutually Independent

4) There is irreducible dependency

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

Transitive dependency

A

𝐴 β‡’ 𝐡 and 𝐡 β‡’ 𝐢 implies that 𝐴 β‡’ 𝐢

Question to verify this:

If I change a non-key attribute, will I need to change any other non-key attribute?

RULE: non-key attributes should depend upon the key, the whole key, and nothing but the key

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

Mutually Independent

A

Two or more attributes are mutually independent if none of them is functionally dependent upon any combination of the others

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

Irreducibly Dependent

A

When 𝑋 β‡’ π‘Œ, π‘Œ is irreducibly dependent upon 𝑋 if 𝑋 is as small a
subset as possible.

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

4th Normal Form

A

Only multi-valued dependencies allowed are multi-valued dependencies on the key

Must be in Boyce Codd normal form

17
Q

5th Normal Form

A

Iff:

Meets requirements for 4NF

Does not contain any join dependencies

Joining should be lossless