Quiz 2 Let R(A,B,C,D) be a relation schema with

Slides:



Advertisements
Similar presentations
Schema Refinement: Normal Forms
Advertisements

Schema Refinement: Canonical/minimal Covers
Lecture 21 CS 157 B Revision of Midterm3 Prof. Sin-Min Lee.
Normalization Decomposition techniques for ensuring: Lossless joins Dependency preservation Redundancy avoidance We will look at some normal forms: Boyce-Codd.
Logical Database Design (3 of 3) John Ortiz. Lecture 7Logical Database Design (2)2 Normalization  If a relation is not in BCNF or 3NF, we refine it by.
CS 440 Database Management Systems Practice problems for normalization.
Chapter 11 Functional Dependencies. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-2 Topics in this Chapter Basic Definitions Trivial.
Review for Final Exam Lecture Week 14. Problems on Functional Dependencies and Normal Forms.
Classroom Exercise: Normalization
Multivalued Dependency Prepared by Tomasz Kaciak CS157A.
MVDs: 1 Join Dependencies—Example Let r = A B C = A B |  | A C 1 a x 1 a 1 x 1 a y 1 b 1 y 1 b x 2 a 2 y 1 b y 2 b 2 a y 2 b y Observe: r =  AB r | 
When does a derivative exist? For a function, to be Differentiable at x=c: Left hand limit = Right hand limit of BOTH AND the function MUST be continuous.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Functional Dependencies Prof. Yin-Fu Huang CSIE, NYUST Chapter 11.
Multi-valued Dependencies and Fourth Normal Form
Tests for Parallelograms
DAVID DENG CS157B MARCH 23, 2010 Dependency Preserving Decomposition.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
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.
THIRD NORMAL FORM (3NF) A relation R is in BCNF if whenever a FD XA holds in R, one of the following statements is true: XA is a trivial FD, or X is.
1 Multivalued Dependencies Fourth Normal Form Reasoning About FD’s + MVD’s.
Design Theory for RDB Normal Forms. Lu Chaojun, SJTU 2 Redundant because these info may be figured out by using FD s1  … What’s Bad Design? Redundancy.
Functional Dependencies CIS 4301 Lecture Notes Lecture 8 - 2/7/2006.
© D. Wong Functional Dependencies (FD)  Given: relation schema R(A1, …, An), and X and Y be subsets of (A1, … An). FD : X  Y means X functionally.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
4NF & MULTIVALUED DEPENDENCY By Kristina Miguel. Review  Superkey – a set of attributes which will uniquely identify each tuple in a relation  Candidate.
Advanced Normalization
Design Theory for Relational Databases
CS 440 Database Management Systems
Chapter 15 Relational Design Algorithms and Further Dependencies
Design Theory for RDB Normal Forms.
Schedule Today: Next After that Normal Forms. Section 3.6.
Schema Refinement and Normal Forms
CS411 Database Systems 08: Midterm Review Kazuhiro Minami 1.
Problem Axiom of addition:
Normalization First Normal Form (1NF) Boyce-Codd Normal Form (BCNF)
CPSC-310 Database Systems
Schedule Today: Jan. 23 (wed) Week of Jan 28
The Closure of a set of Attributes
CS 480: Database Systems Lecture 22 March 6, 2013.
Plan for Today Normal forms
3.1 Functional Dependencies
Advanced Normalization
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Functional Dependencies and Normalization for Relational Databases
Functional Dependencies and Normalization
CPSC-310 Database Systems
Normalization Murali Mani.
How to test Whether Subschemes in BCNF??
Multivalued Dependencies & Fourth Normal Form (4NF)
Mulitvalued Dependencies
Functional Dependencies and Normalization
Appendix C: Advanced Normalization Theory
Normalization Part II cs3431.
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Normalization cs3431.
Some slides are from Dr. Sara Cohen
Relational Database Design
Boyce-Codd Normal Form
Chapter 19 (part 1) Functional Dependencies
Third Normal Form.
Multivalued Dependencies
Appendix C: Advanced Relational Database Design
Anomalies Boyce-Codd Normal Form 3rd Normal Form
Chapter 28: Advanced Relational Database Design
Chapter 7b: Normalization
Chapter 3: Multivalued Dependencies
CS4222 Principles of Database System
Design Theory for Relational Databases
Presentation transcript:

Quiz 2 Let R(A,B,C,D) be a relation schema with the FDs ABCD and BCD and the MVD A B. Answer the following: Find all possible keys of R. Is the relation in 4NF? If not, propose a decomposition of R into 4NF relations. (Answer only what is asked - Remember to justify your answer.)

Answer There is no FD that has A in the right hand side, so any key of R must contain A. Since {A}+={A,B,C,D} we conclude that A (or {A}) is the only key of R. To figure out whether the relation is in 4NF or not, we need to look for MVDs that will potentially violate the 4NF condition. Since A is a key of R, we only need to consider MVDs whose left hand side is not A. In this case, BCD is a candidate (because each FD is a MVD). This is a nontrivial MVD. Furthermore B is not a superkey. Therefore, BCD violates the 4NF condition. This implies that R is not in 4NF. This suggests a decomposition: {B,C,D}, {B,A} (using BCD). The FDs of these relations are B CD (and its derived FDs: BC, BD) and A B, respectively. These imply that the newly defined relations only have trivial MVDs or MVDs with the left hand side is a key (BC, BD for the first one) . In other words, the decomposition yields 4NF relations. Hence, we can stop here.