Lesson Objectives Aims You should know about: 1.3.2:

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
Normalisation Ensuring data integrity in database design 1.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Project and Data Management Software
Normalization A337. A337 - Reed Smith2 Structure What is a database? ◦ Tables of information  Rows are referred to as records  Columns are referred.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
Normalization.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
The Teacher Computing Database Design CP4 Revision.
Modelling Techniques - Normalisation Description and exemplification of normalisation.Description and exemplification of normalisation. Creation of un-normalised.
CREATE THE DIFFERENCE Normalisation (special thanks to Janet Francis for this presentation)
Cambridge TEC - Level 3 Certificate/Diploma IT. ICT Dept ScenarioLO1LO2LO3.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Normalisation Mia’s Sandwich Shop The Process Explained.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
CORE 2: Information systems and Databases NORMALISING DATABASES.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
Unit 4 Normalisationand Relational Database Management Systems.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
Introduction to a Database Definition: A database is a collection of information held together in an organised manner. For example: A library could be.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
Sample Table Standard Notation Entity name in uppercase
Databases Database Normalisation. Learning Objectives Design simple relational databases to the third normal form (3NF).
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
©G. Millbery 2005Relational and Online Database Management SystemsSlide 1 Module Relational and Online Database Management Systems Normalisation.
MS Access. Most A2 projects use MS Access Has sufficient depth to support a significant project. Relational Databases. Fairly easy to develop a good user.
Starter Draw a mind map for topic 6 Databases. Objectives Revise topic CG3.6 Databases using various activities and ensure that topics covered are understood.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
NORMALISATION OF DATABASES. WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient.
Relational Databases – Further Study I think we’ve covered all you need to know for GCSE about relational databases I’m not aware of any practical coursework.
Flat file and relational databases Flat file database In a flat file database information is held in a single table. Student IDStudent name GenderDOBCourse.
Dr Gordon Russell, Napier University Normalisation 1 - V2.0 1 Normalisation 1 Unit 3.1.
Lesson Objectives Aims You should know about: 1.3.2: (a) Relational database, flat file, primary key, foreign key, secondary key, entity relationship modelling,
Understanding Data Storage
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
Databases Chapter 9 Asfia Rahman.
Database, tables and normal forms
Revised: 2 April 2004 Fred Swartz
Databases – Exam questions
Databases Key Revision Points.
Relational and Online Database Management Systems Normalisation
INFORMATION TECHNOLOGY – INT211
Database Normalization
Chapter 5: Logical Database Design and the Relational Model
CSCI-100 Introduction to Computing
Chapter 4 Relational Databases
Databases A brief introduction….
Relational Model and ER Model: in a Nutshell
Normalization Referential Integrity
Entity relationship diagrams
Database Design ERD and Normalisation
Normalization By Jason Park Fall 2005 CS157A.
Normalization A337.
Normalization and Databases
Chapter 4.1 V3.0 Napier University Dr Gordon Russell
Relational Database Model
Database Management Concepts
Database Normalisation
Logical Data Modeling – Normalization
Chapter 17 Designing Databases
Lesson Objectives Aims You should know about: 1.3.2:
Understand the purpose of normalisation in terms of reducing duplication of data  Understand the purpose of Primary and Secondary Keys in a Database  Learning.
Normalization By Jason Park Fall 2005 CS157A.
BTEC ICT – Unit 18 With Mr Griffiths.
Normalisation 1 Unit 3.1 Dr Gordon Russell, Napier University
Presentation transcript:

Lesson Objectives Aims You should know about: 1.3.2: (a) Relational database, flat file, primary key, foreign key, secondary key, entity relationship modelling, normalisation and indexing.

Some key terms Indexing: An index is a data structure used to shorten the length of time it takes to search a database. An index may point to other sub indexes Because these structures are smaller than the whole database it increases search speed

Normalisation Normalisation is the process of converting a flat file database (with a single table) to a relational database (with many tables). There are various levels of normalisation that remove repetition to a greater or lesser extent.

Normalisation Weird. Because logically, you’d never put data in to the first normal form… But they are clear, well defined steps. Read and make notes on the “Normalisation to 3NF” in the shared area

