RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

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.
Normalization What is it?
Normalisation The theory of Relational Database Design.
Chapter 5 Normalization of Database Tables
Normalization of Database Tables Special adaptation for INFS-3200
Normalization of Database Tables
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and 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.
Normalization of Database Tables
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Normalization of Database Tables
Normalization By Albert Lin. 2 Basics Process of efficiently organizing data in a database. Goals Eliminate redundant data Ensure data dependency sensibility.
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
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
NORMALIZATION N. HARIKA (CSC).
Normalization II. Boyce–Codd Normal Form (BCNF) Based on functional dependencies that take into account all candidate keys in a relation, however BCNF.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Normalization Quiz Tao Li Grant Horntvedt. 1. Which of the following statements is true: a. Normal forms can be derived by inspecting the data in various.
Chapter 5 Normalization of Database Tables
Week 6 Lecture Normalization
Lecture 12 Inst: Haya Sammaneh
Concepts and Terminology Introduction to Database.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables.
Normalization. Learners Support Publications 2 Objectives u The purpose of normalization. u The problems associated with redundant data.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
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.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
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.
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.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
Database Principles: Fundamentals of Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables Carlos Coronel, Steven.
©NIIT Normalizing and Denormalizing Data Lesson 2B / Slide 1 of 18 Objectives In this section, you will learn to: Describe the Top-down and Bottom-up approach.
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.
Relational Model & Normalization Relational terminology Anomalies and the need for normalization Normal forms Relation synthesis De-normalization.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
Normalization. 2 u Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data,
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
Normalization ACSC 425 Database Management Systems.
Logical Database Design and Relational Data Model Muhammad Nasir
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
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.
Lecture # 17 Chapter # 10 Normalization Database Systems.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Normalizing Database Designs. 2 Objectives In this chapter, students will learn: –What normalization is and what role it plays in the database design.
Normalization Karolina muszyńska
A brief summary of database normalization
Normalization Referential Integrity
Chapter 6 Normalization of Database Tables
Presentation transcript:

RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third normal forms  Describe the Boyce-Codd Normal Form (BCNF)  Appreciate the need for denormalization

RDBMS Concepts/ Session 3 / 2 of 22 Normalization  The logical design of the database, including the tables and the relationships between them, is the core of an optimized relational database.  A good logical database design can lay the foundation for optimal database and application performance. A poor logical database design can impair the performance of the entire system.

RDBMS Concepts/ Session 3 / 3 of 22  Normalizing a logical database design involves using formal methods to separate the data into multiple, related tables.  A greater number of narrow tables (with fewer columns) is characteristic of a normalized database. A few wide tables (with more columns) is characteristic of an nonnomalized database.

RDBMS Concepts/ Session 3 / 4 of 22 Understanding Data Redundancy  Redundancy means repetition of data  Redundancy increases the time involved in updating, adding, and deleting data  It also increases the utilization of disk space and hence, disk I/O increases

RDBMS Concepts/ Session 3 / 5 of 22 Understanding Data Redundancy (Contd.)  Redundancy can lead to the following problems:  Update anomalies—Inserting, modifying, and deleting data may cause inconsistencies  Inconsistencies—Errors are more likely to occur when facts are repeated  Unnecessary utilization of extra disk space

RDBMS Concepts/ Session 3 / 6 of 22 Definition of Normalization  Normalization is a scientific method of breaking down complex table structures into simple table structures by using certain rules  It allows you to reduce redundancy in a table and eliminate the problems of inconsistency and disk space usage  Normalization results in the formation of tables that satisfy certain specified rules and represent certain normal forms

RDBMS Concepts/ Session 3 / 7 of 22 Normal Forms  The most important and widely used normal forms are:  First Normal Form (1 NF)  Second Normal Form (2 NF)  Third Normal Form (3 NF)  Boyce Codd Normal Form (BCNF)

RDBMS Concepts/ Session 3 / 8 of 22 First Normal Form  A table is said to be in the 1 NF when each cell of the table contains precisely one value  Functional Dependency  The normalization theory is based on the fundamental notion of functional dependency  Given a relation R, attribute A is functionally dependent on attribute B if each value of A in R is associated with precisely one value of B

