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: Another motivational example for inverse view

Re: Another motivational example for inverse view

From: NENASHI, Tegiri <tnmail42_at_gmail.com>
Date: Wed, 15 Nov 2006 17:06:17 +0100 (CET)
Message-ID: <Xns987C710B1479Aasdgba@194.177.96.26>


"Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> wrote in news:1163554254.753687.167440_at_f16g2000cwb.googlegroups.com:

> Consider
>
> table PolarCoordinates (
> theta real,
> R real,
> )
>
> with constraints R>0, 0<=theta<pi
>
> view CartesianCoordinates
> select R*cos(theta) AS x, R*sin(theta) AS y
> from PolarCoordinates
>
> This view is clearly updateable, all we need to do is to apply inverse
> mapping to the any tuple inserted/updated/deleted.
>
> We can even write inverse view explicitly:
>
> view PolarCoordinates
> select sqrt(x*x+y*y) AS R, arcsin(y/sqrt(x*x+y*y)) as theta
> from PolarCoordinates
>

You are joking are you not ? It is simple because the structure of the relations is the same, there is not the change of the structure that a join of tables has, you did not create a new structure. The probleme of the view updatability is a morphing of one structure into the other.

--
Tegi
Received on Wed Nov 15 2006 - 10:06:17 CST

Original text of this message

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