NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,

Slides:



Advertisements
Similar presentations
Boyce-Codd NF Takahiko Saito Spring 2005 CS 157A.
Advertisements

Chapter 3 Notes. 3.1 Functional Dependencies A functional dependency is a statement that – two tuples of a relation that agree on some particular set.
Normalization Dr. Mario Guimaraes. Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints.
The Relational Model System Development Life Cycle Normalisation
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
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.
Normalization I.
Chapter 5 Normalization Transparencies © Pearson Education Limited 1995, 2005.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
1 Minggu 10, Pertemuan 19 Normalization (cont.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
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.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Normalization. Introduction Badly structured tables, that contains redundant data, may suffer from Update anomalies : Insertions Deletions Modification.
FUNCTIONAL DEPENDENCIES
Lecture 12 Inst: Haya Sammaneh
Dr. T. Y. Lin | SJSU | CS 157A | Fall 2015 Chapter 3 Database Normalization 1.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
Logical Database Design ( 補 ) Unit 7 Logical Database Design ( 補 )
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
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 Transparencies
CSC271 Database Systems Lecture # 28.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
Further Normalization I
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification.
CSE314 Database Systems Basics of Functional Dependencies and Normalization for Relational Databases Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
Lecture No 14 Functional Dependencies & Normalization ( III ) Mar 04 th 2011 Database Systems.
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.
1 Functional Dependencies and Normalization Chapter 15.
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.
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,
Normalization.
CS 338Database Design and Normal Forms9-1 Database Design and Normal Forms Lecture Topics Measuring the quality of a schema Schema design with normalization.
Ch 7: Normalization-Part 1
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Dr. T. Y. Lin | SJSU | CS 157A | Fall 2015 Chapter 3 Database Normalization 1.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
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.
Advanced Database System
Database Architecture Normalization. Purpose of Normalization A technique for producing a set of relations with desirable properties, given the data requirements.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Dr. T. Y. Lin | SJSU | CS 157A | Fall 2015 Chapter 3 Database Normalization 1.
Chapter 8 Relational Database Design Topic 1: Normalization Chuan Li 1 © Pearson Education Limited 1995, 2005.
Normalization.
Normalization (Database Design)
Normalization Karolina muszyńska
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Database Normalization
Chapter 14 & Chapter 15 Normalization Pearson Education © 2009.
Chapter 14 Normalization – Part I Pearson Education © 2009.
Normalization Dale-Marie Wilson, Ph.D..
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Chapter 14 Normalization.
Unit 7 Normalization (表格正規化).
Normalization February 28, 2019 DB:Normalization.
國立臺北科技大學 課程:資料庫系統 2015 fall Chapter 14 Normalization.
Presentation transcript:

NormalizationNormalization Chapter 4

Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties, given the data requirements of an enterprise.  The process of normalization is a formal method that identifies relations based on their primary or candidate keys and on the functional dependencies among their attributes.  Normalization supports a number of tests, which can be applied to relations so that a relational schema can be normalized to a specific form to prevent the possible occurrence of update anomalies.

First Normal Form Relation We saw before that a relation should have the following properties: A relation in a database has a unique name. Each cell of the relation contains exactly one atomic value. Each attribute has a distinct name within a relation. The values of an attribute are all from the same domain. The order of the attributes has no significance. Each tuple is distinct; there are no duplicate tuples. The order of tuples has no significance, theoretically. In that case we say that the relation is in FIRST NORMAL FORM (1NF).

Normalization Process: 1NF Un-normalized form  A table that contains repeating Groups First Normal Form  A relation in which the inter- section of each row and column contains one and only one value

Sample Database : 1NF Constraints Primary Key : S#, P# A city has a specific status A Supplier Is located in one City First

Update Anomalies Insertion Anomalies  each time we insert a new part for a supplier we have to repeat status and city  we cannot insert a new supplier before he supplies a part Deletion Anomaly  If we delete the fact that S3 supplies P2 we delete the row and we do not know anymore that he is located in Paris Modification Anomalies  If S1 moves from London to Berlin we have to modify 6 rows  If the status of London changes we have to modify 9 rows in order to avoid inconsistency

Functional Dependencies Functional Dependency  Describes the relationship between attributes in a relation  If A and B are attributes of relation R, B is functionally dependent on A, if each value of A in R is associated with exactly one value of B in R  notation A  B  Functional dependency diagram Determinant  The determinant of a functional dependency refers to the attribute or group of attributes on the starting point of the arrow AB B is functionally dependent on A

Functional Dependencies in FIRST QTY S# P# Status City

Sample Database : 1NF Constraints Primary Key : S#, P# A city has a specific status A Supplier Is located in one City First

Lossless-join and Dependency Preservation Properties Two important properties of decomposition  Lossless-join property enables us to find any instance of the original relation from corresponding instances in the smaller relations.  Dependency preservation property enables us to enforce a constraint on the original relation by enforcing some constraint on each of the smaller relations.

Full Functional Dependency Full Functional Dependency indicates that if A and B are attributes of a relation, B is fully functionally dependent on A if B is functionally dependent on A, but not on a proper subset of A. e.g.First.(S#, Status ) First.City First. S#First.City In fact full functional dependence is a more important concept than functional dependence

Normalization Process: 2NF A relation is in second normal form if it is in first normal form and every non-primary-key attribute is fully functional dependent on the primary key. The reduction consists of a suitable projection Supplier 5 is inserted If in a 1NF relation the primary has only one attribute, the relation is also in 2NF SPSecond

Functional Dependencies in SP and Second QTY S# P# Status City S# Elimination of non-fully functional dependencies

Normalization Process: 3NF A relation in third normal form is a relation that is in first and second normal form, and in which no non- primary-key attribute is transitively dependent on the primary key. SCCS

Functional Dependencies in SP, SC and CS QTY S# P# City S# Status Elimination of transitive dependencies

Inter-relational Dependency QTY S# P# City S# Status The three relations are also in 3NF but there is an inter-relational dependency Bad decomposition

Normalization Process: BCNF A relation is in Boyce-Codd normal form if and only if every determinant is a candidate key.  This definition doesn’t refers to other normal forms.  BCNF is stronger than 3NF If a relation is in third normal form, violation of the BCNF is quite rare. It may only happen under the specific conditions that the relation :  contains two or more composite candidate keys  which overlap and share at least one attribute in common  this attribute is fully dependent on the primary key

Boyce-Codd Normal Form (BCNF) Violation of BCNF may occur in a relation that  contains two (or more) composite keys  which overlap and share at least one attribute in common.

Multivalued Dependency In R(A,B,C) the multivalued dependency R.A R.B holds in R, if and only if the set of B-values matching a given pair (A,C) is independent of the C-value.  Multivalued dependencies always go together in pairs  notation R.A R.B R.C  functional dependency is a special case of multivalued dependency  example CTX

Normalization Process: 4NF CTX Normalized 4NF CTX.Course CTX.Teacher CTX.Course CTX.Text Omit multivalued dependencies