Relational Design Theory

Slides:



Advertisements
Similar presentations
Normalization Decomposition techniques for ensuring: Lossless joins Dependency preservation Redundancy avoidance We will look at some normal forms: Boyce-Codd.
Advertisements

METU Department of Computer Eng Ceng 302 Introduction to DBMS Further Dependencies by Pinar Senkul resources: mostly froom Elmasri, Navathe and other books.
Relational Normalization Theory. Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide.
Jennifer Widom Relational Design Theory Motivation & overview.
Nov 11, 2003Murali Mani Normalization B term 2004: lecture 7, 8, 9.
Multivalued Dependency Prof. Sin-Min Lee Department of Computer Science.
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 Goal = BCNF = Boyce-Codd Normal Form = all FD’s follow from the fact “key  everything.” Formally, R is in BCNF if for every nontrivial FD.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Jennifer Widom Relational Design Theory Boyce-Codd Normal Form.
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.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide DESIGNING A SET OF RELATIONS (2) Goals: Lossless join property (a must). Dependency.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 11 Relational Database Design Algorithms and Further Dependencies.
1 Lecture 7: Normal Forms, Relational Algebra Monday, 10/15/2001.
Functional Dependencies and Relational Schema Design.
Multivalued Dependencies and 4th NF CIS 4301 Lecture Notes Lecture /21/2006.
Jennifer Widom Relational Design Theory Shortcomings of BCNF/4NF.
Jennifer Widom Relational Design Theory Functional Dependencies.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Lecture 11: Functional Dependencies
Normalization Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 19.
Advanced Normalization
Chapter 15 Relational Design Algorithms and Further Dependencies
Normalization DBMS.
Higher Forms of Normalization
CS411 Database Systems 08: Midterm Review Kazuhiro Minami 1.
Normalization First Normal Form (1NF) Boyce-Codd Normal Form (BCNF)
CS422 Principles of Database Systems Normalization
Database Design Dr. M.E. Fayad, Professor
Relational Database Design by Dr. S. Sridhar, Ph. D
Schedule Today: Jan. 23 (wed) Week of Jan 28
Chapter 8: Relational Database Design
3.1 Functional Dependencies
Advanced Normalization
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Problems in Designing Schema
11/12/2018.
Relational Design Theory
Relational Design Theory
Relational Design Theory
Functional Dependencies and Normalization
Module 5: Overview of Normalization
Relational Design Theory
Chapter 7: Relational Database Design
Normalization Murali Mani.
Review  Only two chapters (6 & 7) Normalization Theory Triggers.
Mulitvalued Dependencies
Relational Design Theory
Multivalued Dependencies & Fourth Normal Form
Normalization.
Appendix C: Advanced Normalization Theory
Relational Design Theory
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Lecture 8: Database Design
Decomposition and Higher Forms of Normalization
Instructor: Mohamed Eltabakh
Boyce-Codd Normal Form
Chapter Outline 1 Informal Design Guidelines for Relational Databases
Terminology Product Attribute names Name Price Category Manufacturer
Appendix C: Advanced Relational Database Design
Chapter 28: Advanced Relational Database Design
Database Design Dr. M.E. Fayad, Professor
Database Design Normalisation (2)
Chapter 3: Multivalued Dependencies
Chapter 7a: Overview of Database Design -- Normalization
Functional Dependencies and Normalization
Lecture 09: Functional Dependencies
Design Theory for Relational Databases
Presentation transcript:

Relational Design Theory Multivalued Dependencies & 4th Normal Form

Relational design by decomposition MVDs & 4NF Relational design by decomposition “Mega” relations + properties of the data System decomposes based on properties Final set of relations satisfies normal form No anomalies, no lost information Functional dependencies  Boyce-Codd Normal Form Multivalued dependences  Fourth Normal Form

Example: College application info. FDs? Keys? BCNF? Good design? MVDs & 4NF Example: College application info. Apply(SSN, cName, hobby) FDs? Keys? BCNF? Good design?

Multivalued Dependency MVDs & 4NF Multivalued Dependency Based on knowledge of real world All instances of relation must adhere

MVDs & 4NF Apply(SSN, cName, hobby)

Modified example MVDs? Good design? MVDs & 4NF Apply(SSN, cName, hobby) Reveal hobbies to colleges selectively MVDs? Good design?

Expanded example MVDs & 4NF Apply(SSN, cName, date, major, hobby) Reveal hobbies to colleges selectively Apply once to each college May apply to multiple majors

Trivial Multivalued Dependency Nontrivial MVD MVDs & 4NF Trivial Multivalued Dependency Nontrivial MVD

Rules for Multivalued Dependencies FD-is-an-MVD rule MVDs & 4NF Rules for Multivalued Dependencies FD-is-an-MVD rule

Rules for Multivalued Dependencies Intersection rule Transitive rule MVDs & 4NF Rules for Multivalued Dependencies Intersection rule Transitive rule

Fourth Normal Form MVDs & 4NF Relation R with MVDs is in 4NF if: For each nontrivial A B, A is a key

Fourth Normal Form MVDs & 4NF Relation R with MVDs is in 4NF if: For each nontrivial A B, A is a key

4NF decomposition algorithm MVDs & 4NF 4NF decomposition algorithm Input: relation R + FDs for R + MVDs for R Output: decomposition of R into 4NF relations with “lossless join” Compute keys for R Repeat until all relations are in 4NF: Pick any R’ with nontrivial A B that violates 4NF Decompose R’ into R1(A, B) and R2(A, rest) Compute FDs and MVDs for R1 and R2 Compute keys for R1 and R2

BCNF Decomposition Example #1 MVDs & 4NF BCNF Decomposition Example #1 Apply(SSN, cName, hobby)

BCNF Decomposition Example #2 MVDs & 4NF BCNF Decomposition Example #2 Apply(SSN, cName, date, major, hobby)

Relational design MVDs & 4NF Functional dependencies & Boyce-Codd Normal Form Multivalued dependences & Fourth Normal Form