?? SL, ?? PJ - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

?? SL, ?? PJ

Description:

Title: Last modified by: User Created Date: 2/26/2004 9:02:09 AM Document presentation format: Other titles – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 41
Provided by: educ5500
Category:
Tags: semi

less

Transcript and Presenter's Notes

Title: ?? SL, ?? PJ


1
? ???????
2
????
  • ?? SL, ?? PJ
  • ?? JN, ? UN
  • ????CP,?DF, ??

3
??????
  • ?????????? (SDD-1??)
  • ???????????

4
???(Semi_Join)
  • R S ?R( R S)
  • ????????
  • R R SJ S ? R ??SJ??
  • R (R SJ (R SJ T)) ? R ??SJ????

5
  • ??

R
S
T
R,S,T??????
S
CC
BB
T
R
AA
?R?????
TT SJ S
RR SJ T
SS SJ R
?????
6
RR SJ T
TT SJ S
SS SJ R
?????
RR SJ T ?
??????
????????????????????????
7
????
  • ?????
  • Card(R) ????R?????
  • Size(A) ??A???(????)
  • Size(R) ???????, ??????
  • Val(AR) ??A?R???????

8
????????????
  • ?? ?????
  • R S ? (R S) S or
  • R (S R) or
  • (R S) (S R)

