Database Reference
In-Depth Information
a
b
c
ShipID ShipName
s1
ProdID ProdName ShipID
p3
ProdID ProdName ShipID
p1
Fedex
MP3
s2
TV
s1
s2
DHL
p4
PC
NULL
d
e
ProdID ProdName ShipID ShipName
p3
ProdID ProdName ShipID ShipName
p1
MP3
s2
DHL
TV
s1
Fedex
p4
PC
NULL
NULL
f
ProdID ProdName ShipID ShipName
p2
Tablet
NULL
NULL
p3
MP3
s2
DHL
p4
PC
NULL
NULL
NULL
NULL
s1
Fedex
Fig. 7.3 An example of self-maintenance of a full outer join v i e w. ( a ) Proj Shipper .
( b ) Δ + ( Pro d u c t ). ( c ) Δ ( Product ). ( d ) Δ + ( Product )
Proj Shipper . e )
Δ ( Product )
Proj Shipper .( f ) Final result
data availability. The problem can be stated as follows: as data at the
sources are added or updated, the summary tables that depend on these
data must be also updated. Then, two options arise: to recompute the
summary tables from scratch and to apply incremental view maintenance
techniques to avoid such recomputation. Note that since summary tables
remain unavailable to the data warehouse users while they are maintained,
we need to reduce the time invested in their updating. In this section, we
explain a representative summary table maintenance algorithm called the
summary-delta algorithm , although many other techniques (like the ones
that maintain many versions of the summary tables) exist in the literature.
Analogously to the definition of self-maintainable views, we say that an
aggregate function is self-maintainable if the new value of the function can
be computed solely from the old values and from changes to the base data.
Aggregate functions must be distributive in order to be self-maintainable. The
five classic aggregate functions in SQL are self-maintainable with respect to
insertions, but not to deletions. In fact, MAX and MIN are not, and cannot
be made, self-maintainable with respect to deletions.
The summary-delta algorithm has two main phases called propagate and
refresh. The main advantage of this approach is that the propagate phase
can be performed in parallel with data warehouse operations; only the refresh
phase requires taking the warehouse off-line. The basic idea is to create in
the propagate phase a so-called summary-delta table that stores the net
Search WWH ::




Custom Search