Normalising a database
Create a relational database; with a primary key; and show relationships
Relational databases use the concept of normalisation or
Normal forms to define well-formed tables.

1. Normal Forms (NF)

ü  Rules aimed at eliminating redundancy within the database;
ü  Each table is given a primary key;
ü  Usually results in more tables than would have otherwise been
ü included;
ü  Results in independent tables that can be edited without
ü affecting other tables;
ü  There should be nothing common between any of the tables.
ü  sets out to establish common ground between the tables so
    they can be related;
ü  A field is established that is common to each set of two
    tables;
ü The common field is used to link the two tables.
The use of normalisation ensures that there are no problems
When modifying the database:

    ü  Each table can be edited and manipulated separately;
    ü  Relationships can be established between each table when
    ü data is needed from more than one table.

 Example ~ the school database INF
 •  all fields related to students would become one table: Students
 •  all fields related to teachers would become the second table: Teachers

 The link between Teachers and Students is Class
     ü  A ClassCode filed will be established to allow one table to read the data in
         the other table;
     ü  ClassID may be the primary key of the Students table;
     ü  ClassID, containing the exact same data, may be the foreign key of the
         Teachers table;
     ü  The list of students in the teacher s class can then be accessed through
         the relationship
     ü  Established between the two tables.
When normalising a database you should achieve four goals:

ü  Arranging data into logical groups such that each group describes a small
    part of the whole

ü  Minimizing the amount of duplicated data stored in a database

ü  Building a database in which you can access and manipulate the data
    quickly and efficiently without compromising the integrity of the data storage

ü  Organising the data such that, when you modify it, you make the changes in
    only one place
Normalization is a complex process with many specific rules and
different intensity levels. In its full definition, normalization is the process
of discarding repeating groups, minimizing redundancy,
eliminating composite keys for partial dependency and separating
non-key attributes.

A properly normalised design allows you to:
•  Use storage space efficiently
•  Eliminate redundant data
•  Reduce or eliminate inconsistent data
•  Ease the database maintenance burden


A bad database design usually include:
•  Repetition of information
•  Inability to represent certain information
•  Loss of information
•  Difficulty to maintain information
The Process of Normalisation
While many people find the process of
normalisation quite confusing, this is generally
because the formal definitions tend to be quite
jargon-heavy and the basic concepts become
hidden beneath a murky surface of functional
dependencies, determinants and key attributes.
A very good way of understanding normalisation
is to use an analogy of paragraphs and good
writing.

• Any basic language course teaches the fact that
all good writing uses single-theme paragraphs.
That is, each paragraph should deal solely with a
single theme; a paragraph with more than one
theme should be split into separate paragraphs –
one for each theme
Normalisation uses the same idea: each table
should only contain information related to a
single concept.

HINT:
If it contains more than the table should be split
into a number of smaller, related tables
Initial Schema
Student Borrowing
Family notification of Student Borrowing
Additional Schema
Student School Schema

Normalisation student summary

  • 1.
    Normalising a database Createa relational database; with a primary key; and show relationships
  • 2.
    Relational databases usethe concept of normalisation or Normal forms to define well-formed tables. 1. Normal Forms (NF) ü  Rules aimed at eliminating redundancy within the database; ü  Each table is given a primary key; ü  Usually results in more tables than would have otherwise been ü included; ü  Results in independent tables that can be edited without ü affecting other tables; ü  There should be nothing common between any of the tables.
  • 3.
    ü  sets outto establish common ground between the tables so they can be related; ü  A field is established that is common to each set of two tables; ü The common field is used to link the two tables.
  • 4.
    The use ofnormalisation ensures that there are no problems When modifying the database: ü  Each table can be edited and manipulated separately; ü  Relationships can be established between each table when ü data is needed from more than one table. Example ~ the school database INF •  all fields related to students would become one table: Students •  all fields related to teachers would become the second table: Teachers The link between Teachers and Students is Class ü  A ClassCode filed will be established to allow one table to read the data in the other table; ü  ClassID may be the primary key of the Students table; ü  ClassID, containing the exact same data, may be the foreign key of the Teachers table; ü  The list of students in the teacher s class can then be accessed through the relationship ü  Established between the two tables.
  • 5.
    When normalising adatabase you should achieve four goals: ü  Arranging data into logical groups such that each group describes a small part of the whole ü  Minimizing the amount of duplicated data stored in a database ü  Building a database in which you can access and manipulate the data quickly and efficiently without compromising the integrity of the data storage ü  Organising the data such that, when you modify it, you make the changes in only one place
  • 6.
    Normalization is acomplex process with many specific rules and different intensity levels. In its full definition, normalization is the process of discarding repeating groups, minimizing redundancy, eliminating composite keys for partial dependency and separating non-key attributes. A properly normalised design allows you to: •  Use storage space efficiently •  Eliminate redundant data •  Reduce or eliminate inconsistent data •  Ease the database maintenance burden A bad database design usually include: •  Repetition of information •  Inability to represent certain information •  Loss of information •  Difficulty to maintain information
  • 7.
    The Process ofNormalisation While many people find the process of normalisation quite confusing, this is generally because the formal definitions tend to be quite jargon-heavy and the basic concepts become hidden beneath a murky surface of functional dependencies, determinants and key attributes.
  • 8.
    A very goodway of understanding normalisation is to use an analogy of paragraphs and good writing. • Any basic language course teaches the fact that all good writing uses single-theme paragraphs. That is, each paragraph should deal solely with a single theme; a paragraph with more than one theme should be split into separate paragraphs – one for each theme
  • 9.
    Normalisation uses thesame idea: each table should only contain information related to a single concept. HINT: If it contains more than the table should be split into a number of smaller, related tables
  • 10.
  • 11.
    Family notification ofStudent Borrowing Additional Schema
  • 12.