17
Pheonix Circus School Normalisation Practice

Pheonix Circus School

  • Upload
    wood

  • View
    418

  • Download
    47

Embed Size (px)

DESCRIPTION

Pheonix Circus School. Normalisation Practice. Pheonix Circus School. Your task is to analyse the data requirements and produce a workable database design through applying the normalisation process You will work in pairs/groups………. Normalisation - Stage 1. - PowerPoint PPT Presentation

Citation preview

Pheonix Circus School

Normalisation Practice

Pheonix Circus School

• Your task is to analyse the data requirements and produce a workable database design through applying the normalisation process

• You will work in pairs/groups………

Normalisation - Stage 1

• Study the worksheet and make sure you understand the information you have been given

• Arrange all the attributes in the first column on your board

Normalisation – Stage 1

• Looking at the data and discuss / agree on the answers to the following questions:

1. Which group of attributes are repeated?2. Which group of attributes are not repeated?3. From the non-repeating attributes which is a suitable primary key?

Establishing 1NF

• Separate the repeating attributes and non repeating attributes into 2 tables

• Identify the primary key of the table containing the non-repeating attributes

• Identify the primary key of the table containing the repeating attributes

• Add the primary key of the non-repeating attributes table to the other table to form a composite key

Pheonix Circus School – 1NF

• Your data should now be in 1NF• Make sure your group agree and can explain

your choices• We will check before moving on…….

1NF Solution

1NF Solution

Establishing 2NF

• A table with a single primary key is already in 2NF so look at tables with composite keys

• Remove part key dependencies……..• Does each attribute depend on both parts of the key?

– if yes then keep it– if no then remove it from the current table and place in a

new table • Give the new table a primary key (it will be one of the

attributes in the composite key)

Pheonix Circus School – 2NF

• Your data should now be in 2NF• Make sure your group agree and can explain

your choices• We will check before moving on…….

2NF Solution

2NF Solution

Establishing 3NF

• Remove non-key dependencies• For each table – look at each attribute and decide if it depends on the key or

another attribute– remove any non-dependent attributes to a new table along

with a copy of the attribute it depends on (the new primary key)

– Indicate a link between the tables by assigning a foreign key/primary key pairing

(primary key in new table, foreign key in old table)

• Name each table

Pheonix Circus School – 3NF

• Your data should now be in 3NF• Make sure your group agree and can explain

your choices• We will check before moving on…….

3NF Solution

3NF Solution

Process Summary

• UNF– identify all attributes present

• 1NF– remove repeating attributes into a table– place non-repeating attributes into a table– identify the primary keys

• 2NF – remove part key dependencies

• 3NF– remove non-key dependencies– name all tables