By: Shiraj Mohamed M | MIS | SEUSL SHIRAJ MOHAMED M | MIS | SEUSL 1.

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

NORMALIZATION. Normalization Normalization: The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations.
Normalization What is it?
Topic Database Normalisation S McKeever Advanced Databases 1.
Ch 10, Functional Dependencies and Normal forms
Functional Dependencies and Normalization for Relational Databases.
Normalisation Ensuring data integrity in database design 1.
The Relational Model System Development Life Cycle Normalisation
Normalization of Database Tables
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Chapter 5 Normalization of Database Tables
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
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 Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
July 14, 2015ICS 424: recap1 Relational Database Design: Recap of ICS 324.
NORMALIZATION N. HARIKA (CSC).
Chapter 8 Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Daniel AdinugrohoDatabase Programming 1 DATABASE PROGRAMMING Lecture on 29 – 04 – 2005.
Chapter 5 Normalization of Database Tables
Week 6 Lecture Normalization
CREATE THE DIFFERENCE Normalisation (special thanks to Janet Francis for this presentation)
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Database Systems: Design, Implementation, and Management Tenth Edition
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables.
Normalisation Mia’s Sandwich Shop The Process Explained.
The Relational Model and Normalization R. Nakatsu.
King Saud University College of Computer & Information Sciences Computer Science Department CS 380 Introduction to Database Systems Functional Dependencies.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Normalization for Relational Databases.
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.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Database Normalization Lynne Weldon July 17, 2000.
CORE 2: Information systems and Databases NORMALISING DATABASES.
Functional Dependencies and Normalization for Relational Databases.
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification.
1 5 Normalization. 2 5 Database Design Give some body of data to be represented in a database, how do we decide on a suitable logical structure for that.
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.
By Abdul Rashid Ahmad. E.F. Codd proposed three normal forms: The first, second, and third normal forms 1NF, 2NF and 3NF are based on the functional dependencies.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Normalization of Database Tables
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.
1 CSE 480: Database Systems Lecture 18: Normal Forms and Normalization.
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
What is normalization ? Proposed by Codd in 1972 Takes a relation through a series of steps to certify whether it satisfies a certain normal form Initially.
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
Normalization.
Lecture 3 Functional Dependency and Normal Forms Prof. Sin-Min Lee Department of Computer Science.
Chapter 5.1 and 5.2 Brian Cobarrubia Database Management Systems II January 31, 2008.
Lecture 10 Normalization. Introduction Relations derived from ER model may be ‘faulty’ – Subjective process. – May cause data redundancy, and insert/delete/update.
The Normal Forms 3NF and BCNF
Al-Imam University Girls Education Center Collage of Computer Science 1 st Semester, 1432/1433H Chapter 10_part 1 Functional Dependencies and Normalization.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
Copyright © Curt Hill Schema Refinement II 2 nd NF to 3 rd NF to BCNF.
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.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
Functional Dependencies and Normalization for Relational Databases تنبيه : شرائح العرض (Slides) هي وسيلة لتوضيح الدرس واداة من الادوات في ذلك. حيث المرجع.
Normalizing Database Designs. 2 Objectives In this chapter, students will learn: –What normalization is and what role it plays in the database design.
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Functional Dependencies
Normalization A337.
Sampath Jayarathna Cal Poly Pomona
Logical Data Modeling – Normalization
Presentation transcript:

By: Shiraj Mohamed M | MIS | SEUSL SHIRAJ MOHAMED M | MIS | SEUSL 1

Basically, normalization is the process of structuring the tables in a database for maximum efficiency Normalization involves creating tables and establishing relationships between those tables to make the database more flexible by eliminating redundancy and inconstancies. NORMALIZATION SHIRAJ MOHAMED M | MIS | SEUSL 2

NORMALIZATION… Conceptual Modeling is a subjective process Therefore, the schema after the logical database design phase may not be very good (contain redundant data) However, there are formalisms to ensure that the schema is good. This process is called Normalization SHIRAJ MOHAMED M | MIS | SEUSL 3

NORMALIZATION… Relational database schema = set of relations Relation = set of attributes How we group the attributes to relations is very important SHIRAJ MOHAMED M | MIS | SEUSL 4

SCHEMA REFINEMENT…. DISCUSSED SHIRAJ MOHAMED M | MIS | SEUSL 5

Determine Functional dependencies for relation Find all keys in relation Normalize the relation SCHEMA REFINEMENT STEPS SHIRAJ MOHAMED M | MIS | SEUSL 6

There are many Normal Forms proposed to reduce redundancies Some of the well-known ones are: 1 st Normal Form 2 nd Normal Form 3 rd Normal Form Boyce-Codd Normal Form NORMALIZATION…. SHIRAJ MOHAMED M | MIS | SEUSL 7

Superkey: Set of attributes S in relation R that can be used to identify each tuple uniquely. Key: A key is a superkey with the additional property that removal of any attributes from the key will not satisfy the key condition REVIEW OF SOME TERMS… SHIRAJ MOHAMED M | MIS | SEUSL 8

Candidate Key: Each key of a relation is called a candidate key Primary Key: A candidate key is chosen to be the primary key Prime Attribute: an attribute which is a member of a candidate key Nonprime Attribute: An attribute which is not prime REVIEW OF SOME TERMS… SHIRAJ MOHAMED M | MIS | SEUSL 9

