Databases Reference
In-Depth Information
R >
<
S
=
R >< p R Ç S (S )
where p R Ç S denotes projection on the common attributes of R and S. For
example, the fragmentation of a relation customer (name,address,telno), which
would be derived from the fragmentation of account shown in Figure 9.3(b),
would partition customer into the two fragments customer >
<
( s accno
<
400 account) and customer >
( s accno ³ 400 account).
Vertical fragmentation splits a relation R into n projections p attrs1
<
R,
>< p attrsn R, that is,
into a lossless join decomposition of R. For example, in Figure 9.3(c), the
relation account has been split into two vertical fragments, p accno,name account,
which is stored at S 1 , and p accno,balance account, which is stored at S 2 . The origi-
nal relation in Figure 9.3(a) can be reconstructed by forming the natural join
of the two fragments over their common attribute, accno.
Hybrid fragmentation of a relation is also possible in that a relation
can be fragmented both vertically and horizontally. Hybrid fragmentation
is illustrated in Figure 9.3(d), where the account relation has been split
into four fragments, p accno,balance ( s accno
p attrs2 R,
¼
, p attrsn R, such that R
=
p attrs1 R >< p attrs2 R
400 account), p accno,name ( s accno
400 account),
<
<
p accno,name ( s accno
400 account) and p accno,balance ( s accno
400 account), which are stored
³
³
at, respectively, sites S 1 , S 2 , S 1 , and S 2 .
There are two main advantages in fragmenting relations in a DDB system:
Applications running at different sites often require access to only
part of a relation rather than to the entire relation. Thus, fragments
can be stored at the sites where they are accessed most often rather
than storing the entire relation at the sites. For example, it may be
the case that accounts with numbers less than 400 are managed at
one site of a DDB system, and the rest of the accounts at another
site, in which case the accounts relation could be fragmented as
shown in Figure 9.3(b). Or it may be that one site frequently
requires information about customer names, while another fre-
quently requires information about customer balances. In that case,
the accounts relation could be fragmented as shown in Figure 9.3(c).
·
Fragmentation of relations also makes intra-query parallelism possi-
ble, in that a single global query can be translated into multiple local
subqueries that can be processed in parallel.
·
Two disadvantages of fragmentation are the increased query processing costs
for those queries that need to access many distributed fragments of a relation
Search WWH ::




Custom Search