Re: Jan's well-defined view updates definition

From: Jan Hidders <jan.hidders_at_pandora.be>
Date: Tue, 16 Sep 2003 20:05:44 GMT
Message-ID: <s2K9b.23287$Jm4.1458233_at_phobos.telenet-ops.be>


Mikito Harakiri wrote:
> Jan Hidders <jan.hidders_at_pandora.be> wrote in message
> news:<sLq9b.22177$my3.1385515_at_phobos.telenet-ops.be>...

>> > You don't have any constraint on the base table. Therefore,
>> > 
>> > deltaD = (
>> >  update Emps
>> >  set dept = 'marketing'
>> >  where dept = 'sales'
>> > )
>> > 
>> > is legal.
>> 
>> Sure. But it's
>> 
>> deltaV = (
>>   update TrEmps
>>   set dept = 'marketing'
>>   where dept = 'sales'
>> )
>> 
>> that is illegal, i.e., not well-defined. The view definition acts as a
>> constraint here. There is not update that you can do on the base tables
>> that would change the view in the way that is specified by deltaV.

>
> I don't understand. deltaV is trivially illegal as written since it
> refers to nonexisting column dept.

Ah, yes, sorry. But even if the column would exist in the view then I would still consider it an illegal update.

>> Indeed. But actually I'm not transforming anything. All I do is look at
>> the logical consequences of what the user has told the database. It is
>> crucial that we regard the view as a set of facts and interpret updates
>> as additions of deletions of facts to a certain predicate. Anything else
>> would be heresy. :-)

>
> But aren't you essentially mapping one set of views of the facts
> (being deltas or cumulative) into another set of views? User told
> database his vision in terms of views that he understands (in
> French;-) and we need to translate this into other set of views (in
> English).

That's one way of looking at it, and certainly a valid and interesting way to do so, but it is not the only valid point of view and certainly not how I see it. The intention of my definition was to get the most liberal notion of "updatable" that still makes sense. That doesn't mean that more restricted notions like yours don't make sense, but I would say that you would have to somehow justify your extra restriction. Since we are not just doing mathematics here but computer science it is not enough to say that the mathematics becomes more elegant.

> If some word have multiple meanings we have ambiguity, but
> typical solution in computer science is not to guess the best
> solution, right?

Could you define 'typical'? :-) I see least fixpoints all over the place. Think of the semantics of formal grammars, lambda calculus, Prolog, SQL with recursion, the definition of natural numbers, et cetera.

  • Jan hidders
Received on Tue Sep 16 2003 - 22:05:44 CEST

Original text of this message