Normalisation Ensuring data integrity in database design 1.

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

RJP/RDA 1 /93 Relational Data Analysis (RDA) RDA organises all the system’s data items into a set of well NORMALISED relations. These should avoid: 1.
WJEC Applied ICT Databases – Attributes & Entities Normalisation It is important in Database Design to make sure that the correct attributes are grouped.
Topic Database Normalisation S McKeever Advanced Databases 1.
GCSE Computing#BristolMet Session Objectives# 21 MUST describe methods of validating data as it is input. SHOULD explain the use of key fields to connect.
Athabasca University Under Development for COMP 200 Gary Novokowsky
Accounting 6500 Relational Databases: Accounting Applications Introduction to Normalization.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Relational Data Analysis Learning outcomes  understand the process of normalisation;  perform Relational Data Analysis;  recognise the importance of.
Normalisation up to 1NF Bottom-up Approach to Data Modelling.
Database Design Concepts Lecture 19 Term 2 week 8 Worked example of normalisation.
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.
Database – Part 2a Dr. V.T. Raja Oregon State University.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
The Teacher Computing Database Design CP4 Revision.
DATA MODELLING TOOLS FOR ORGANISING DATABASES. For a database to be organised and logical, it must be well-designed and set out. In such cases, the databases.
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)
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
Richard Merritt1 Data Modelling Entities, Attributes and Relationships.
Avoiding Database Anomalies
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.
The Relational Model and Normalization R. Nakatsu.
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
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.
BTEC National Extended Diploma1 IT Systems Analysis and Design Entity Relationship Diagrams.
1 n 1 n 1 1 n n Schema for part of a business application relational database.
1 Information Retrieval and Use Data Analysis & Data Modeling, Relational Data Analysis and Logical Data Modeling Geoff Leese September 2009.
Normalisation Africamuseum 5 June What is ‘Normalisation’?  Theoretical: satisfying the requirements of the different ‘Normal Forms’, as spelled.
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.
What's a Database A Database Primer Let’s discuss databases n Why they are hard n Why we need them.
Unit 4 Normalisationand Relational Database Management Systems.
Btec National - Advanced Databases 1 Advanced Databases Entity Relationship Diagrams.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
Creating Databases Data normalization. Integrity and Robustness. Work session. Homework: Prepare short presentation on enhancement projects. Continue working.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network
Normalisation RELATIONAL DATABASES.  Last week we looked at elements of designing a database and the generation of an ERD  As part of the design and.
Flat Files Relational Databases
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Sample Table Standard Notation Entity name in uppercase
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
Databases Database Normalisation. Learning Objectives Design simple relational databases to the third normal form (3NF).
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
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.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
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.
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
Normalisation Worked example for an Order Remember : The data should depend upon the key, the whole key and nothing but the key.
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.
Revised: 2 April 2004 Fred Swartz
Entity relationship diagrams
Normalization A337.
Chapter 4.1 V3.0 Napier University Dr Gordon Russell
Unit 18 Database Design Extended Diploma in ICT Julie Hodsdon
Database Normalisation
Databases 1.
BTEC ICT – Unit 18 With Mr Griffiths.
Normalisation 1 Unit 3.1 Dr Gordon Russell, Napier University
Presentation transcript:

Normalisation Ensuring data integrity in database design 1

Introduction What is normalisation? Why use normalisation? How do we normalise? How far should we normalise data? 1 st, 2 nd and 3 rd Normal Form 2

What is Normalisation? The process of reducing data to a set of relationships (ERDs) Normalisation has three stages: 1 st Normal Form ( 1 NF) 2 nd Normal Form (2NF) 3 rd Normal Form (3NF) Each stage removes further redundancy from the data 3

Why use normalisation? To ensure data integrity and avoid duplication of data To keep attributes atomic Data integrity – all data is consistent throughout the database. Data duplication – is when data is found in more than one location, or data can be calculated (Unit Price, VAT rate, price + VAT). Atomic Attributes – data represents single values, not groups (e.g. do not use ‘subjects’ in student table if they are studying more than one topic). 4

How do we normalise? Make sure all attributes are atomic (single values). All attributes must belong to a single entity (the primary key can be a foreign key in another entity). All attributes must relate to the entity primary key. Normalise as far as possible (3NF is usual). 5

How far should data be normalised? 3 rd Normal Form 1 NF if a table has no repeating attributes or groups of attributes, and all data items are atomic. 2NF when all the fields in a table (other than the primary key fields) are entirely to do with the primary key. 3NF when no non-key attribute is functionally dependent on another non-key attribute. 6

Example – 3NF Project _no EngineerAddress 0000Bailey, S.22 High Street 1111Hussain, R.17 Ford Lane 2222Bailey, S.22 High Street 3333Bailey, S.22 High Street Address is dependant on Engineer (both non-key fields) Where an engineer is in charge of more than one project, data redundancy occurs. Create a new entity to resolve this. 7

Resolving 3NF PROJECT Project_noEngineer 0000Bailey, S. 1111Hussain, R. 2222Bailey, S. 3333Bailey, S. ENGINEER EngineerAddress Bailey, S.22 High Street Hussain, R.17 Ford Lane Now we need to store the address only once If we need to know an engineer’s address we can look it up in the engineer table. The engineer attribute is the link between the two tables, and in the Projects table it is now a foreign key. These relations are now in third normal form. 8

List all attributes 1 st normal form Remove repeating groups by creating further entities 2 nd normal form Reduce duplicate data by identifying primary keys and composite keys 3 rd normal form Check all fields in entities depend wholly on the primary key Student number Forename Surname Gender Tutor Tutor code Unit ID Assessor code Assessor name Date achieved Student Student number Forename Surname Gender Tutor Tutor code *Unit ID Date achieved Unit Unit ID Assessor code Assessor name List primary keys and combinations 1.Student Number 2. Unit ID 3. Student Number, Unit ID Each becomes an entity Student Student number Forename Surname Gender Tutor Tutor code Unit Unit ID Assessor code Assessor name Student Achievement *Student number *Unit ID Date achieved Student Student number Student Forename Student Surname Student Gender *Tutor code Unit Unit id *Assessor code Student Achievement *Student number *Unit ID Date achieved Staff Staff code Staff name 9

List all attributes 1 st normal form Remove repeating groups by creating further entities 2 nd normal form Reduce duplicate data by identifying primary keys and composite keys 3 rd normal form Check all fields in entities depend wholly on the primary key Student number Forename Surname Gender Tutor Tutor code Unit ID Assessor code Assessor name Date achieved Student Student number Forename Surname Gender Tutor Tutor code *Unit ID Date achieved Unit Unit ID Assessor code Assessor name List primary keys and combinations 1.Student Number 2. Unit ID 3. Student Number, Unit ID Each becomes an entity Student Student number Forename Surname Gender Tutor Tutor code Unit Unit ID Assessor code Assessor name Student Achievement *Student number *Unit ID Date achieved Student Student number Student Forename Student Surname Student Gender *Tutor code Unit Unit id *Assessor code Student Achievement *Student number *Unit ID Date achieved Staff Staff code Staff name 10

Summary Make sure all attributes are atomic. Normalise data by removing repeating groups. Relate all fields in a table to the primary key. Create further entities/tables where necessary. 11