Re: Jan's well-defined view updates definition
Date: Tue, 16 Sep 2003 23:12:56 GMT
Message-ID: <YNM9b.23541$1H4.1471556_at_phobos.telenet-ops.be>
Mikito Harakiri wrote:
> "Jan Hidders" <jan.hidders_at_pandora.be> wrote in message
> news:s2K9b.23287$Jm4.1458233_at_phobos.telenet-ops.be...
>> [...] 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.
>
> The problem of view updates is so complex that we might have to use
> simpler math in order to understand it.
Sure. But you have to make sure you are not oversimplifying the problem, otherwise you are not solving the problem at hand. So, again, how do you justify the simplification you propose?
> Could we try redefining "well-defined" in my terms one more time?
Of course. But don't you think it would be wise to somehow define the properties that we would like the definition to have? How else do we know if the definition is a good definition or not? What is exactly the problem that we are trying to solve? What would we consider a good solution?
> If we
> can add one or more view equations to get an invertible transformation,
> then, we call view "well-defined". In your example,
>
> Q1 = (SELECT name
> FROM D
> WHERE dept = "sales"
> )
>
> we add
>
> Q2 = (SELECT name
> FROM D
> WHERE dept <> "sales"
> )
>
> Now, if you have view update
>
> insert into V1 values ('Smith')
>
> we express it as a "delta" relation like this:
>
> deltaV1 = (select 'Smith' as name from DEE)
>
> Our main assumption is that view V2 doesn't change:
>
> deltaV2 = (select null as name, null as dept from DUM)
>
> and, therefore,
>
> deltaD = Q^(-1) * <deltaV1, deltaV2> =
> = (
> select name, 'sales' as dept from deltaV1
> union
> select name, dept from deltaV2
> ) * <deltaV1, deltaV2>
>
> Substituting view deltas into transformation formulas we have
>
> deltaD =
> (select name, 'sales' as dept from (select 'Smith' as name from DEE)
> union
> select name, dept from (select null as name, null as dept from DUM)
> )
>
> Or, after obvious equivalent query transformation:
>
> deltaD = select 'Smith' as name, 'sales' as dept from DEE
>
> which is your desired result.
That looks a lot like the constant-complement approach that was already discussed earlier in this group. That's certainly also an interesting approach. But I ask again the same question: how do you justify the restrictions that you impose? What is the problem that is solved by this solution?
- Jan Hidders
