0% found this document useful (0 votes)
46 views24 pages

JassonAllen DependencyPreservation

The document discusses dependency preservation in database decomposition. It defines dependency preservation as a decomposition where the union of functional dependencies (FDs) across all relations is equivalent to the FDs of the original relation. An example shows a decomposition that preserves all 3 FDs of an original relation R, while another example does not preserve one of the FDs. The document provides an exercise problem that can be shown to preserve dependencies.

Uploaded by

ayush_jain
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views24 pages

JassonAllen DependencyPreservation

The document discusses dependency preservation in database decomposition. It defines dependency preservation as a decomposition where the union of functional dependencies (FDs) across all relations is equivalent to the FDs of the original relation. An example shows a decomposition that preserves all 3 FDs of an original relation R, while another example does not preserve one of the FDs. The document provides an exercise problem that can be shown to preserve dependencies.

Uploaded by

ayush_jain
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

By Jason Allen

Why Do We Preserve The Dependency?

We would like to check easily that updates to the database

do not result in illegal relations being created.

It would be nice if our design allowed us to check updates

without having to compute natural joins.


Definition
A decomposition D = {R1, R2, ..., Rn} of R is

dependency-preserving with respect to F if the union


of the projections of F on each Ri in D is equivalent to
F; that is
if (F1  F2  …  Fn )+ = F +
In Layman’s Term
Each Functional Dependency specified in F

either appears directly in one of the


relations in the decomposition.
Continue…
It is not necessary that all dependencies from the
relation R appear in some relation Ri. It is sufficient
that the union of the dependencies on all the
relations Ri be equivalent to the dependencies on R.
Property of Dependency-Preservation
If a decomposition is not dependency-preserving,

therefore, that dependency is lost in the


decomposition.

FD4

FD3
FD1

FD2
Example of Dependency Preservation
R(A B C D)

FD1: A  B
FD2: B  C
FD3: C  D

Decomposition:
R1(A B C) R2(C D)
FD1: A  B
FD2: B  C
FD3: C  D

R1( A B C )
FD1

FD2
FD1: A  B
FD2: B  C
FD3: C  D

R2( C D )
FD3
FD1: A  B
FD2: B  C
FD3: C  D

R1 ( A B C ) R2( C D )
FD1 FD3

FD2

Has all 3 functional dependencies!


Therefore, it’s preserving the dependencies
Example of Non-Dependency Preservation
R(A B C D)

FD1: A  B
FD2: B  C
FD3: C  D

Decomposition:
R1(A C D) R2(B C)
FD1: A  B
FD2: B  C
FD3: C  D

R1( A C D )
FD3
FD1: A  B
FD2: B  C
FD3: C  D

R2( B C )
FD2
FD1: A  B
FD2: B  C
FD3: C  D

R1 ( A C D ) R2( B C )
FD3 FD2

Does not support FD1: A => B


Therefore, it does not preserve the dependencies
More Example
R(A B C D E)

FD1: A  B
FD2: BC  D

Decomposition:
R1(A C E) R2(B C D) R3(A B)
FD1: A  B
FD2: BC  D

R1( A C E )
No Dependencies
FD1: A  B
FD2: BC  D

R2( B C D )
FD2
FD1: A  B
FD2: BC  D

R3( A B )
FD1
FD1: A  B
FD2: BC  D

R1( A C E ) R2( B C D )
FD2

R3( A B )
FD1

Has all 2 functional dependencies!


Therefore, it’s preserving the dependencies
Exercise Problem
R(A, B, C, D, E, F )

FD1: D  A, B
FD2: C  E, F

Decomposition:
R1( A, C, D )
R2( A, D, B )
R3( D, E, F )
R4( C, E, F )
R1( A C D) FD1: D  A, B
FD2: C  E, F

R2( A D B)
FD1

R 3( D E F)

R 4( C E F)

FD2
Answer

Yes!
This is a dependency-preservation
Reference
 Chen, Y. (2005). “Decomposition”. Retrieved on March 21, 2010 from
http://www.cs.sjsu.edu/faculty/lee/cs157/Decomposition_YuHungChen.ppt

 Kamel, A. “Chapter 11Relational Database Design Algorithms” Retrieved


on March 22, 2010 from http://www.cord.edu/faculty/kamel/08F-
330/Presentations/ch11.pdf

 Lee, S. “Huffman code and Lossless Decomposition”. Retrieved on


March 21, 2010 from
http://www.cs.sjsu.edu/~lee/cs157b/29SpCS157BL14HuffmanCode&LosslessDe
composition.ppt

 Zaiane, O. (1998) “Dependency Preservation”. Retrieved on March 21,


2010 from
http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter7/node8.html

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy