Re: Jan's well-defined view updates definition

From: Jan Hidders <jan.hidders_at_ua.ac.be>
Date: Thu, 18 Sep 2003 10:34:24 +0200
Message-ID: <3f696e04.0_at_news.ruca.ua.ac.be>


Bob Badour wrote:

> "Jan Hidders" <jan.hidders_at_pandora.be> wrote in message
> news:d14ab.25480$rw3.1352807_at_phobos.telenet-ops.be...

>>Mikito Harakiri wrote:
>>>"Jan Hidders" <jan.hidders_at_pandora.be> wrote:
>>>
>>>> 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.
>>>
>>> Could you please provide a non-commutatively updatable example
>>> that we can discuss?
>>
>> Lets say I have base relations R(a,b) and S(b,c) with a foreign key
>> R.b -> S.b and a view V that is defined by the natural join of R
>> and S. The additions and deletions are both well-defined but if I
>> add the tuple (a1,b1,c1) and then remove it then the end result is
>> an additional tuple (b1,c1) in S, which is not the same as the end
>> result of adding 0 tuples. So for the class of updates that
>> consists of inserts and deletes it is not commutatively updatable.
>
> Why would one have (b1,c1) in S instead of (a1,b1) in R or neither?

The first option violates the foreign key and the second option deletes more than necessary which violates the CWA.

  • Jan Hidders
Received on Thu Sep 18 2003 - 10:34:24 CEST

Original text of this message