Re: View updates (was "is something a RDBMS")

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Wed, 27 Aug 2003 11:06:01 -0700
Message-ID: <ty63b.21$84.154_at_news.oracle.com>


That depends how agressive the goal is. A common and less ambitious approach is allowing programmer to code "on update" trigger. Sometime ago Vadim Tropashko posted an article where he demonstrated that one can write such a trigger mechanically if one knows the inverse view. From relational perspective substituting procedural code into declarative inverse view is a big deal. This is why I freely manipulate the term "inverse view" in the context of view update threads.

And I was wrong when commented out that inverse view = complement view from Banchilhon&Spyratos paper. Complement view serves the purpose making view operator invertible, but offers no help calculating inverse view.

In short, it is a grey area if RDBMS supports "on update" trigger whether it conforms rule #6 or not.

"Heikki Tuuri" <Heikki.Tuuri_at_innodb.com> wrote in message news:fQ53b.680$n62.269_at_read3.inet.fi...
> Mikito,
>
> good that you bring up the problems in determining the updateability of a
> view. That is exactly why in the thread "does a table always need a PK?" I
> asked Bob Badour and Lee Fesperman to show where that rule 6 of Codd is
> formally defined. They seem to be ignorant of these problems.
>
> We can guess that generally determining if a view is updateable is an
> undecidable problem. That would make it impossible ever to make a database
> which satisfies Codd's rule 6.
>
> Best regards,
>
> Heikki
>
> "Mikito Harakiri" <mikharakiri_at_ywho.com> kirjoitti viestissä
> news:Wv53b.19$84.119_at_news.oracle.com...
> > "Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message
> > news:dZ43b.18$84.104_at_news.oracle.com...
> > >
> > > D&D ad-hock updateability rules.
> >
> > Let's clarify why I call those "ad-hock".
> >
> > Given a view A transforming set of relational vars x into another set of
> > relational vars y, we can write it like this:
> >
> > Ax=y
> >
> > Solving view updates involves finding another view A^(-1) ("inverting"
> > operator A) so that
> >
> > x=A^(-1) y
> >
> > This notation is perfectly justified when we write classic linear
algebra
> > example problem in terms of relations
> >
> > select x1+x2 as y1, 2*x1+3*x2 as y2 from X
> >
> > You may notice that vector (x1,x2) is relational var x, and (y1,y2) is
> > relational var y, while matrix [[1,1],[2,3]] is operator A in terms of
> > notation introduced earlier.
> >
> > Linear Algebra has a method of inverting the above view to
> >
> > select 3*y1-y2 as x1, -2*y1+1 as x2 from Y
> >
> > It is this math method that I'm contrasting to D&D ad-hock approach.
> >
> > Of course, I don't have a slightest idea what the method is when we
write
> > equations involving relational operators. The major problem is that in
> math
> > we can freely apply laws to transform expressions like this
> >
> > u+v=w
> >
> > into
> >
> > u=w-v
> >
> > while we have major difficulties manipulating relational expressions.
For
> > example,
> >
> > u union v = w
> >
> > and we don't seem be able to apply any tranformation to it which would
> move
> > v to the other side of the equation.
> >
> > In short, given the context of the problem above it seems unlikely that
> > solving equations in the relational algebra would be reduced to applying
a
> > set of simple rules soon.
> >
> >
> >
>
>
Received on Wed Aug 27 2003 - 20:06:01 CEST

Original text of this message