Task Step 1: Turn the un-normalised data in to 1NF PupilID PupilName DOB ExamID Subject Level Date RoomID RoomName P99010 Jane Grey 12.03.86 CP101 EN004 AR075 Computing English Art AS GCSE 15.05.01 24.05.01 12.06.01 UH UG Hall Gym P99205 Tom Jones 05.11.86 MA110 PH190 Maths Physics 15.06.01 08.06.01 58 Science Lab P99311 Sam Hill 16.08.86 FIRST STEP: To change into First Normal Form – the repeated groups of fields must go. To do this, data must be split in to separate tables

1st Normal Form A table is in First Normal Form (1NF) if there are no repeating groups. In other words, each column must contain only a single value and each row must have an item in every column. This can usually be done by putting the data into two tables ... separating the repeated data into a separate group.

1NF PupilID PupilName DOB ExamID P99010 Jane Grey 12.03.86 CP101 EN004 AR075 P99205 Tom Jones 05.11.86 MA110 PH190 P99311 Sam Hill 16.08.86 ExamID Subject Level Date RoomID RoomName CP101 Computing AS 15.05.01 UH Hall AR075 Art 12.06.01 UG Gym MA110 Maths 15.06.01 PH190 Physics 08.06.01 58 Science Lab EN004 English GCSE 24.05.01

To move to 2NF, any partial dependencies must be removed This basically means each record should not have a composite primary key This removes: Many to many relationships Repeated Data

In the first table, there is a composite key (PupilID and ExamID) Many to many In the first table, there is a composite key (PupilID and ExamID) There is also a lot of data repetition (many students taking many exams) PupilID PupilName DOB ExamID P99010 Jane Grey 12.03.86 CP101 EN004 AR075 P99205 Tom Jones 05.11.86 MA110 PH190 P99311 Sam Hill 16.08.86

Second Normal Form PupilID PupilName DOB P99010 Jane Grey 12.03.86 Tom Jones 05.11.86 P99311 Sam Hill 16.08.86 PupilID ExamID P99010 CP101 EN004 AR075 P99205 MA110 PH190 P99311 ExamID Subject Level Date RoomID RoomName CP101 Computing AS 15.05.01 UH Hall AR075 Art 12.06.01 UG Gym MA110 Maths 15.06.01 PH190 Physics 08.06.01 58 Science Lab EN004 English GCSE 24.05.01

3rd Normal Form removes something called “Transitive Dependency” Third Normal Form 3rd Normal Form removes something called “Transitive Dependency” The advantage of removing transitive dependency is: Amount of data duplication is reduced. Data integrity achieved.

What on earth is transitive dependency? Basically it means all data in the table should be dependent solely on the primary key. Any other data should be in a new table

In our 2NF table, ExamID is the PK However, RoomName does NOT depend on ExamID, it is dependent on RoomID. Therefore this data should be in a new table ExamID Subject Level Date RoomID RoomName CP101 Computing AS 15.05.01 UH Hall AR075 Art 12.06.01 UG Gym MA110 Maths 15.06.01 PH190 Physics 08.06.01 58 Science Lab EN004 English GCSE 24.05.01

PUPILS (PupilID, PupilName, DOB) Jane Grey 12.03.86 P99205 Tom Jones 05.11.86 P99311 Sam Hill 16.08.86 PupilID ExamID P99010 CP101 EN004 AR075 P99205 MA110 PH190 P99311 ExamID Subject Level Date RoomID CP101 Computing AS 15.05.01 UH AR075 Art 12.06.01 UG MA110 Maths 15.06.01 PH190 Physics 08.06.01 58 EN004 English GCSE 24.05.01 RoomID RoomName UH Hall UG Gym 58 Science Lab PUPILS (PupilID, PupilName, DOB) EXAMS (ExamID, Subject, Level, Date, RoomID) PUPIL_SITS (PupilID, ExamID) ROOMS (RoomID, RoomName)

Review/Success Criteria You should know: How to normalise data The definitions of the three normal forms The purpose of normalisation