You are on page 1of 15

Normalisation

Before we start….
• The best database systems are carefully
planned and designed by the mean of:
• Analyse; Purpose of creating a new system
• Design
• Test planed
• Implemented
• Tested
• Documented
Normalisation
• Normalisation is mainly linked in Design process
• Information is taken from the analyse report
• All database system requires an normalisation
process
• Once all the fields and tables have been identified
though the normalisation process, A Relationship
can be identified.
Define Normalisation
• A process of breaking a single large flat table into
several smaller tables
• Creating new tables and identifying their relationship
• Make database design more flexible to up date later
• Eliminate redundancy
• If data exists in more than one place or one table. Not in different
tables.
• Eliminates repetition of data within a table
• Repetition is represented in another linked table.
Normalisation Steps
1st Normal Form
Eliminate any Repeating Groups
2nd Normal Form
Splitting Tables
3rd Normal Form
Eliminate Columns Not Dependent on
Key Continue
1st Normal Form
Eliminate any Repeating Groups
• List all the fields in a single table.
• Then separate into individually logical
group/table and provide a primary Key in
each group
2 Normal Form
nd

Splitting Tables

• If the field in a table is not fully dependant


on the key, take it out and place it in a
separate table.
• The new table must have a reasonable name
and a new primary key to define the table
3 Normal Form
rd

Eliminate Columns Not Dependent on Key

• If the field does not contribute to a


description of the key, the field must be
removed to a separate table.
• Each field must be dependant on the key
and independent of one another.
Primary Key
• Primary key is defined or introduced to every new table.
• The main purpose of this is to Identify a record uniquely.
• Can not contain same data in the primary key field.
• Books; ISBN
• Students; Student ID No.
• Customer; Cust_ID, Member_ID, etc
• Complaint; Complaint_ID, Enq_ID
• The field to which the primary key refers to in another
table is called Foreign Key
• The Primary Key and the foreign Key has to be same data
type. (apart from auto number an Number)
What do I Mean???

Primary Key;
Staff_id as Auto Staff_id in TblLog table
number is classified as number
Data Dictionary
Data Dictionary????
• All the tables Identified?
• All the Fields within the table identified?
• Well done…….

• Now describe them……….give definition


Table Field name Field Type
Field Size
Description
Any other
Example
Customer Table to hold customerdetails

Field Type Size Description


primary Key; Uniq no given to
Cust_id AutoNum each customer
Must be identified f_name
s_name
Text
Text
15
16
Customer first name
Customer surname

when designing a add1


Town
Text
Text
20
15
First line of address
town

database
county Text 16 name of the county
tel_no Text 10 customer tel no
dob date 8 customer date of birth

order Hold information about the order placed by customer


o
Field Type Size Description
primary Key; Uniq no given to each
Order No AutoNum order placed
Cust_id Number Customer Id No, no decimal
Total items Number total items orderd, no decimal
Total cost Curency Total cost of item orderd, 2 decimal
Total payed Curency Total payedof item orderd, 2 decimal
Out standing payment on this order,
outstanding Curency 2 decimal, totalcost-total payed
What have we learnt today
• Brief into Relationship (database)
• Normalisation
• Worked on example
• Primary Key
• Data Dictionary
Design
• Data dictionary
• Normalisation of Tables/Fields
• ER Diagram Must
Mustbebedone
doneas
aspaper
paperbase
base
• Form Layout/Design totoget
getaapicture
pictureof
ofhow
howthe
the
• actual
actualsystem
systemwill
willlook
looklike
Query Design like
Makes
Makesthings
thingseasier
easierwhen
when
• Report Layouts actually
actuallyimplementing
implementingthethe
• Test Strategies system
system

You might also like