functional dependencies and normal form Flashcards

1
Q

what is a functional dependency

A

when x implies y, if x agrees then so does y making it redundant as they’re both essentially the same

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

decomposition

A

removing dependencies and anomalies then putting them in their own table

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

deletion anomaly

A

when deleting a record causes something that you didnt mean to to be deleted

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

insertion/modification anomaly

A

cannot insert new data due to other required data missing

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

what is f+ closure (Armstrong’s axioms) used for

A

to analyse functional dependencies and reveal hidden dependencies

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

what are the 5 armstrongs axioms

A

reflexivity
augmentation
transitivity
union
decomposition

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

reflexivity

A

if x ∈ y then y -> x

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

augmentation

A

if x -> y then yz -> z for any z

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

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
10
Q

union

A

if x -> y and x-> z then x -> yz

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

decomposition

A

if x -> yz then x -> y and x-> z

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

what is first normal form

A

only atomic values

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

how do we get to first normal form

A

flatten multivalued attributes into atomic ones
extend the primary key so it contains the new atomic attribute; making a composite key

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

what is second normal form

A

1nf and every non prime attribute should be fully functionally dependent on the entire primary key

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

how do we get to second normal form

A

of there is a partial dependency you need to make a new table

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

what is third normal form

A

2nf and no non-prime attributes should depend on another non-prime attribute

17
Q

how do we get to third normal form

A

if theres a dependency between two non-prime attributes you need to make a new table with both of them and keep only one of them in the og table

18
Q

candidate key

A

minimal set of attributes that can be the primary key of the table

19
Q

prime attributes

A

any attribute part of the candidate key

20
Q

superkey

A

a set of attributes that uniquely identifies each row in the table

21
Q

what is the difference between a candidate key and a super key

A

candidate is minimal