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

Home -> Community -> Usenet -> comp.databases.theory -> Another motivational example for inverse view

Another motivational example for inverse view

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 14 Nov 2006 17:30:54 -0800
Message-ID: <1163554254.753687.167440@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 Received on Tue Nov 14 2006 - 19:30:54 CST

Original text of this message

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