12. Databases Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Normalisation

A

Every attribute is dependent on upon the key; the whole key and nothing but the key.

Why: Eliminate data inconsistencies; minimise data duplication.

If Db is relational it must be normalised.

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

1NF

A

Removal of any repeating attributes or groups of attributes.

We do this by adding a primary key and making a new table with relations based on the primary key.

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

2NF

A

Must be in 1NF first.

Every attribute must be dependent on the whole key and not just part of it. (Composite keys)

Otherwise attributes will repeat.

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

3NF

A

Must be in 2NF first.

Every attribute is 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
5
Q

Tips for normalising

A
  1. If you are unsure, check for any obvious duplication.
  2. You can often get to 3NF through common sense and use of entity modelling.
  3. Many to many relationships must have a link table in between
How well did you know this?
1
Not at all
2
3
4
5
Perfectly