Shantanu Narang.  Background  Why and What of Normalization  Quick Overview of Lower Normal Forms  Higher Order Normal Forms.

Slides:



Advertisements
Similar presentations
Fourth normal form: 4NF 1. 2 Normal forms desirable forms for relations in DB design eliminate redundancies avoid update anomalies enforce integrity constraints.
Advertisements

Higher Normal Forms By John Nicosia CS 157a Fall 2007.
Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
1/22/20091 Study the methods of first, second, third, Boyce-Codd, fourth and fifth normal form for relational database design, in order to eliminate data.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
Chapter 8 Normalization. © 2001 The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Outline Modification anomalies Functional dependencies.
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.
Database Normalization Il-Han Yoo CS 157A Professor: Sin-Min Lee.
1 Functional Dependency and Normalization Informal design guidelines for relation schemas. Functional dependencies. Normal forms. Normalization.
4 TH NORMAL FORM By: Karen McVay. REVIEW OF NFs 1NF  All values of the columns are atomic. That is, they contain no repeating values. 1NF  All values.
7-1 Normalization - Outline  Modification anomalies  Functional dependencies  Major normal forms  Practical concerns.
Chapter 5 Normalization of Database Tables
Databases 6: 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.
Introduction to Schema Refinement
Ch 7: Normalization-Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Chapter 3 The Relational Model and Normalization
Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Lecture 12 Inst: Haya Sammaneh
Copyright © Curt Hill Schema Refinement III 4 th NF and 5 th NF.
Chapter 13 Further Normalization II: Higher Normal Forms.
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
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.
Chapter 7 Normalization. Outline Modification anomalies Functional dependencies Major normal forms Relationship independence Practical concerns.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Chapter 7 Normalization. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Modification anomalies Functional dependencies.
CS143 Review: Normalization Theory Q: Is it a good table design? We can start with an ER diagram or with a large relation that contain a sample of the.
CSC271 Database Systems Lecture # 28.
BCNF & Lossless Decomposition Prof. Sin-Min Lee Department of Computer Science.
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.
1 Functional Dependencies and Normalization Chapter 15.
© D. Wong Ch. 3 (continued)  Database design problems  Functional Dependency  Keys of relations  Decompositions based on Functional Dependency.
©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.
Design Process - Where are we?
Dr. Mohamed Osman Hegaz1 Logical data base design (2) 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,
Normalization.
Chapter 5.1 and 5.2 Brian Cobarrubia Database Management Systems II January 31, 2008.
3 Spring Chapter Normalization of Database Tables.
Multivalued Dependencies Fourth Normal Form Tony Palladino 157B.
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.
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
Objectives of Normalization  To create a formal framework for analyzing relation schemas based on their keys and on the functional dependencies among.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Functional Dependencies and Normalization for Relational Databases تنبيه : شرائح العرض (Slides) هي وسيلة لتوضيح الدرس واداة من الادوات في ذلك. حيث المرجع.
4TH NORMAL FORM By: Karen McVay.
Advanced Normalization
Database Design Dr. M.E. Fayad, Professor
3.1 Functional Dependencies
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Fourth normal form: 4NF.
Module 5: Overview of Normalization
Functional Dependencies and Normalization
Normalization.
Relational Database Design
Chapter 4 The Relational Model and Normalization
Database Design Dr. M.E. Fayad, Professor
Database.
Chapter 7a: Overview of Database Design -- Normalization
Presentation transcript:

