LOSSLESS DECOMPOSITION Prof. Sin-Min Lee Department of Computer Science San Jose State University.

Slides:



Advertisements
Similar presentations
Normal forms - 1NF, 2NF and 3NF
Advertisements

Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Relational Database Design Algorithms and Further Dependencies.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part R4. Disjoint Sets.
RISC and Pipelining Prof. Sin-Min Lee Department of Computer Science.
Lossless Decomposition Anannya Sengupta CS 157A Prof. Sin-Min Lee.
Announcements Read 6.1 – 6.3 for Wednesday Project Step 3, due now Homework 5, due Friday 10/22 Project Step 4, due Monday Research paper –List of sources.
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.
CSE544 Database Statistics Tuesday, February 15 th, 2011 Dan Suciu , Winter
1 Conjunctions of Queries. 2 Conjunctive Queries A conjunctive query is a single Datalog rule with only non-negated atoms in the body. (Note: No negated.
15.8 Algorithms using more than two passes Presented By: Seungbeom Ma (ID 125) Professor: Dr. T. Y. Lin Computer Science Department San Jose State University.
METU Department of Computer Eng Ceng 302 Introduction to DBMS Further Dependencies by Pinar Senkul resources: mostly froom Elmasri, Navathe and other books.
Lossless Decomposition (2) Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Generalized Derangements Anthony Fraticelli Missouri State University REUJuly 30, 2009 Advisor: Dr. Les Reid.
CS Algorithm : Decomposition into 3NF  Obviously, the algorithm for lossless join decomp into BCNF can be used to obtain a lossless join decomp.
Lossless Decomposition (2) Prof. Sin-Min Lee Department of Computer Science San Jose State University.
RELATIONAL ALGEBRA (III) Prof. Sin-Min LEE Department of Computer Science.
LOSSLESS DECOMPOSITION Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Lossless Decomposition Elias Aseged SE 157B - DB 2.
DATABASE DESIGN Functional Dependencies. Overview n Functional Dependencies n Normalization –Functional dependencies –Normal forms.
Multivalued Dependency Prof. Sin-Min Lee Department of Computer Science.
Lossless Decomposition By Chi-Shu Ho For CS157A Prof. Sin-Min Lee.
Lossless Decomposition Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Cs3431 Normalization Part II. cs3431 Attribute Closure : Example Consider R (A, B, C, D, E) with FDs A  B, B  C, CD  E Does A  E hold ? (Is A  E.
METU Department of Computer Eng Ceng 302 Introduction to DBMS Relational Database Design Algorithms by Pinar Senkul resources: mostly froom Elmasri, Navathe.
Announcements Read 5.8 – 5.13 for Monday Project Step 3, due Monday 10/18 Homework 4, due Friday 10/15 – by (or turn in Monday in class)
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide DESIGNING A SET OF RELATIONS (2) Goals: Lossless join property (a must). Dependency.
Functional Dependencies An example: loan-info= Observe: tuples with the same value for lno will always have the same value for amt We write: lno  amt.
CS 235: User Interface Design September 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 11 Relational Database Design Algorithms and Further Dependencies.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Introduction.
1 CSE 480: Database Systems Lecture 18: Normal Forms and Normalization.
Announcements Program 3 due Friday Homework 2 out today, due Mon Read: Chapter 3.
CS 405G: Introduction to Database Systems Database Normalization.
N-ary Relations & Their Applications. 2 n-ary Relations Let A 1, A 2, …, A n be sets. An n-ary relation on these sets is a subset of A 1 x A 2 x … x A.
Huffman code and Lossless Decomposition Prof. Sin-Min Lee Department of Computer Science.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
1 CS122A: Introduction to Data Management Lecture #13: Relational DB Design Theory (II) Instructor: Chen Li.
Programmable logic Devices-ROM 2
Module 2: Intro to Relational Model
Functional Dependency
Higher Forms of Normalization
Database Design Dr. M.E. Fayad, Professor
The Closure of a set of Attributes
Nondeterministic Finite Automata
Dependency Preservation
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
11/12/2018.
Module 5: Overview of Normalization
Review  Only two chapters (6 & 7) Normalization Theory Triggers.
Functional Dependencies and Normalization
Multivalued Dependencies & Fourth Normal Form
Multivalued Dependencies & Fourth Normal Form
Decomposition of relational schemes
Relational Data Base Design in Practice
Appendix C: Advanced Normalization Theory
Normalization Part II cs3431.
Chapter 2: Intro to Relational Model
Relational Database Design
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
CSC 4170 Theory of Computation Finite Automata Section 1.1.
Third Normal Form.
Relational Database Theory
Appendix C: Advanced Relational Database Design

Database Design Dr. M.E. Fayad, Professor
Chapter 7a: Overview of Database Design -- Normalization
CS4222 Principles of Database System
Presentation transcript:

LOSSLESS DECOMPOSITION Prof. Sin-Min Lee Department of Computer Science San Jose State University

Definition of Decomposition A decomposition of a relation R is a set of relations { R1, R2,…, Rn } such that each Ri is a subset of R and the union of all of the Ri is R

Example of Decomposition From R( A B C ) we can have two subsets as: R1( A C ) and R2( B C ) if we union R1 and R2 we will get R R = R1 U R2

Definition of Lossless Decompotion A decomposition {R1, R2,…, Rn} of a relation R is called a lossless decomposition for R if the natural join of R1, R2,…, Rn produces exactly the relation R.

Example R( A1, A2, A3, A4, A5 ) R1( A1, A2, A3, A5 ); R2( A1, A3, A4 ); R3( A4, A5 ) are subsets of R. We have FD1: A1 --> A3 A5 FD2: A2 A3 --> A2 FD3: A5 --> A1 A4 FD4: A3 A4 --> A2

A1 A2 A3 A4 A5 a(1) a(2) a(3) b(1,4) a(5) a(1) b(2,2) a(3) a(4) b(2,5) b(3,1) b(3,2) b(3,3) a(4) a(5)

By FD1: A1 --> A3 A5 we have a new result table A1 A2 A3 A4 A5 a(1) a(2) a(3) b(1,4) a(5) a(1) b(2,2) a(3) a(4) a(5) b(3,1) b(3,2) b(3,3) a(4) a(5)

By FD2: A2 A3 --> A4 we don’t have a new result table because we don’t have any equally elements. Therefore, the result doesn’t change.

By FD3: A5 --> A1 A4 we have a new result table A1 A2 A3 A4 A5 a(1) a(2) a(3) a(4) a(5) a(1) b(2,2) a(3) a(4) a(5) b(3,1) b(3,2) b(3,3) a(4) a(5)

By FD4: A3 A4 --> A2 we get a new result table A1 A2 A3 A4 A5 a(1) a(2) a(3) a(4) a(5) b(3,1) b(3,2) b(3,3) a(4) a(5) tuple1 and tuple2 are lossless because they have all a(I)

Summary A decomposition { R1, R2,…, Rn } of a relation R is called a lossless decomposition for R if the natural join of R1, R2,…, Rn produces exactly the relation R NOTE: not every decomposition is lossless. It is possible to produce a decomposition that is lossy, one that losses information.