Normalization Are we Normal. Normalization Normalization is the process of converting complex data structures into simple, stable data structures It also.

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

Chapter 5 Normalization of Database Tables
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
 Definition  Components  Advantages  Limitations Contents  Definition Definition  Normal Forms Normal Forms  First Normal Form First Normal Form.
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.
Normalization What is it?
Athabasca University Under Development for COMP 200 Gary Novokowsky
Normalization of Database Tables Special adaptation for INFS-3200
Need for Normalization
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: Normalization.
Normalization of Database Tables
4 Chapter 4 Normalization Hachim Haddouti. 4 Hachim Haddouti, CH4, see also Rob & Coronel 2 In this chapter, you will learn: What normalization is and.
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.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
NORMALIZATION N. HARIKA (CSC).
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Week 6 Lecture Normalization
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 3 Objectives: Identifying and Eliminating Database.
Lecture 12 Inst: Haya Sammaneh
Concepts and Terminology Introduction to Database.
Avoiding Database Anomalies
Module Title? DBMS Normalization. Module Title? DBMS Normalization  Normalization is the process of removing redundant data from tables in order to improve.
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Concepts of Database Management Sixth Edition Chapter 5 Database Design 1: Normalization.
Concepts of Database Management, Fifth Edition
A Normalisation Example Mark Kelly McKinnon Secondary College Vceit.com Based on work by Robert Timmer-Arends.
The Relational Model and Normalization R. Nakatsu.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Normalization. We will take a look at –First Normal Form –Second Normal Form –Third Normal Form There are also –Boyce-Codd, Fourth and Fifth normal forms.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
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.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
Database Design – Lecture 8
Component 4/Unit 6d Topic IV: Design a simple relational database using data modeling and normalization Description and Information Gathering Data Model.
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
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.
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
Concepts of Database Management Seventh Edition Chapter 5 Database Design 1: Normalization.
6-1 © Prentice Hall, 2007 Topic 6: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
8-1 © Prentice Hall, 2007 Chapter 8: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Microsoft Access 2010 Chapter 11 Database Design.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
Southern Methodist University CSE CSE 2337 Introduction to Data Management Chapter 5 Part II.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
Decomposition and Normalization Fan Qi
Logical Database Design and Relational Data Model Muhammad Nasir
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
Normal Forms 1NF – A table that qualifies as a relation is in 1NF. (Back)(Back) 2NF – A relation is in 2NF if all of its nonkey attributes are dependent.
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
Chapter 5: Relational Database Design
Chapter 4: Relational Database Design
Database Normalization
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Normalization of Database Tables Uploaded by: mysoftbooks.ml
Normalization Normalization theory is based on the observation that relations with certain properties are more effective in inserting, updating and deleting.
Database.
Presentation transcript:

Normalization Are we Normal

Normalization Normalization is the process of converting complex data structures into simple, stable data structures It also is the process of removing from a database certain “anomalies”

Anomalies Update anomalies—you have to update a record in a number of different places Insertion anomalies—Example: in order to insert a new employee a project must be assigned. If there is no project yet a phantom one must be created. Deletion anomalies—Two types: when you delete a record other vital information is lost, or must delete in several places with the possibility of leaving unattached data islands

Normal Forms There are many Normal Forms—or stages of normalization possible, but we will only focus on the first three.

First Normal Form 1. There are no duplicated rows in the table. 2. Each cell is single-valued (i.e., there are no repeating groups or arrays). 3. Entries in a column (attribute, field) are of the same kind.

Example Table 1 CDIDCDTITLETrackTitleArtistArtist Country 1Sergeant PepperSergeant Pepper, Lucy in the Sky, With a little Help BeatlesUK 2Blood on the TracksTangled up in Blue, Idiot Wind DylanUS CDS Table 1

Another Example Table CDIDCDTitleTrack1Track2Track3 1Sergeant Pepper Sergeant Peppers lonely hearts club band Lucy in the sky with diamonds With a little help 2Blood on the Tracks Tangled up in Blue Idiot WindBucket of Rain

Normalizing The sample tables have repeating groups—ie the tracks associated with each CD. Each column must contain only a single value You also don’t want to find yourself numbering columns like track1, etc. The next table puts the sample table into first normal form

First Normal Form Sample CDIDCDTITLETrackTitleArtistArtist Country 1Sergeant Pepper BeatlesUK 1Sergeant PepperLucy in the SkyBeatlesUK 1Sergeant PepperWith a little HelpBeatlesUK 2Blood on the TracksTangled up in Blue DylanUS 2Blood on the TracksIdiot WindDylanUS

Second Normal Form A table is in 2NF if it is in 1NF and if all non-key attributes are dependent on all of the key and nothing else. This is called functional dependency

Normalizing... In our sample table there are really two separate things going on One is the CD information and one is the track information- To get all track information creates a lot of redundancy in the CD information Each should be dependent on their own key

Second Normal Form Sample CDIDCDTitle 1Sergeant Pepper 2Blood on the Tracks TrackIDTrackTitleCDIDArtistArtist Country 1Sergeant Pepper1BeatlesUK 2Lucy in the Sky1BeatlesUK 3With a little help1BeatlesUK 4Tangled up in Blue2DylanUS 5Idiot Wind2DylanUS

Third Normal Form A table is in 3NF if it is in 2NF and if it has no transitive dependencies. This means that the non primary key attributes don ’ t depend on each other. Look at our second sample table:

Sample Table TrackIDTrackTitleCDIDArtistArtist Country 1Sergeant Pepper1BeatlesUK 2Lucy in the Sky1BeatlesUK 3With a little help1BeatlesUK 4Tangled up in Blue2DylanUS 5Idiot Wind2DylanUS

Normalizing There is a transitive dependency here Artist Country is dependent on Artist, not on TrackID which is the key field of the table The following tables resolve this:

Better TrackIDTrackTitleCDIDArtistID 1Sergeant Pepper11 2Lucy in the Sky11 3With a little Help11 4Tangled up in Blue22 5Idiot wind22 ArtistIDArtistArtistCountry 1BeatlesUK 2DylanUS

Summary Through the process of normalization our original table has become three tables, related by foreign keys: CDs(CDID, CDTitle) ARTISTS(ArtistID, Artist, ArtistCountry) TRACKS(TrackID, TrackTitle, CDID, ArtistID)

MORE… 1. Boyce Codd Normal Form 2. Fourth Normal Form 3. Fifth Normal Form