RDBMS Concepts/ Session 3 / 9 of 22 Un-Normalised Data  Employee No  Employee Name  Branch Code  Branch Name  Branch Location  Certification ID 1….n  Certification Name 1….n  Certification done at  Marks obtained

RDBMS Concepts/ Session 3 / 10 of 22 Rule 1  Eliminate repeating groups:  Make a separate table for each set of repeated attributes and give each table a primary key.

RDBMS Concepts/ Session 3 / 11 of 22 FNF  Employee No  Employee Name  Branch Code  Branch Name  Branch Location  Employee No  Certification ID  Certification Name  Certification done at  Marks obtained

RDBMS Concepts/ Session 3 / 12 of 22 Second Normal Form (2NF)  A table is said to be in 2 NF when it is in 1 NF and every attribute in the row is functionally dependent upon the whole key, and not just part of the key  To ensure that a table is in 2 NF, you should:  Find and remove attributes that are functionally dependent on only a part of the key and not on the whole key and place them in a different table  Group the remaining attributes

RDBMS Concepts/ Session 3 / 13 of 22 Rule 2  Eliminate Redundant Data  If an attribute depends only on part of a multi-valued key, move it to separate table.  The certification Name appears redundantly.(It also depends only on a part of the multi-valued key).

RDBMS Concepts/ Session 3 / 14 of 22 SNF EmployeeCertificationsEmp Certifications Employee No Employee Name Branch Code Branch Name Branch Location Certification ID Certification Name Employee No Certification ID Certification done at Marks obtained

RDBMS Concepts/ Session 3 / 15 of 22 Third Normal Form (3NF)  A relation is said to be in 3 NF when it is in 2 NF and every non-key attribute is functionally dependent only on the primary key  To ensure that a table is in 3 NF, you should:  Find and remove non-key attributes that are functionally dependent on attributes that are not the primary key and place them in a different table  Group the remaining attributes

RDBMS Concepts/ Session 3 / 16 of 22 Rule 3  Eliminate columns not dependent on Key  Employee Table satisfies 1 st & 2 nd normal forms.  But the key is Employee No, and the Branch name & location describe only a branch, Not a employee.

RDBMS Concepts/ Session 3 / 17 of 22 TNF  Employee  Employee No  Name  Branch Code  Branch  Branch Code  Branch Name  Location  Certification  Cert. ID  Cert. Name  Emp Certification  Emp No  Cert Id  Cert. Done at  Marks obtained

RDBMS Concepts/ Session 3 / 18 of 22 Boyce-Codd Normal Form  The original definition of 3NF was inadequate in some situations  It was not satisfactory for the tables:  that had multiple candidate keys  where the multiple candidate keys were composite  where the multiple candidate keys overlapped  Therefore, a new normal form—the Boyce- Codd Normal Form (BCNF) was introduced  A relation is in the Boyce-Codd normal form (BCNF) if and only if every determinant is a candidate key

RDBMS Concepts/ Session 3 / 19 of 22 Characteristics of a normalized database  Each table must have a key field.  All field must contain small data.  There must be no repeating fields.  Each table must contain information about a single entity.  Each field in a table must depend on the key field.  All non-key fields must be mutually independent.

RDBMS Concepts/ Session 3 / 20 of 22 Understanding Denormalization  The end product of normalization is a set of related tables that comprise the database  However, in the interests of speed of response to critical queries, which demand information from more than one table, it is sometimes wiser to introduce a degree of redundancy in tables  The intentional introduction of redundancy in a table to improve performance is called denormalization

RDBMS Concepts/ Session 3 / 21 of 22 Summary In this lesson, you learned that:  Normalization is used to simplify table structures.  Normalization results in the formation of tables that satisfy certain specified constraints, and represent certain normal forms. The normal forms are used to ensure that various types of anomalies and inconsistencies are not introduced in the database. A table structure is always in a certain normal form. Several normal forms have been identified.

RDBMS Concepts/ Session 3 / 22 of 22 Summary (Contd.)  The most important and widely used of these are:  First Normal Form (1NF)  Second Normal Form (2 NF)  Third Normal Form (3 NF)  Boyce Codd Normal Form (BCNF)  The intentional introduction of redundancy in a table in order to improve performance is called denormalization.  The decision to denormalize results in a trade- off between performance and data integrity.  Denormalization increases disk space utilization.