Lecture 12 Inst: Haya Sammaneh

Slides:



Advertisements
Similar presentations
© Pearson Education Limited, Chapter 8 Normalization Transparencies.
Advertisements

Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
The Relational Model System Development Life Cycle Normalisation
1 Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
CS263:Revision on Normalisation
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: Normalization.
Normalization I.
Chapter 5 Normalization Transparencies © Pearson Education Limited 1995, 2005.
1 Minggu 10, Pertemuan 19 Normalization (cont.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
Normalization II. Boyce–Codd Normal Form (BCNF) Based on functional dependencies that take into account all candidate keys in a relation, however BCNF.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Normalization. Introduction Badly structured tables, that contains redundant data, may suffer from Update anomalies : Insertions Deletions Modification.
FUNCTIONAL DEPENDENCIES
Chapter 6 Normalization 正規化. 6-2 In This Chapter You Will Learn:  更動異常  How tables that contain redundant data can suffer from update anomalies ( 更動異常.
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
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.
Chapter 13 Normalization Transparencies. 2 Last Class u Access Lab.
Concepts of Database Management, Fifth Edition
Normalization. Learners Support Publications 2 Objectives u The purpose of normalization. u The problems associated with redundant data.
1 Pertemuan 23 Normalisasi Matakuliah: >/ > Tahun: > Versi: >
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
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.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
Normalization Transparencies
CSC271 Database Systems Lecture # 28.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification.
Chapter 13 Normalization © Pearson Education Limited 1995, 2005.
Lecture 5 Normalization. Objectives The purpose of normalization. How normalization can be used when designing a relational database. The potential problems.
Chapter 13 Normalization Transparencies Last Updated: 08 th May 2011 By M. Arief
Chapter 10 Normalization Pearson Education © 2009.
Normalization Transparencies 1. ©Pearson Education 2009 Objectives How the technique of normalization is used in database design. How tables that contain.
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u How to undertake process of normalization. u How to identify most commonly used normal.
Lecture Nine: Normalization
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
© Pearson Education Limited, Normalization Bayu Adhi Tama, M.T.I. Faculty of Computer Science University of Sriwijaya.
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.
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
Normalization. Overview Earliest  formalized database design technique and at one time was the starting point for logical database design. Today  is.
Objectives of Normalization  To create a formal framework for analyzing relation schemas based on their keys and on the functional dependencies among.
ITD1312 Database Principles Chapter 4C: Normalization.
Chapter 7 Normalization Chapter 14 & 15 in Textbook.
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
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
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.
Chapter 8 Relational Database Design Topic 1: Normalization Chuan Li 1 © Pearson Education Limited 1995, 2005.
Normalization.
Advanced Normalization
Normalization Karolina muszyńska
Normalization DBMS.
Database Normalization
Chapter 14 & Chapter 15 Normalization Pearson Education © 2009.
Chapter 14 Normalization – Part I Pearson Education © 2009.
Database solutions The process of normalization Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms:
Normalization Dale-Marie Wilson, Ph.D..
Normalization.
Chapter 14 Normalization.
Minggu 9, Pertemuan 18 Normalization
Chapter 14 Normalization.
Normalization February 28, 2019 DB:Normalization.
國立臺北科技大學 課程:資料庫系統 2015 fall Chapter 14 Normalization.
Presentation transcript:

Lecture 12 Inst: Haya Sammaneh Normalization Lecture 12 Inst: Haya Sammaneh

Objectives of Normalization How tables that contain redundant data can suffer from update anomalies, which can introduce inconsistencies into a database. The rules associated with the most commonly used normal forms, namely first (1NF), second (2NF), and third (3NF). The identification of various types of update anomalies such as insertion, deletion, and modification anomalies.

Normalization Is a process of deleting different anomalies by splitting the relation into two or more classes 1NF 2NF 3NF BCNF( Boyce coded normal form) 4NF 5NF

Data redundancy and update anomalies Problems associated with data redundancy are illustrated by comparing the Staff and Branch tables with the StaffBranch table.

Data redundancy and update anomalies StaffBranch table has redundant data; the branch information are repeated for every member of staff. In contrast, the branch information appears only once for each branch in the Branch table and only the branch number (branchNo) is repeated in the Staff table, to represent where each member of staff is located.

Data redundancy and update anomalies

Data redundancy and update anomalies

Data redundancy and update anomalies Tables that contain redundant information may potentially suffer from update anomalies. Types of update anomalies include insertion deletion modification

Relationship of Normal Forms

Stages of Normalisation First normal form (1NF) Remove repeating groups Second normal form (2NF) Remove partial dependencies Third normal form (3NF) Remove transitive dependencies Boyce-Codd normal form (BCNF) Remove remaining functional dependency anomalies Fourth normal form (4NF) Remove multivalued dependencies Fifth normal form (5NF) Remove remaining anomalies DB- Introduction

First normal form (1NF) A table in which the intersection of every column and record contains only one value.

Branch table is not in 1NF

Converting Branch table to 1NF

Second normal form (2NF) 2NF only applies to tables with composite primary keys. A table that is in 1NF and in which the values of each non-primary-key column can be worked out from the values in all the columns that make up the primary key.

TempStaffAllocation table is not in 2NF

Second normal form (2NF) Formal definition of 2NF is a table that is in 1NF and every non-primary-key column is fully functional dependent on the primary key. Full functional dependency indicates that if A and B are columns of a table, B is fully dependent on A if B is functionally dependent on A but not on any proper subset of A.

Converting TempStaffAllocation table to 2NF

Third normal form (3NF) The formal definition of 3NF is a table that is in 1NF and 2NF and in which no non-primary-key column is transitively dependent on the primary key.

StaffBranch table is not in 3NF

Third normal form (3NF) For example, consider a table with A, B, and C. If B is functional dependent on A (A  B) and C is functional dependent on B (B  C), then C is transitively dependent on A via B (provided that A is not functionally dependent on B or C). If a transitive dependency exists on the primary key, the table is not in 3NF.

Converting the StaffBranch table to 3NF

Boyce-Codd Normal Form (BCNF) A relation is in BCNF, if and only if every determinant is a candidate key. 31

3NF to BCNF Identify all candidate keys in the relation. Identify all functional dependencies in the relation. If functional dependencies exists in the relation where their determinants are not candidate keys for the relation, remove the functional dependencies by placing them in a new relation along with a copy of their determinant. 33

Fourth Normal Form (4NF) 4NF: A relation that is in Boyce-Codd Normal Form and contains no MVDs. BCNF to 4NF involves the removal of the MVD from the relation by placing the attribute(s) in a new relation along with a copy of the determinant(s). 49

MVD multi-valued dependency Represents a dependency between attributes (for example, A, B, and C) in a relation, such that for each value of A there is a set of values for B, and a set of values for C. However, the set of values for B and C are independent of each other. 48

Normalization BCNF to 4NF Relations 50