Re: Possible problems with Date & McGoveran View Updating
Date: Mon, 8 Sep 2003 17:01:08 -0700
Message-ID: <xT87b.26$741.203_at_news.oracle.com>
"Bob Badour" <bbadour_at_golden.net> wrote in message
news:Vd97b.717$zB.69216404_at_mantis.golden.net...
> "Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message
> news:Uj47b.22$741.237_at_news.oracle.com...
> >
> > In language of view equations that translates into an equation
> >
> > Ax=b
> >
> > having more than one solution.
>
> I am not certain what you mean. Are you saying that in the case of
ignoring
> symmetry and arbitrarily deciding to insert to only one base relvar there
is
> more than one solution?
No, your update policy allows one solution only.
> Or are you comparing the entire situation to an
> equation with multiple roots?
Yes. Suppose we have a system of equations
x1+x2 = y1
x1+x3 = y2
2*x1+x2+x3 = y3
> > There is a clear method of making equation solution unique: add more
> > equations!
>
> I assume you are agreeing with my suggestion to declare the constraints.
select x1, x2 from (
select x as x1 from A
union
select x as x1 from B
), (
select x as x2 from A
minus
select x as x2 from B
union
select x as x2 from B
minus
select x as x2 from A
)
> > Given
> >
> > table X (
> > a integer,
> > b integer
> > )
> >
> > the view
> >
> > view A as
> > select a from X
> >
> > is not updateable, since the equation
> >
> > Ax=y
> >
> > has nonunique solution no matter what value relation y has. If we throw
in
> > more equations, for example
> >
> > view A1 as
> > select b from X
> >
> > then, the view that combines A and A1 together is updateable.
> >
> > Constraints are views that evaluate to constants, they could be added to
> > disambiguate the original view the same way as the "normal" views.
>
> Suppose we extend the syntax for view definition to allow systematic
default
> values:
>
> view A as
> select a from X
> default X set b = 0 on insert to A
> > All these ideas are parallel to equations solving in algebra. Given 2
> > variables x1 and x2, the equation
> >
> > x1 = y1
> >
> > doesn't have unique solution since x2 can be chosen arbitrarily.
However,
> if
> > we add
> >
> > x2 = y2
> >
> > then our system of equation has unique solution (no matter what values
> > variables y1 and y2 have). Alternatively, we can add a constraint
> >
> > x2 = 0
> >
> > which disambiguates our system of equations as well.
>
> The constraint method basically restates POOD. Or alternatively, POOD
states
> a good design has sufficient constraints declared to disambiguate the
> systems of equations.
>
> The default value method constrains specific operations without
constraining
> the base relvars.
Constraints are one possibility. Extending views (aka adding more equations) like in the "union" example above is more general approach. Received on Tue Sep 09 2003 - 02:01:08 CEST
