LOSSLESS DECOMPOSITION - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

LOSSLESS DECOMPOSITION

Description:

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 ... – PowerPoint PPT presentation

Number of Views:97
Avg rating:3.0/5.0
Slides: 57
Provided by: NGOC51
Learn more at: http://www.cs.sjsu.edu
Category:

less

Transcript and Presenter's Notes

Title: LOSSLESS DECOMPOSITION


1
LOSSLESS DECOMPOSITION
CS157A Lecture 16
  • Prof. Sin-Min Lee
  • Department of Computer Science
  • San Jose State University

2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
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

31
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

32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
(No Transcript)
42
(No Transcript)
43
(No Transcript)
44
(No Transcript)
45
(No Transcript)
46
(No Transcript)
47
(No Transcript)
48
(No Transcript)
49
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.

50
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 --gt A3 A5
  • FD2 A2 A3 --gt A2
  • FD3 A5 --gt A1 A4
  • FD4 A3 A4 --gt A2

51
  • 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)

52
  • By FD1 A1 --gt 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)

53
  • By FD2 A2 A3 --gt A4
  • we dont have a new result table because we dont
    have any equally elements. Therefore, the result
    doesnt change.

54
  • By FD3 A5 --gt 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)

55
  • By FD4 A3 A4 --gt A2
  • we get a new result table
  • A1 A2 A3 A4
    A5
  • a(1) a(2) a(3) a(4)
    a(5)
  • 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)

56
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com