Identify repeating groups of fields Remove repeating groups to a separate tables. Identify the keys for the tables FIRST NORMAL FORM (1NF) SHIRAJ MOHAMED M | MIS | SEUSL 10

Check if all fields are dependent of the whole key Remove Fields That depend on part of the key Group Partially dependent fields as a separate table Name the tables Identify keys to the tables SECOND NORMAL FORM (2NF) SHIRAJ MOHAMED M | MIS | SEUSL 11

Remove Fields That Depend on other non key attribute Group interdependent fields as separate tables, identifies the key and name the tables THIRD NORMAL FORM (3NF) SHIRAJ MOHAMED M | MIS | SEUSL 12

Cus iDCus. Name Cus. AddressOrder No Order Date Item code ItDescUn.pric e Qty 100ABCKadawathaA C-1Dhal ABCKadawathaA C-5Anchor ABCKadawathaA C-10Tea ABCKadawathaA F-4Sunlight ABCKadawathaA F-7Vim ABCKadawathaA F-10Lux ABCKadawathaB C-10Tea ABCKadawathaB F-4Sunlight ABCKadawathaB F-7Vim EXAMPLE SHIRAJ MOHAMED M | MIS | SEUSL 13

Eliminate any duplicate or repeating columns or groups in the same table. Since a Customer can place/have many orders, the above table now can be break into two. Customer Details Table FIRST NORMAL FORM (1NF) Cus iDCus. Name Cus. Address 100ABCKadawatha SHIRAJ MOHAMED M | MIS | SEUSL 14

Order Details Table FIRST NORMAL FORM (1NF) … Cus iDOrder No Order Date Item code ItDescUn.pric e Qty 100A C-1Dhal A C-5Anchor A C-10Tea A F-4Sunlight A F-7Vim A F-10Lux B C-10Tea B F-4Sunlight B F-7Vim SHIRAJ MOHAMED M | MIS | SEUSL 15

Eliminate redundant data. Now the table structure is improved. But you will notice that the Order Date is repeated. So take that out from this table. SECOND NORMAL FORM (2NF) Cus iDOrder No Order Date 100A B Improved Order Details Table SHIRAJ MOHAMED M | MIS | SEUSL 16

Order-Item Table SECOND NORMAL FORM (2NF)… Order No Item code ItDescUn.pric e Qty A-10C-1Dhal A-10C-5Anchor A-10C-10Tea A-10F-4Sunlight A-10F-7Vim A-10F-10Lux B-40C-10Tea B-40F-4Sunlight B-40F-7Vim SHIRAJ MOHAMED M | MIS | SEUSL 17

Eliminate fields that do not depend on the primary key You can notice that the Item Descriptions, Unit Price are not depend on the Oder No. So easily we can take them out from this Order-Item table. Improved Order-Item Table THIRD NORMAL FORM (3NF) SHIRAJ MOHAMED M | MIS | SEUSL 18

THIRD NORMAL FORM (3NF) … Order No Item code Qty A-10C-15 A-10C-54 A-10C-106 A-10F-45 A-10F-74 A-10F-105 B-40C-102 B-40F-41 B-40F-78 Improved Order-Item Table Item code ItDescUn.pric e C-1Dhal C-5Anchor C-10Tea F-4Sunlight30.00 F-7Vim98.25 F-10Lux35.00 Item Details Table SHIRAJ MOHAMED M | MIS | SEUSL 19

Now you will notice that all the details are simplified. So finally you will make four (4) table to store these order details in the database. The tables will be as follows Cus iDCus. Name Cus. Address 100ABCKadawatha Customer Details Table Cus iDOrder No Order Date 100A B Order Details Table SHIRAJ MOHAMED M | MIS | SEUSL 20

Order No Item code Qty A-10C-15 A-10C-54 A-10C-106 A-10F-45 A-10F-74 A-10F-105 B-40C-102 B-40F-41 B-40F-78 Order-Item Table Item code ItDescUn.pric e C-1Dhal C-5Anchor C-10Tea F-4Sunlight30.00 F-7Vim98.25 F-10Lux35.00 Item Details Table SHIRAJ MOHAMED M | MIS | SEUSL 21

EMP_PROJ EXAMPLE02 SS N PNUMHOURSENAMEPNAMELOC FD1 FD2 FD3 SHIRAJ MOHAMED M | MIS | SEUSL 22

SSNENAME EXAMPLE02… SSNPNUMHOURS PNUMPNAMEPLOC EP1 EP2 EP3 SHIRAJ MOHAMED M | MIS | SEUSL 23

EXAMPLE02… ENAMESSNBDATEADDDNUMDNAMEDMGR EMP_DEPT SHIRAJ MOHAMED M | MIS | SEUSL 24

ED1 ED2 EXAMPLE02… ENAMESSNBDATEADDDNUM DNAMEDMGR SHIRAJ MOHAMED M | MIS | SEUSL 25

Denormalization… Sometime for performance reasons, database designer may leave the relation in a lower normal form. This process is known as denormalization. DENORMALIZATION SHIRAJ MOHAMED M | MIS | SEUSL 26

27 SHIRAJ MOHAMED M | MIS | SEUSL End…