9
????????????-?
  • R S (R S) S
  • ??????
  • ???B S ?site r
  • Cost C0C1Size(B)Val(BS)
  • ?r????SJ, ????, ?RR SJAB S
  • ??R?site s, ??
  • Cost C0C1Size( R )Card (R)
  • ?r????JN,?????
  • ???
  • CSJ2C0C1((Size(B)Val(BS) Size( R)
    Card (R))

10
Example R S
  • A B

A C
S
R
R S
AA
?A R 2,10,25,30
A B
A C 10 y 25 w
S R
AA
11
  • A B A C
  • R S

2 a
3 x
10 b
10 y
25 c
15 z
30 d
25 w
32 x
  • ??????
  • ????? R (S R)
  • T 4 A 2 AC
  • ???? R S
  • T 4 AB

12
???????
  • SJ ???
  • (R SJ S) JN S ???CSJ
  • ( S SJ R) JN R ???C SJ
  • CSJ2C0C1((Size(A)Val(AR) Size( S)
    Card (S))
  • ??CSJ?CSJ, ????

13
SDD-1??
  • ????SJ??????????
  • ????SDD-1?????

14
????????
  • ????????????????????
  • ???or????
  • ?????????????????
  • ????-???????????-???
  • ????-?????????-????

15
??????(R??)
  • ??????
  • R JN S ???R???? O, ??S???? I,
  • I/o???????????, CPU??????JN?????

16
??????-??
  • ?????????
  • ????
  • C?? (NoutCard(O)Nin)CI/o
  • Card(Result)Ccpu
  • Nout ??O??? Nin ?O???????I?????
  • ????
  • C??(NoutNin)CI/OCsort(I)Csort(O)
  • Card(Result)Ccpu
  • ?????????,????????

17
??????-???
  • ??????
  • ?????
  • ??I, ????I??????,I??????
  • ??O, ?I???????????, ?????O??
  • ?????
  • ????????,??????,???????????,???????,??????

18
??????-?
  • ??????????
  • ??, O?????, ??
  • C1C??CmesCard(O)Size(O)/m
  • ??, O?????, ??
  • C2C??CmesCard(O)Size(O)/m

19
??????-?
  • ??, I?????
  • C3C??CmesVal(AO)(1NISize(I)/m)
  • NI ????O??????, ????????????
  • ??, I?????
  • C4C??CmesVal(AO)(1NISize(I)/m)

20
??????-?
  • ??, I?????, ?????
  • C5C??CmesCard(I)Size(I)/m2NinCI/O
  • ??, ????????site
  • C6??????????(C??/C??)
  • R??????????JN????????JN??.

21
?????????
  • ????
  • ???????????
  • ???????
  • ?????????????
  • Hash????

22
???????????
23
???????????-?
  • ????
  • ???Ri??Fi1?Fi2, Rj??Fj1?Fj2
  • ??Ri?Rj???A?????
  • Ris A Rjt ? , ??s ? t,
  • ??Ri?Rj???A?????
  • ????
  • Ri A Rj U (Fis A Fjs),
    ?????????????????s???
  • ??????????????

24
???????????-?
Ri
Rj
????
Ri
Rj
Result
25
???????????-?
  • ??
  • ?Ri?Rj???A?????,?Ri?Rj?????A????B??????
  • ?Ri?Rj???A?????,????(????)B????A,?A ?
    ?,?Ri?Rj?B??????
  • ?Ri?Rj???A?????,??Rj?Rk???B?????,?(Ri ARj
    B Rk) ?(Fis A Fjs B Fks)
  • ??Ri A Rj B Rk???????????????????

26
??
  • Student(s, sname, age, d)
  • Dept(d, dname, l, header)
  • Location (l, area, mgr)

27
Site 1
Site 2
Site 3
S2 D2 L2
S1 D1 L1
S3 D3 L3
S1 ? dlt10(Student) S2 ?
d10andd20(Student) S3 ? dgt20(Student) D1
Dept SJ S1 D2 Dept SJ S2
D3 Dept SJ S3 L1 Location SJ D1
L2 Location SJ D2 L3 Location
SJ D3 Student Dept
Location
28
Site 1
Site 2
Site 3
S2 D2 L2
S1 D1 L1
S3 D3 L3
S1 ? dlt10(Student) S2 ?
d10andd20(Student) S3 ? dgt20(Student) D1
Dept SJ S1 D2 Dept SJ S2
D3 Dept SJ S3 L1 ?
areaeast(Location) L2 ? areawes(Location)
L3 ? areasourth(Location)
Student Dept
Location
ll
29
???????
  • ??????????????????????,???????????????????
  • R1 R2 Ui (F1i R2)

30
R1
R2
????
R1
R21
R22
f partition
Result
union
?? ??????????????????????
????????? ?? FT(Q, Sj, Ri) ??Ri??,?
Sj????Q???
31
  • ???????
  • Fragmentation_and_replicate(Q, R, S)
  • For ???????????Ri
  • For ??????Ri????????Sj
  • ?????Sj??????????
  • FT(Q, Sj, Ri)
  • ????Ri????????????
  • Ti max (FT(Q, Sj, Ri))
  • ??Rk min (Ti)??????????

j
i
32
R1
R2
????
R1
R2
R11
R21
R2
R22
R12
R2
R13
f partition
Result
union
?? FT(Q, S2, R1) cost(R12 R2)
33
?? ??R1??F11?F12???? F11F1250
R2??F21?F22???? F21 100 F22200 ?
????C00, C11, ????CostJ(x1,
x2)5(x1x2) ???Cost U(x1, x2)
2(x1x2)
34
  • ?R1??????, ? ??S1?????
  • FT(Q, S1, R1) 2002(100200)5(50300
    )2550
  • ??
  • FT(Q, S2, R1) 1002(100200)5(50300
    )2450
  • ??, ???????R1??????? 2550.

35
?R2??????, ? ??S1????? FT(Q, S1, R2)
502(5050)5(100100)1250 ??
FT(Q, S2, R2) 502(5050)5(200100)1750
??, ???????R2??????? 1750. ??
R1???????????gtR2??????????? ??
??R2????????
36
  • ??
  • ?????????????, ????????????????????????

37
???????????
  • ? ?

R1
? ?
R2
R3
?R1?R2???A?????, ??R1 R2 R3
38
Hash????
  • ??Hash????????????????????, ?????, ????????JN??
  • ??, ??Hash??
  • 1 ?a ???
  • 0 ?a ???
  • ?R?????, h(a)?1????S1, h(a)?0????S2.
    ??????R????Ro?Re
  • R1 R2 (R1o R2o) U (R1e
    R2e)

h(a)

39
Hash????-?
  • R1 A R2 B R3
  • ?R1?R2?A?????Hash??, R2?R3???B?????Hash??

40
????
  • ??????
  • ?????
  • ??????????
  • ???????????R
  • ???????
  • ???????R
  • ?????,?????????
  • ???????????(3/2)R
  • Hash????
  • ??????R
  • ????, ?????????
  • ???????????????

??????,???????????R1?R2,???????????
Write a Comment
User Comments (0)
About PowerShow.com