normalisation

11
BBBIT Prepare for Learn Text about stuff

Upload: listergc

Post on 26-Jun-2015

153 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Normalisation

BBBIT Prepare for Learn

Text about stuff

Page 2: Normalisation

BBBITBBBIT

By the end of today’s lesson;• All of you will understand what 1st,

2nd and 3rd normal form are• Most of you will design a database

in 1NF, 2NF and 3NF• Some of you will convert a

database between 1NF, 2NF and 3NF

Learning Outcomes

Page 3: Normalisation

BBBIT

Normalisation is when we ensure a database is working in its most efficient way. Its main purpose is to;• Organise the data efficiently• Eliminate redundant data• Ensure that only related data is

stored in a table.

Normalisation

Page 4: Normalisation

BBBIT

The rules for 1NF are;• There are no columns with

repeated or similar data• Each data item is atomic• Each row is unique• Each field has a unique name

1st Normal Form

Page 5: Normalisation

BBBIT

Which is NOT in 1NF?

1NF Example

Page 6: Normalisation

BBBIT

The rules for 2NF are;• Non-key attributes must depend on

every part of the primary key• The table must already be in 1NF

2nd Normal Form

Page 7: Normalisation

BBBIT

How can we change this 1NF database to 2NF?

2NF Example

Page 8: Normalisation

BBBIT

The rules for 3NF are;• There are no non-key attributes

that depend on another non-key attribute

• The table must already be in 2NF

3rd Normal Form

Page 9: Normalisation

BBBIT 3NF Example

Page 10: Normalisation

BBBIT

On your whiteboards convert this database to 1NF.

Task 1

Page 11: Normalisation

BBBIT

On your whiteboards convert this database to 2NF.

Once you have done this create a design for a database in 3NF for an online game database that stores player details, games they play and high scores (max 3 games).

Task 2