Normalisation Flashcards

1
Q

What is normalisation?

A

A process to come up with the best possible design for a relational database.

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

What are the rules of Normalisation (0NF)?

A
  • No data is unnecessarily duplicated. (Held in more than one table).
  • Data is consistent throughout the database (a customer is not recorded with multiple addresses). This rule occurs due to rule 1.
  • Structure of the table is flexible enough to allow as many or as few items as required to be entered.
  • Structure must allow complex queries to be made.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define 1st Normal Form:

A

A table with no repeating attribute or group of attribute is in 1NF.

eg Product ID: 123, CompID: 123, ABC, @£$ is not in 1NF

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

How are repeating attributes represented?

A

With a line over the top of them.

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

How is 1NF implemented?

A

Usually with a many to many relationship. (A link table exists between the two tables).

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

Define 2nd Normal Form:

A

A table in 1NF and with no partial dependencies is in 2NF.

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

What is a partial dependency?

A

Where one or more attributes depends on only part of a composite primary key.

eg EventName is dependant on EventID but not Year. Since EventID and Year are a composite key, this is a partial dependancy.

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

How may a partial dependency be resolved?

A

By generating a new table.

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

Define 3rd Normal Form:

A

A table in 2NF and with no ‘non key’ dependencies is in 3rd Form.

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

What is a non key dependency?

A

Where the value of one attribute is determined by another attribute that is not part of a key.

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

What is a good way of summarising 3NF?

A

All attributes are dependent on 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
12
Q

What are some of the advantages to normalisation?

A
  • Has no data redundancy (data that appears more than once). This could cause data inconsistencies.
  • Maintenance is easier.
  • Produces smaller tables with fewer fields, so reduces storage space and makes searching/sorting much quicker.
  • Accidental deletions are prevented as a ‘one’ side of a ‘one to many’ relationship cant be deleted.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly