| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: View updating in practice?
Mikito Harakiri wrote:
> "Jens Lechtenbörger <lechtej_at_uni-muenster.de> wrote in message news:<m28yzxhlih.fsf_at_pcwi1068.uni-muenster.de>...
> > > Relation A:
> > >
> > > ID VOICE FAX
> > > -- ----------- --------------
> > > 1 4150000000 4081111111
> > > 2 80012345672 6501234567
> > >
> > > select id, 'VOICE' phonetype, voice number
> > > from A
> > > union
> > > select id, 'FAX' phonetype, fax number from A
> > >
> > > What is the method to invert it?
> >
> > It should be a join of (a) the projection of the view on id and
> > voice_number and (b) the projection of the view on id and
> > fax_number, i.e., something like this:
> >
> > select v1.id, v1.voice_number, v2.fax_number
> > from
> > (select id, voice_number from view) as v1,
> > (select id, fax_number from view) as v2
> > where v1.id=v2.id
> Note that cartesian product and union are dual operations <...> Your result, where inverse view
> has CP operation in it, is not surprising from that perspective.
Not quite. According to the corrected table of dualities:
Also note that when we solve the equations we don't use the dual operations. We use inverse operations. For example,
x + 3 = 5
is solved by applying minus
(x + 3) -3 = 5 - 3 Received on Wed Nov 13 2002 - 14:08:48 CST
![]() |
![]() |