Database Reference
In-Depth Information
Figure 8. Computing algebraic functions
instant t .Example 13:Let v be the materialized
view computed on the DW (Ws) resulting from
example 12.
v is defined, using SQL statements, as fol-
low:
Then v_ prim is computed, from F1 prim, as it is
done for v .
According to Figures 7 and 8 the SQL query
to be developed for incremental maintenance (of
Min and Avg functions), instead of computing
again v values, is:
CREATE MATERIALIZED VIEW V as
SELECT y10, MIN(x2) as M, AVG(x3)
as A, COUNT(x3) AS C, SUM(x3) as S
FROM F1
GROUP BY y10;
SELECT DECODE(V.y10,NULL, V_PRIM.
y10, V.y10),
DECODE(V.M,NULL,V_prim.M,DECODE(V_
prim.M,NULL,V.M,
DECODE(abs(V_PRIM.M-V.M),V_PRIM.M-
V.M, V.M, V_PRIM.M))) as M,
DECODE(V_PRIM.M,NULL,V.A,DECODE(V.
After receiving source updates, one compute
F1_prim using the ConstrView() algorithm.
Search WWH ::




Custom Search