Database Normalisation Flashcards

1
Q

What is the main goal of database normalisation, and why?

A

The main goal of database normalisation is to eliminate data redundancy.

Doing so reduces the size of the database and avoids problems with database operations.

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

What is data redundancy?

A

The same data occuring multiple times in different parts of the database

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

What is functional dependency?

A

Functional dependency describes the relation between attributes in a relation - if A and B are attributes of a relation, B is functionally dependent on A if each value of A is associated with exactly one value of B

  • A->B means B is functionally dependent on A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is full functional dependency?

A

A full functional dependency describes a functional dependency where, if A functionally determines B, B does not functionally depend on any proper subset of A.

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

What is normalisation?

A

A technique for producing a set of relations with desirable properties, given the data requirements of an enterprise.

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

When is a database in first normal form?

(AKA 1NF)

A
  • Each row must contain only one value for each column
  • Relations obtained by our translation from conceptual to logical design are automatically in first normal form
  • This means there should be no multi-valued attributes in columns, they should be stored in a separate table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When is a database in second normal form?

(AKA 2NF)

A
  • Each attribute individually functionally depends on the whole primary key, not just a single part of the primary key.
  • Decompose the relational schema along the functional dependencies that is only full on a partial key (with this partial key as primary key of the new schema)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is meant by transitive dependency?

A

If A->B and B->C, then C is transitively dependent on A via B.

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

When is a database in third normal form?

(AKA 3NF)

A
  • A relation that is in 2NF and in which no non-primary-key attribute is transitively dependent on the primary key is in third normal form.
  • Each attribute functionally depends on the primary key only, and no other attributes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly