• No se han encontrado resultados

Evaluación del efecto del tratamiento con LP226 en la proliferación celular en el giro

IV. RESULTADOS

5. Estudio del efecto neuroprotector potencial del tratamiento con LP226

5.2 Evaluación del efecto del tratamiento con LP226 en la proliferación celular en el giro

We have already seen that a major focus of CDSS is on the efficient handling of the dynamic aspects of data sharing, in particular, handling updates to data (update exchange) and to mappings (mapping evolution). And we have already mentioned that for update exchange, Orchestraadapts

techniques based on the so-calleddelta rulestechnique [66], and improves upon them by exploiting

the presence of provenance annotations.

Mapping evolution seems on the face of it a very different problem than update exchange. Somewhat surprisingly, then, it turns out that both problems (along with their classical cousins, view maintenance and view adaptation) can be attacked uniformly by the same approach, where we view each as a special case of a more general problem ofoptimizing queries using materialized views[101,23]. This is the problem which asks, given a queryQand a setVof materialized views,

to find areformulationofQusing the materialized views which can be executed more efficiently. Example 1.13. To illustrate update exchange / view maintenance, consider a source relation R

R0(x,y) :- R(x,y)

R0(x,y) :- R∆(x,y)

V(x,y) :- R(x,y),R(y,z)

(a) Materialized view definitions

V0(x,y) :- R0(x,y),R0(y,z)

V∆(x,y) :- V0(x,y)

−V∆(x,y) :- V(x,y)

(b) New view definition, and difference with old

V∆(x,y) :- R∆(x,z),R(z,y)

V∆(x,y) :- R(x,z),R∆(z,y)

V∆(x,y) :- R∆(x,z),R∆(z,y)

(c) A delta-rules style reformulation

Figure1.6: Update propagation and query reformulation

Q(x,y) :- R(x,u),R(u,v),R(v,y)

Q(x,y) :- R(x,z),R(z,y)

(a) Old mappings

Q0(x,y) :- R(x,u),R(u,v),R(v,y) Q0(x,y) :- R(x,y) (b) New mappings Q∆(x,y) :- Q(x,y) −Q∆(x,y) :- Q0(x,y) (c) Their difference Q∆(x,y) :- R(x,y) −Q∆(x,y) :- R(x,z),R(z,y) (d) A reformulated plan

Figure1.7: Mapping evolution and query reformulation

and a collectionR∆ of updates to R (consisting of tuple insertions and deletions), which when applied to R yields the relation R0. R0 can be thought of as a materialized view over R and R∆ whose definition is given in Figure1.6(a). Now, consider the materialized viewV overRwhose

definition is also given in Figure1.6(a). To reflect the updates made toR, we need to compute the

new versionV0ofV, shown in Figure1.6(b). Moreover, to perform this computationincrementally,

we would like to compute just thedifference V∆ betweenV0 and V, also defined in Figure1.6(b),

where the leading “−” indicates a difference operation. This could then be applied toVto produce V0. Note that the definition ofV∆involves first computingV0, then subtractingVfrom it, a rather inefficient approach! A better plan is thedelta rules reformulationof V∆ shown in Figure 1.6(b),

which we can imagine as having been produced via a general process of reformulatingV∆using the materialized viewsVandR0.

Example1.14. To illustrate mapping evolution / view adaptation, Figure1.7(a) shows a materi-

alized view definition Q which is modified (by changing its second rule) to produce the view definition Q0 shown in Figure1.7(b). To compute Q0 incrementally, we might prefer to compute

the differenceQ∆ betweenQandQ0, shown in Figure 1.7(c). As with the previous example, the

definition does not produce a very efficient plan! Instead, we can reformulateQ∆using material- ized viewQ, producing the plan shown in Figure1.7(d).

R: a b 2 b c 1 a d 1 d c 1 d e 3 R∆: a b −2 b c −1 e f 1 R0: a d 1 d c 1 d e 3 e f 1 V: a ca e 3 3 V ∆: a c −2 d f 3 V 0 : a c 1 a e 3 d f 3

(a) Delta rules example withZ-relations

R: a b p b c r c d s Q: a d p·r·s a c p·r b d r·s Q0 : a d p·r·s a b p b c r c d s Q∆: a c −p·r b d −r·s a b p b c r c d s

(b) Mapping evolution example withZ[X]-relations

Figure1.8: Representing and computing updates with ring-annotated relations

make essential use of thedifferenceoperator, not present in the framework of semiring-annotated relations, and not usually considered in previous work on optimizing queries using material- ized views. Second, both involveupdates (tuple insertions and deletions) being represented and manipulated as ordinary relations.

To handle these requirements, we propose the use ofring-annotated relationsto represent data and updates uniformly, and with thedifferenceoperator defined in the natural way using inverses in the ring. We study two concrete instantiations of this framework. The first isZ-relations, where tuples are annotated with (positive or negative) integers. This is the ring-annotated analog of bag semantics, with positive multiplicities representing insertions and negative ones representing deletions. The second isZ[X]-relations, the ring-annotated analog of the provenance polynomials, where we allow positive or negative integer coefficients.

Example1.15. Figure1.8(a) shows an example of Z-annotated relations corresponding to Exam-

ple1.13. Note thatR∆has tuples with positive and negative multiplicities, e.g., the annotation of (a,b)is−2 indicating that a deletion of two copies of that tuple. V∆corresponds to the result of evaluating the query from Figure1.6(c) over R, R0, and Vunder theZ-semantics, and note that

V∆ also has tuples with positive and negative multiplicities. By applying V∆ to V via a union operation (which sums tuple multiplicities), we obtainV0.

Example1.16. Figure1.8(b) shows an example ofZ[X]-annotated relations corresponding to Ex-

ample1.14. Note thatQ∆ shows the result of evaluating the plan in Figure1.7(d) over theZ[X]-

relationsQandR, and by applyingQ∆toQ(by union, which again sums tuple annotations), we obtain the tableQ0shown in the figure.

The extension to ring-annotated relations and relational queries using difference gives us a rich framework for representing and computing updates, but we still need a general procedure for optimizing queries using materialized views in this new context. Herein lies the big surprise:

we are able to give asound and complete procedure for enumerating query reformulations under theZ andZ[X] annotated semantics, for relational algebra queries and views. This is in sharp contrast to traditional set and bag semantics, where it can be shown that no such procedure exists. The enumeration procedure is based on a simple term rewrite system, the details of which are described in Chapter5. We also show that equivalence of relational algebra queries under these

new semantics is decidable (inpspace). This also stands in contrast to the situation for set and

bag semantics, where allowing the difference operator in queries leads to undecidability of equiv- alence. Thus, the ring-annotated relations framework gives us benefits both in expressiveness (for representing and computing updates), but is also surprisingly tractable.

Contribution7: provenance for XML and nested relations