Databases Reference
In-Depth Information
Then F (P 1 ) consists of the eight predicates that result from combining those
simple predicates or their negations. Some combinations of simple predicates
may be simplifiable, for example, (accno
600) to just
accno 400, and some combinations may not be satisfiable, for example,
(accno
<
400) AND (accno
<
<
400) AND (accno
³
600). Thus, F (P 1 ) reduces to the following six
predicates:
(accno
<
400) AND (balance
<
0)
(accno
<
400) AND (balance
³
0)
(accno
³
400) AND (balance
<
0) AND (accno
<
600)
(accno
³
600) AND (balance
<
0)
(accno
³
400) AND (balance
³
0) AND (accno
<
600)
(accno
³
600) AND (balance
³
0)
Each of those predicates will generate one fragment of account, which has the
desired effect of splitting each of the original fragments F 3 and F 4 of R into
two. The completeness property is important because it means that all the
rows of a fragment have the same statistical properties, so the fragment can
be treated as one unit for the purposes of query optimization.
The minimality property of a set of simple predicates P means that if
any one of the predicates in P is removed, the completeness property is vio-
lated. For example, it is easy to see that omitting any of the predicates from
the preceding set, P 1 , would violate its completeness property. However, if
we were to add another predicate to P 1 , say, balance
2000, then it would
introduce unnecessary fragmentation of the account relation in the sense that
some of the fragments would have the same statistical properties (assuming
there was no change in the applications accessing account). Thus, P 1
<
È
{bal-
ance
2000} would not be minimal.
Turning now to vertical fragmentation, we need to decide which attrib-
utes of a relation should be placed in the same fragment. To guarantee the
losslessness of the join of the vertical fragments, each vertical fragment
should contain the primary key attributes of the relation. Alternatively, repli-
cation of the primary key attributes can be avoided by augmenting the rela-
tion with a system-maintained row identifier (ROWID) attribute, which is
present in each vertical fragment. Fragmentation of the rest of the attributes
depends on the frequency with which attributes are accessed together in the
same query. For example, the vertical fragmentation of the account relation in
Figure 9.3(c) favors applications in which the attributes name and balance
will not often be accessed together in the same query, since such queries will
require a join of the two fragments to be performed. Statistical clustering
<
Search WWH ::




Custom Search