Distributed Database Derived Horizontal Fragmentation
-
Upload
furqan-arshad -
Category
Documents
-
view
499 -
download
1
description
Transcript of Distributed Database Derived Horizontal Fragmentation
![Page 1: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/1.jpg)
Distributed DatabaseManagement Systems
![Page 2: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/2.jpg)
2
Derived Horizontal Fragmentation(DHF)
![Page 3: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/3.jpg)
3
• Defined on a member relation of a link according to a selection operation specified on its owner
![Page 4: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/4.jpg)
4
• Two important points:– Each link is an equi-join.– Equijoin can be implemented by means of
semi-joins
![Page 5: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/5.jpg)
5
• So we are interested in defining the partitions of member based on fragmentation of its owner, but want to see attributes only from member, so
![Page 6: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/6.jpg)
6
Ri = R S⋉ i, 1≤ i ≤ w where w is the maximum number of
fragments that will be defined on R and Si = Fi (S), where Fi is formula for PHF on S
![Page 7: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/7.jpg)
7
DHF Example
![Page 8: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/8.jpg)
8
title, sal
eNo, Name, titke jNo, jName, budget, loc
eNo, jNo, resp, dur
PAY
EMP
ASIGN
PROJ
L1
![Page 9: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/9.jpg)
9
• Considering the link L1 above: • owner (L1) = PAY member (L1) = EMP• We want to group employees on the basis of their
salaries one with salary less than or equal to 30,000/- and other more than that
![Page 10: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/10.jpg)
10
eNo eName title
E1 T Khan Elec Eng
E2 W Shah Sys Ana
E3 R Dar Mech Eng
E4 K Butt Programme
E5 F Sahbai Sys Ana
E6 A Haq Elec Eng
E7 S Farhana Mech Eng
E8 M Daud Sys Ana
![Page 11: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/11.jpg)
11
Title Sal
Elect. Eng 40000
Sys Analyst 34000
Mech. Eng 27000
Programmer 24000
![Page 12: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/12.jpg)
E3 R Dar Mech Eng
E4 K Butt Programme
E7 S Farhana Mech Eng
eNo eName title
E1 T Khan Elec Eng
E2 W Shah Sys Ana
E5 F Sahbai Sys Ana
E6 A Haq Elec Eng
E8 M Daud Sys Ana
![Page 13: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/13.jpg)
• PAY1 = σ sal ≤ 30000 (PAY)
• PAY2 = σ sal > 30000 (PAY)
• EMP1 = EMP PAY1⋉• EMP2 = EMP PAY2⋉
![Page 14: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/14.jpg)
14
DHF• The inputs required for DHF
– The set of partitions for owner– Member relation– Semi-join predicates between owner and
member
![Page 15: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/15.jpg)
15
DHA• Care in case of multiple owners, like
ASIGN• Fragmentation selection depends:
1- One with better Join Characteristics2- One used in more applications
• Second one is straight forward, we should try to facilitate heavy users; the first one needs more considerations
![Page 16: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/16.jpg)
16
DHF • For the first point;
– Join is performed on smaller relations, that increases efficiency
– The join can be performed in parallel in case of simple graphs, that improves efficiency as well; simple graph means
PAY1
EMP1
PAY2
EMP2
![Page 17: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/17.jpg)
17
DHF• demonstrates two things 1-Derived fragmentation may follow a chain, like
PAY-EMP-ASIGN 2-Typically, more than one fragmentation options are
there, which one adopted is an allocation problem discussed later
Checking for Correctness Completeness: for PHF depends on Pr’, and in DHF,
completeness of owner Pr’, and the referential integrity constraint
Reconstruction: Involves Union in both casesDisjointness: Simple in PHF if the pi in Pr’ are mutually
exclusive; in DHF, guaranteed in case of simple join graph, however in case of partitioned join graph it is hard to establish
![Page 18: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/18.jpg)
18
Checking for Correctness
Completeness: for PHF depends on Pr’, and in DHF, completeness of owner Pr’, and the referential integrity constraintLet R be member S be owner
Fs = { S1,S2,…Sn}‘A’ the common attribute
t[A] = t’ [A]
![Page 19: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/19.jpg)
19
Reconstruction:
Involves Union in both cases
FR = {R1,R2,….Rn} R = U Ri Ri FR∀ ∈
![Page 20: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/20.jpg)
20
Disjoint ness:
Simple in PHF if the pi in Pr’ are mutually exclusive; in DHF, guaranteed in case of simple join graph, however in case of partitioned join graph it is hard to establish
![Page 21: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/21.jpg)
21
Vertical Fragmentation (VF)• Vertical subset of relation • A VF of a relation produces fragments
R1, R2, …. Rn, each of which contains subset of attributes of R and PK of R.
• Objective is to produce smaller relations, so that most of the applications run on smaller relations; so they become fast.
![Page 22: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/22.jpg)
22
Vertical Fragment
• Vertical fragmentation is more complicated, since more alternatives exist.
• VF is mainly based on heuristics
![Page 23: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/23.jpg)
23
Example of VF
A/C# Name
Bal Branch
AB101
Saeed
4535 MTN
AB202
Laeeq
45632.34
LHR
AB203
Salma
67839.87
LHR
AB109
Shaan
45.32 MTNA/C# Na
meBranch
AB101
Saeed
MTN
AB202
Laeeq
LHR
AB203
Salma
LHR
AB109
Shaan
MTN
CUST
A/C# Bal
AB101
4535
AB202
45632.34
AB203
67839.87
AB109
45.32
Delta
Delta = ΠA/C#, Name, Branch (CUST)
Beta = ΠA/C#, Bal (CUST)
![Page 24: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/24.jpg)
24
Two Alternatives of VF
• Grouping: Starting with single attribute VFs and then combining different attributes
![Page 25: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/25.jpg)
25
Two Alternatives of VF
• Splitting: Starting from the whole relation and then breaking it down analyzing the nature of applications
• Later suits better to DDB environment; results non-overlapping fragments; so discussed here
![Page 26: Distributed Database Derived Horizontal Fragmentation](https://reader033.fdocuments.us/reader033/viewer/2022051013/547f0407b37959582b8b5678/html5/thumbnails/26.jpg)
Thanks