Chapter 13 Further Normalization II: Higher Normal Forms.

Slides:



Advertisements
Similar presentations
5NF and other normal forms
Advertisements

Shantanu Narang.  Background  Why and What of Normalization  Quick Overview of Lower Normal Forms  Higher Order Normal Forms.
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 11 Functional Dependencies. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-2 Topics in this Chapter Basic Definitions Trivial.
Wei-Pang Yang, Information Management, NDHU More on Normalization Unit 18 More on Normalization ( 表格正規化探討 ) 18-1.
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.
C.1 Appendix C: Advanced Relational Database Design Reasoning with MVDs Higher normal forms Join dependencies and PJNF DKNF.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Appendix B: Advanced.
Copyright © 2004 Pearson Education, Inc.. Chapter 10 Functional Dependencies and Normalization for Relational Databases.
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.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Part 6 Chapter 15 Normalization of Relational Database Csci455 r 1.
1 Database Design Theory Which tables to have in a database Normalization.
Database Normalization Il-Han Yoo CS 157A Professor: Sin-Min Lee.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
1 Multi-valued Dependencies. 2 Multivalued Dependencies There are database schemas in BCNF that do not seem to be sufficiently normalized. Consider a.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
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.
Chapter 8 Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
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.
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
Copyright © Curt Hill Schema Refinement III 4 th NF and 5 th NF.
©Silberschatz, Korth and SudarshanC.1Database System Concepts, 5 th Ed. Appendix C: Advanced Relational Database Design.
Logical Database Design ( 補 ) Unit 7 Logical Database Design ( 補 )
Chapter 4 The Relational Model and Normalization.
Database Management COP4540, SCS, FIU Relation Normalization (Chapter 14)
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Normalization for Relational Databases.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Further Normalization II: Higher Normal Forms Prof. Yin-Fu Huang CSIE, NYUST Chapter 13.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Normalization.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
Normalization Ioan Despi 2 The basic objective of logical modeling: to develop a “good” description of the data, its relationships and its constraints.
Further Normalization I
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
CSE314 Database Systems Basics of Functional Dependencies and Normalization for Relational Databases Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E.
COMP1212 COMP1212 Anomalies and Dependencies Dr. Mabruk Ali.
Lecture No 14 Functional Dependencies & Normalization ( III ) Mar 04 th 2011 Database Systems.
1 Functional Dependencies and Normalization Chapter 15.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Appendix B: Advanced.
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.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
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 Database Design Algorithms and Further Dependencies.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
Advanced Database System
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Chapter 7: Relational Database Design. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Advanced Normalization
Advanced Normalization
Database Normalization
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Chapter 6 Normalization of Database Tables
Chapter 7: Relational Database Design
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Join Dependencies and Fifth Normal Form
Presentation transcript:

Chapter 13 Further Normalization II: Higher Normal Forms

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-2 Topics in this Chapter Multi-Valued Dependencies and Fourth Normal Form Join Dependencies and Fifth Normal Form The Normalization Procedure Summarized A Note on Denormalization Orthogonal Design Other Normal Forms

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-3 Multi-Valued Dependencies and Fourth Normal Form A multi-valued dependency occurs when a determinant determines more than one dependent, and the dependents are independent of each other Ex.: course implies teacher; course implies text, where teacher and text are independent A relvar with course, teacher and text is all key, and exhibits redundancy, but is in 3NF Updates can exhibit anomalies

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-4 Fourth Normal Form Relvar R is in 4 NF if and only if, whenever there exist subsets A and B of the attributes of R such that the nontrivial multi-valued dependency A multi-determines B is satisfied, then all attributes of R are also functionally dependent on A In the previous example, decompose course, teacher, text into two relvars: course teacher, and course text

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-5 Join Dependencies and Fifth Normal Form There exist relvars that cannot be nonloss- decomposed into two relvars, but can be nonloss-decomposed into more than two Ex.: supplier, part, project A supplier supplies parts and projects, a project is supplied by suppliers and parts, but from this you may not validly conclude that a particular supplier supplies a particular part to a particular project

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-6 Join Dependency Let R be a relvar, and let A, B, … Z be subsets of the attributes of R. Then we say that R satisfies the JD * ( A, B, …. Z ) if and only if every legal value of R is equal to the join of its projections on A, B, … Z Supplier, part, project can be said to satisfy this only if an additional constraint is included to make the specific conclusion valid

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-7 Fifth Normal Form A relvar R is in 5NF – also called projection- join normal form, if and only if every nontrivial join dependency that is satisfied by R is implied by the candidate key(s) of R In the general case, SPJ is not in 5NF, but SP, PJ, and JS are in 5NF 5NF is a generalization of 4NF, which is a generalization of 3NF It is the most general form possible for projection-based normalization

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-8 The Normalization Procedure Summarized Begin with a relvar in 1NF Take projections to eliminate FDs that are not irreducible; result is in 2NF Take projections to eliminate transitive FDs; result is in 3NF Take projections to eliminate FDs in which the determinant is not a candidate key; result is BCNF Continue on next slide

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-9 The Normalization Procedure Continued Using a relvar in BCNF, take projections to eliminate MVDs that are not also FDs In practice it is unlikely that you will need to do this, because you will have eliminated independent relation valued attributes before you began Take projections of 4NF relvars to eliminate JDs that are not implied by the candidate keys, if you can find any

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Normalization Steps By definition 5NF is the final normal form for decompositions based on projection All anomalies are a result of FDs or MVDs or JDs that are not implied by the candidate keys Mathematical relations are complete in 1NF; successive steps are needed because database relations are semantic: they are based on the real world meaning of the data If you design well from the top, the design will be normalized from the beginning

Copyright © 2004 Pearson Addison-Wesley. All rights reserved A Note on Denormalization Denormalization is said to be necessary to improve performance Technically normalization is a model concept, not related to stored files Most people confuse the two, as a shorthand In practice, denormalization will speed up some queries, and drag down others Proceed with caution

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Orthogonal Design Within a given database, no two distinct base relvars should have overlapping meanings Let A and B be distinct base relvars. Then there must not exist nonloss decompositions of A and B into A1, A2 …, Am and B1, B2, …, Bn such that some projection of Ai in the set A1, A2, …, Am and some projection of Bj in the set B1, B2, …, Bn have overlapping meanings Base relvars should have mutually independent meanings

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Other Normal Forms Additional normal forms arise in the analysis of dependency theory Domain-key normal form (DK/NF) is not defined in terms of FDs, MVDs, or JDs A relvar R is in DK/NF if and only if every constraint on R is a logical consequence of the domain constraints and key constraints that apply to R

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Yet More Normal Forms Restriction-union normal form applies when we segment the relvar horizontally, i.e. via restriction rather than projection Sixth normal form represents a generalization of join dependency, which would require a generalization of the projection and join operators By definition, a relvar in 6NF is in 5NF Further research on dependency theory is underway