You are on page 1of 54

TYPES OF FRAGMENTATION:

There are three types of Data Fragmentation in distributed database as follows:

1) Horizontal Fragmentation,
a)Primary Horizontal Fragmentation
b)Derived Horizontal Fragmentation
2) Vertical Fragmentation
3) Mixed or Hybrid Fragmentation

Example 2.1 Figure 2.3 shows the PROJ relation of Fig. 2.2 divided horizontally into two
fragments: PROJ1 contains information about projects whose budgets are less than $200,000,
whereas PROJ2 stores information about projects with larger budgets.

1
Example 2.2 Figure 2.4 shows the PROJ relation of Fig. 2.2 partitioned vertically into two
fragments: PROJ1 and PROJ2. PROJ1 contains only the information about project budgets,
whereas PROJ2 contains project names and locations. It is important to notice that the primary
key to the relation (PNO) is included in both fragments.

Horizontal fragmentation is more prevalent in most systems, in particular in parallel DBMSs


(where the literature prefers the term sharding). The reason for the prevalence of horizontal
fragmentation is the intra-query parallelism that most recent big data platforms advocate.
However, vertical fragmentation has been successfully used in column-store parallel DBMSs,
such as MonetDB and Vertica, for analytical applications, which typically require fast access to
a few attributes.

Horizontal Fragmentation
Horizontal fragmentation partitions a relation along its tuples. Thus, each fragment has a subset
of the tuples of the relation. There are two versions of horizontal partitioning: primary and
derived. Primary horizontal fragmentation of a relation is performed using predicates that are
defined on that relation. Derived horizontal fragmentation, on the other hand, is the
partitioning of a relation that results from predicates being defined on another relation.

2
3
Auxiliary Information Requirements

4
Primary Horizontal Fragmentation

5
6
7
8
9
10
Primary horizontal fragmentation applies to the relations that have no incoming edges in the
join graph and performed using the predicates that are defined on that relation. In our
examples, relations PAY and PROJ are subject to primary horizontal fragmentation, and EMP
and ASG are subject to derived horizontal fragmentation.
In this section, we focus on primary horizontal fragmentation and devote the next section to
derived horizontal fragmentation. A primary horizontal fragmentation is defined by a selection
operation on the source relations of a database schema. Therefore, given relation R its
horizontal fragments are given by

11
12
13
14
Derived Horizontal Fragmentation

15
16
17
18
19
20
21
22
23
24
25
Vertical Fragmentation

26
27
28
29
30
31
32
33
34
35
36
aff(A1,A2)=aff(A2,A1)

37
38
39
40
41
42
Example 2

43
44
45
46
47
48
49
50
51
52
53
54

You might also like