Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Possible problems with Date & McGoveran View Updating

Re: Possible problems with Date & McGoveran View Updating

From: Bob Badour <bbadour_at_golden.net>
Date: Mon, 8 Sep 2003 21:09:39 -0400
Message-ID: <N3b7b.732$%Q.69880903@mantis.golden.net>


"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news: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.
>

> Union view update has 3 solutions: insert into the first relation, insert
> into the second, and insert into the both. You just arbitrarily chosen one
> of them. Your choice formally is just [arbitrary] constraint that you add
to
> the view.
>

> > 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
>

> and being asked to find x1, x2, and x3 given y1, y2, and y3. It is easy to
> see that if y1+y2!=y3, then there is no solutions, while if y1+y2=y3, then
> there is a continum of solutions. This continuum of solutions would be
> disambiguated if we add one more independent linear equation.
>

> > > 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.
>

> Constraint, or additional view. For example, we certainly have not enough
> information to disambiguate union view alone, but can disambiguate union
> view if also know (symmetric) difference.
>

> 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
> )
>

> If the value (1,1) is inserted, then we certainly aren't allowed to insert
> it into both A and B. Otherwise the second operand of the CP would be
empty.
>

> The ambiguity between inserting into A and inserting into B is still
> unresolved. We eliminated one possibility out of 3 only, but I hope that
the
> idea is clear.
>

> > > 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

>
> Not general enough.

Not general enough for what?

> > > 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.

The view is what it is. Extending the view would alter the logical view of some user or application. Received on Mon Sep 08 2003 - 20:09:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US