Re: Possible problems with Date & McGoveran View Updating

From: Jan Hidders <jan.hidders_at_pandora.be>
Date: Wed, 10 Sep 2003 20:52:33 GMT
Message-ID: <laM7b.13143$tU6.372780_at_phobos.telenet-ops.be>


Mikito Harakiri wrote:
> "Jan Hidders" <jan.hidders_at_pandora.be> wrote in message
> news:5SJ7b.12871$Nh6.347237_at_phobos.telenet-ops.be...

>> Lets assume
>> that we have a view V that is defined by a query Q that maps a database
>> to a relation.

>
> Minor comment. There could be 2 (or more) queries Q1 and Q2 mapping into
> relations R1 and R2, correspondingly. You can still accomodate this case
> in your defintion if you assume Q = CartesianProduct(Q1, Q2) and R=R1 x
> R2.

Certainly. Generalizing for multiple views is not a problem, but I wanted to keep things simple in the beginning.

>> Given a database D an addition of a set of tupels A to the view V is
>> called
>> *well-defined* if there is a unique smallest superinstance D' of D such
>> that D' satisifies the schema and Q(D') = Q(D) + A. Analogously we define
>> a
>> deletion of a set of tupels as *well-defined* but with "superinstance"
>> replaced with "subinstance" and set union replaced with set difference.
>> Relational assignments can be simulated by a deletion followed by an
>> addition.

>
> Terminolody and defintion amended:
>
> Q( D + deltaD ) = V + deltaV
>
> where "+" is union (or difference;-)

Ok. I can see the elegance of that. But the + is then not the set-union but an, er, database-union or database-merge or ... something. :-)

> The Q is called invertible if for any deltaV there exists unique deltaD
> satisfying the formula above.

Are you sure you don't want deltaD to be minimal? And I assume you mean "for a given D and V" right?

> Question. Is the definition equivalent to
>
> exists Q^(-1) such that Q(D) == Q * D = V <=> D = Q^(-1) * V

I assume you mean: Q(D) = V <=> Q(-1)(V) = D? That doesn't make much sense because the universal quantification of D and V happens before the existential quantification of Q^(-1). Or is that not what you meant? So where then are the quantifiers in your definition of invertable? Note that in my definition an update is defined as well-defined given the database instance.

> and therefore switching term "well-defined" to "invertible" is
> justifiable?

I don't think so. Assume that the database consists of only R(a,b) and Q(R) = SELECT[a=5](R). In that case the addition Add({(5,6)}) is always a well-defined addition but not invertible as you defined it above.

>> Finally, we define a view V as *updatable* by a certain set of updates U
>> if
>> for all databases D that satisfy the schema all updates in U are
>> well-defined. Additionally we say that V is *commutatively updatable* by
>> U if for all databases D that satisfy the schema it holds that if two
>> series of updates from U have the same result when applied to Q(V) and
>> perform only well-defined updates then they result in the same database
>> when applied to D.

>
> I don't understand why introducing a series of updates is necessary. If
> the database instance is not fixed and the view is invertible, then it
> must follow that the effect of composition of 2 updates in any order is
> the same. Examples and some motivation?

I'll wait with responding to this until we agree on the preceding definitions. It would help if you were a bit more explicit with your quantifiers.

  • Jan Hidders
Received on Wed Sep 10 2003 - 22:52:33 CEST

Original text of this message