Normalisation Flashcards

(15 cards)

1
Q

What is a primary key?

A

An attribute or combination of attributes that uniquely identifies a row

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

What is a functional dependency?

A

When one attribute uniquely determines another attribute within a relation. It is a constraint that describes how attributes in a table relate to each other

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

What is a key?

A

A set of attributes for which no two tuples in a relation instance have the same values for all attributes of the key

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

What is a superkey?

A

When every attribute of a relation is found under the key

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

What is a candidate key?

A

A minimal superkey of a Relation

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

What is a closure in a database?

A

The full set of attributes that can be determined from a set of known attributes

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

What anomalies can come from bad relations?

A
  • Redundancy
  • Update anomalies
  • Insert anomalies
  • Deletion anomalies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the characteristics of 1st Normal For?

A
  • Relations must be atomic (Cannot be broken down any further, single values, no objections, arrays)
  • No repeating groups
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the characteristics of 2nd Normal Form?

A
  • No partial-key dependencies (Every non-key attribute is dependent on all attributes of all candidate keys)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the characteristics of 3rd Normal Form?

A

All attributes are determined only by the keys (“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
11
Q

What is a trivial dependency?

A

A -> B is a trivial function dependency if B is a subset of A

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

What are the characteristics of Boyce-Codd Normal Form?

A

Slightly stronger version of 3NF
- Every determinant is a candidate key (can uniquely identify any row)
“The key, the whole key, and nothing but the key, so help me Codd”

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

Why is normalisation better?

A
  • No redundancy
  • Efficiency
  • No duplication
  • Changes can cascade across relations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the consequences of normalisation?

A
  • More tables
  • More complexity
  • More relationships
  • Queries become more complex
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What would be the benefits of denormalisation?

A

To improve the speed of queries

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