Shantanu Narang

 Background  Why and What of Normalization  Quick Overview of Lower Normal Forms  Higher Order Normal Forms

 Each unique Determinant maps to the same value. A1224A1224 B7337B7337 C4234C4234 B7337B7337 A1224A1224 A  B

 Purpose: Remove points of inconsistencies and data redundancies, which are cause by modification anomalies.  1NF, 2NF, 3NF & BCNF focus on eliminating data redundancies based on undesirable functional dependencies.  Higher Normal Forms deal with data redundancies that occur for other reasons.

 1NF - Legal atomic values only  2NF - if none of its non-prime attributes are functionally dependent on a part (proper subset) of a candidate key. (A non-prime attribute is an attribute that does not occur in any candidate key.)  3NF - All non key attributes are dependent upon the primary key.  BCNF - If every determinant is a candidate key.  Determinant: an attribute on which some other attribute is fully functionally dependent

 4NF  5NF  6NF X  DKNF

 Fourth Normal Form(4NF)  Eliminates data redundancy caused by Multi-valued dependencies. (MVD)  A given relations in 4NF may not contain more than one multi-valued dependency.

 MVD? Multi-value Dependencies (X  Y) hold in a relation R if when ever we have two tuples of R that agree on all the attributes of X, then we can swap their Y components and get two tuples that are also in R.

 Example  In Relation R(A,B,C) how can we find if A  B  If the relation has two tuples A11A11 B73B73 C42C42 Then that table should also contain two other tuples where B’s are swapped. Do this for all tuples that have the same A values

 What is so bad about having a table with multiple multi-valued dependencies?  Example:  Consider R(Departments, Jobs, Resources Used) The table has the following MVDs  department  Parts  department  Jobs

 Department d1 works on jobs j1, and j2 with parts p1 and p2  Department d2 works on jobs j3, j4, and j5 with parts p2 and p4  Department d3 works on job j2 only with parts p5 and p6. Department Job Part# d1 j1 p1 d1 j1 p2 Department  Job d1 j2 p1 d1 j2 p2 d2 j3 p2 Department  Part d2 j3 p4 d2 j4 p2 d2 j4 p4 d2 j5 p2 d2 j5 p4 d3 j2 p5 d3 j2 p6

 If you want to add a part to a department, you must create more than one new row.  Likewise, to remove a part or a job from a row can destroy information.  Updating a part or job name will also require multiple rows to be changed.  The solution is to split this table into two tables, one with (department, projects) in it and one with (department, parts) in it. **Only desirable MVD is the ones whose determinant is a super key of R. Special Case: Assume R has the following two-multi value dependencies: A  B and B  C In this case R will be in the fourth normal form iff B and C are dependent on each other.

A relation R is in 5NF if for all join dependencies at least one of the following holds. (a)(R1, R2,..., Rn) is a trivial join-dependency. (b) Every R i is a candidate key for R.

 A table is said to be in the 5NF iff it is in 4NF and every join dependency in it is implied by the candidate keys.  Sometimes its impossible to break the table into 2 tables, that is when you can use the rules of 5NF to normalize.  Generally a table in 4 th NF is always in 5 th NF, but sometimes real world constraint will cause the Relation to be not comply with 5 th NF.

 Join Dependencies: They are basically generalization of MVD.  A condition where the natural join of all its projections results in the reconstruction of R.  If such a condition is present then that relation should be replaced with the tables that consist of its projections.

The psychiatrist is able to offer reimbursable treatment to patients who suffer from the given condition and who are insured by the given insurer. Psychiatrist-to- Insurer-to-Condition is necessary in order to model the situation correctly.

 Suppose, however, that the following rule applies: When a psychiatrist is authorized to offer reimbursable treatment to patients insured by Insurer P, and the psychiatrist is able to treat condition C, then – in the event that the Insurer P covers condition C – it must be true that the psychiatrist is able to provide treatment to patients who suffer from condition C and are insured by Insurer P.

These are all the possible projections of the Previous table. And if (R1 |X| R2) or (R2 |X| R3) or (R1 |X| R3) result in R then there are MVD (4 th NF), and if NJ of {R1, R2, R3} results in R then JD exist and the original table is not in 5 th NF

 Only in rare situations does a 4NF table not conform to 5NF. These are situations in which a complex real-world constraint governing the valid combinations of attribute values in the 4NF table is not implicit in the structure of that table. If s

 DKNF offers a complete solution to the problem of avoiding modification abnormalities  Domain/key normal form (DKNF). A key uniquely identifies each row in a table.  By enforcing key and domain restrictions, the database is assured of being freed from any modification inconsistency.

 Ronald Fagin (1981) proved that if a Relation is in DKNF then it is free from any anomalies(redundancies). Including the ones caused by FDs, MVDs, JDs.  DKNF seems simple enough then why all the hoopla about 1NF, 2NF, 3NF, BCNF, 4NF, 5NF

DKNF not always achievable, and there is no formal definition to verify if a relation schema is in DKNF In short, sets of single-theme tables will most likely be in DKNF.

The End