NORMALISATION OF DATABASES. WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient.

Slides:



Advertisements
Similar presentations
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
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.
Athabasca University Under Development for COMP 200 Gary Novokowsky
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Chapter 17 Designing Databases
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Project and Data Management Software
Database Design Concepts Info1408
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Normalization.
File and Database Design SYS364. Today’s Agenda WHTSA DBMS, RDBMS, SQL A place for everything and everything in its place. Entity Relationship Diagrams.
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)
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Cambridge TEC - Level 3 Certificate/Diploma IT. ICT Dept ScenarioLO1LO2LO3.
Section 11 : Normalisation
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Concepts and Terminology Introduction to Database.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Concepts of Database Management, Fifth Edition
Database Normalization Lynne Weldon July 17, 2000.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
In this chapter, you learn about the following: ❑ Anomalies ❑ Dependency and determinants ❑ Normalization ❑ A layman’s method of understanding normalization.
CORE 2: Information systems and Databases NORMALISING DATABASES.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
Database Design. Referential Integrity : data in a table that links to data in another table must always work in such a way that following the link will.
G063 - Distributed Databases. Learning Objectives: By the end of this topic you should be able to: explain how databases may be stored in more than one.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Rules of Database Normalization
Chapter 13 Designing Databases Systems Analysis and Design Kendall & Kendall Sixth Edition.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
IS 320 Notes for April 15, Learning Objectives Understand database concepts. Use normalization to efficiently store data in a database. Use.
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
Instructor: Pavlos Pavlikas1 How Data is Stored Chapter 8.
IST Database Normalization Todd Bacastow IST 210.
NORMALIZATION: ‘1NF’ The general rule: ‘’Any field which can have many, must have its own table’’ By Sam Beaumont.
Databases Flat Files & Relational Databases. Learning Objectives Describe flat files and databases. Explain the advantages that using a relational database.
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.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
Logical Database Design and Relational Data Model Muhammad Nasir
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
©G. Millbery 2005Relational and Online Database Management SystemsSlide 1 Module Relational and Online Database Management Systems Normalisation.
Database Planning Database Design Normalization.
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.
SQL Basics Review Reviewing what we’ve learned so far…….
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
Databases – Exam questions
Databases Key Revision Points.
Relational and Online Database Management Systems Normalisation
Database Normalization
Normalization Referential Integrity
Chapter 17 Designing Databases
Presentation transcript:

NORMALISATION OF DATABASES

WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient. They also need to be easy to maintain, and logically this means splitting data up to make it easier to use. “Normalisation usually involves dividing a database into two or more tables and defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications to a field can be made and the propagated through the rest of the database via the relationships”

Over time rules have developed that allows a Database to be designed with more levels of efficiency. These sets are called the Normalisation Forms and are numbered 0 to 5. The short hand for these are 0NF, 1NF, 2NF, 3NF, 4NF, 5NF. However, only the first, second, and third need to be known. These are only guidelines however. A unormalised database is a 0NF

ATOMIC DATA Atomic – The word used to describe an item that can no longer be broken down Examples National Insurance Number – NY ISBN Book Reference – Stock Code – PN10B First Name – John Last Name - Smith

1NF NORMALISATION 1NF Normalisation has certain rules. These are: -There are no columns with repeated or similar data. -Each Data item is Atomic. -Each row is unique i.e. it has a Primary Key. -Each field has a unique name. IDFirst NameLast NameTelephoneTelephone 2Telephone 3 1PeterDavies IDNameTelephoneTelephone 2Telephone 3 1Peter Davies TitleFirst NameLast NameTelephoneTelephone 2Telephone 3 MrPeterDavies IDFirst NameLast NameTelephone 1PeterDavies

2NF NORMALISATION Most Tables have one single attribute, a primary key. But sometimes there can be a compound key, made of more than one attribute. In this example, the primary key is both Venue and Artist. The Rules for 2NF are: -The table must be in first normal form -Non-Key Attributes must depend on every part of the primary key. For example, the Style depends on the Artist, not the Venue. So, we would take Style out, and make another table with Artist as its primary key and Style, and link it back to the original table. VenueArtistAttendanceProfitStyle WembleyGirls Aloud Girl Band NECLeona Lewis Female Soloist

3NF NORMALISATION The rules of 3NF are: -It is already in 2NF -There are no non-key attributes that depend on another non-key attribute For example: The Country is redundant data, which can be found by looking simply at the city, therefore Country can be removed, and we can create another table with City as a primary key, and country, and link it back to the original. VenueArtistAttendanceProfitCityCountry WembleyGirls Aloud LondonUK NECLeona Lewis BirminghamUK

BENEFITS OF NORMALISATION 1.The Database does not have redundant data, so it is smaller in size so less money will have to be spent on storage 2.Because there is less data to search through, it is much faster to run a query 3.Because there is no data duplication, there is better data integrity and less risk of mistakes 4.Because of the lack of duplication of data, there is less chance of storing two different copies of the data 5.One change can be made which will be instantly cascaded across related records

DISADVANTAGES OF NORMALISATION 1.You need to be careful when making Data Atomic. It could change something or make something incorrect to split it up. 2.You could end up with more tables than a unormalised database. 3.The more tables, and the more complex a database, the slower queries are able to run. 4.It is necessary to assign more relationships to interact with more tables. 5.With more tables, setting up queries could become complex.

EXAM QUESTIONS Structured Query Language (SQL) is used with Databases. In a supermarket, the following SQL may be used. [Q9 JAN 2011] SELECT StockNo, Quantity, Price FROM Stock WHERE Quantity < 100 ORDER BY Price DESC 1. From this, state the name of one attribute. [1] One attribute would be Quantity. 2. State the name of one table. [1] The table is Stock. 3.Describe the purpose of the code. [3] The purpose of this code is to show the user any items in the stock that there are less than 100 of.

Draw an E-R diagram for the following: A to B is a one to one relationship B to C is a one to many relationship C to D is a many to one relationship ABCD

A school uses a relational database. Information is held in a table STUDENTS and a table SUBJECTS. [Q10 JUN 2011] 1. State the relationship between STUDENTS and SUBJECTS [1] The relationship is many to many 2. Explain the consequences of this relationship [3] The consequences is that the database cannot be Normalised to the Third Normal Form due to having a many to many relationship 3. The relationship between Student and Tutor is shown. State the relationship [1] The relationship is a many to one relationship