Problem Axiom of addition:

Slides:



Advertisements
Similar presentations
Chapter 11 Functional Dependencies. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-2 Topics in this Chapter Basic Definitions Trivial.
Advertisements

Review for Final Exam Lecture Week 14. Problems on Functional Dependencies and Normal Forms.
1 Design Theory. 2 Minimal Sets of Dependancies A set of dependencies is minimal if: 1.Every right side is a single attribute 2.For no X  A in F and.
1 Design Theory. 2 Let U be a set of attributes and F be a set of functional dependencies on U. Suppose that X  U is a set of attributes. Definition:
Classroom Exercise: Normalization
Normalization DB Tuning CS186 Final Review Session.
Normalization DB Tuning CS186 Final Review Session.
Multivalued Dependency Prepared by Tomasz Kaciak CS157A.
Design Theory.
1 CMSC424, Spring 2005 CMSC424: Database Design Lecture 9.
Lossless Decomposition Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Boyce-Codd NF & Lossless Decomposition Professor Sin-Min Lee.
1 Triggers: Correction. 2 Mutating Tables (Explanation) The problems with mutating tables are mainly with FOR EACH ROW triggers STATEMENT triggers can.
Normal Forms1. 2 The Problems of Redundancy Redundancy is at the root of several problems associated with relational schemas: Wastes storage Causes problems.
Lecture 09: Functional Dependencies. Outline Functional dependencies (3.4) Rules about FDs (3.5) Design of a Relational schema (3.6)
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.
CHAPTER 19 SCHEMA, REFINEMENT AND NORMAL FORMS
1 Lecture 7: Normal Forms, Relational Algebra Monday, 10/15/2001.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Functional Dependencies and Relational Schema Design.
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.
Functional Dependencies Quiz. Project Relation Attributes project name – pname start date – start budget customer name – cname customer phone – cphone.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Formal definition of a key A key is a set of attributes A 1,..., A n such that for any other attribute B: A 1,..., A n  B A minimal key is a set of attributes.
Functional Dependencies and Normalization 1 Instructor: Mohamed Eltabakh Part 2.
Lecture 11: Functional Dependencies
Normalization.
Advanced Normalization
CS 440 Database Management Systems
Design Theory for RDB Normal Forms.
Relational Database Design (Discussion Session)
CS411 Database Systems 08: Midterm Review Kazuhiro Minami 1.
CPSC-310 Database Systems
Relational Database Design
The Closure of a set of Attributes
Plan for Today Normal forms
3.1 Functional Dependencies
Handout 4 Functional Dependencies
Advanced Normalization
Schema Refinement & Normalization Theory
Problems in Designing Schema
Schema Refinement and Normalization
Schema Refinement and Normalization
Functional Dependencies and Normalization
How to test Whether Subschemes in BCNF??
Exercise R(A,B,C,D) with FD’s ABC, CD, and DA
Functional Dependencies and Normalization
Functional Dependencies and Relational Schema Design
Introduction to Database Systems CSE 444 Lectures 8 & 9 Database Design October 12 & 15, 2007.
CSCI 6315 Applied Database Systems – Exercise (4)
CSCI 4333 Database Design and Implementation – Exercise (4)
Lecture 8: Database Design
Some slides are from Dr. Sara Cohen
CS 405G: Introduction to Database Systems
CSCI 4333 Database Design and Implementation – Exercise (4)
Relational Database Design
Schema Refinement and Normalization
Instructor: Mohamed Eltabakh
Third Normal Form.
Relational Database Theory
CSC 453 Database Systems Lecture
Quiz 2 Let R(A,B,C,D) be a relation schema with
Chapter 3: Design theory for relational Databases
Lecture 09: Functional Dependencies
CS4222 Principles of Database System
Design Theory for Relational Databases
Presentation transcript:

Problem Axiom of addition: If X ® Y and W ® V then XW ® YV Prove this axiom using Armstrong’s Axioms or show that it is not sound X ® Y (given) XW ® YW (augmentation of 1) W ® V (given) YW ® YV (augmentation of 4) XW ® YV (transitivity of 2, 4)

Problem Axiom of confusion: If XZ ® Y, YZU®X, W ® V, V ® WU then XW ® YV Prove this axiom using Armstrong’s Axioms or show that it is not sound U V W X Y Z u v w x y1 z1 y2 z2

Problem R = (A,B,C,D). For each of the following: find all keys determine the normal form of R C → D, C → A, B → C B, not 3NF ABC → D, D → A ABC, DBC 3NF A → B, BC → D, A → C A, not 3NF AB → C, AB → D, C → A, D → B AB, CB, AD, CD, 3NF

Problem Proposition: Let R be a relation containing exactly two attributes. Let F be a set of functional dependencies. Then, R is in BCNF. Prove or give a counter-example.

Proof: Let R(A,B) be a relation with 2 attributes and let F be functional dependencies over R. Every dependency other than AB, B A, A AB and B BA is trivial. In all the dependencies detailed, the left side is a key.

Problem Proposition: Let R be a relation and F be a set of functional dependencies. Suppose that every key in F has a single attribute. Then, R is in BCNF. Prove or give a counter-example. Counter Example: R(A,B,C) A B, B C

Problem Proposition: Let R be a relation and F be a set of functional dependencies. Suppose that every key in F has a single attribute. Then, R is in BCNF if and only if R is in 3NF. Prove or give a counter-example.

Correct, by an easy case analysis Correct, by an easy case analysis. If R is in BCNF, then it is in 3NF by definition. Suppose R is in 3NF. Let X A be a dependency in R. If this dependency is trivial or X is a super key, then this dependency does not contradict the BNCF requirement. If A is a field in a key, then A is a key, and hence, X is a superkey

Problem Prove or show a simple counter example. Proposition: Let R be a relation and F be a set of functional dependencies. Suppose that every dependency in F has one attribute on the left side. Then, R is in BCNF if and only if R is in 3NF Prove or show a simple counter example. Counter example: R(A,B,C) A B, B A

Problem Find small(est) examples of R and F such that: R is in BCNF R(A), F is empty R is in 3NF, but not in BCNF R(A,B,C), F = {A B, B A} R is not in 3NF R(A,B,C), F={A B}

Problem R=(ABCD) F={A->B,C->D,A->D} What is the normal form of R? Not 3NF We have a decomposition R1=(ABC), R2=(BCD) Is this a lossless join decomposition? Yes

Problem R=(ABC) F={A->B,BC->A} What is the normal form of R? 3NF We have a decomposition R1=(AB), R2=(AC) Is this a lossless join decomposition? Yes

Problem Let R=ABCDEG Let F={C->D, E->C, EG->A, G->B} What are all the keys of R? EG What is the normal form of R? Not 3NF Is the following decomposition lossless? Yes R1=AEG, R2=CE, R3=BG, R4=DEG