Databases: Normalisation

From Wikibooks, open books for an open world
Jump to: navigation, search

UNIT 3 - ⇑ Databases ⇑

← Entity relationship modelling Normalisation SQL →


CPT-Databases-ExampleLinkTables.svg

You need to know three stages of Normalisation, a basic outline of the three stages is shown in the image below.

Normalisation is used to keep a database as efficient as it can possibly be without any unnecessary duplication, no redundant data. When working with large volumes of data this can cause a lot of space to be saved and a lot of time to be saved as its less data to process.

1NF - Atomic Data Test[edit]

If a table has a primary key it is said to be in First Normal form if the table does not have repeating groups of attributes. All attributes within the table need to be dependent only on the primary key.

2NF - Partial Dependence Test[edit]

For a table to be in Second Normal form it must first be in First Normal (1NF) Form and then contain no data that is dependent on only part of the Primary Key

3NF - Non-Key Dependence Test[edit]

For a table to be in Third Normal Form(3NF) it must be in Second Normal form and contain No data that is not dependent on the primary Key

NormalFormDiagram.png