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_at_f16g2000cwb.googlegroups.com>
Consider
Date: 14 Nov 2006 17:30:54 -0800
Message-ID: <1163554254.753687.167440_at_f16g2000cwb.googlegroups.com>
Consider
table PolarCoordinates (
theta real,
with constraints R>0, 0<=theta<pi
view CartesianCoordinates
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
R real,
)
select R*cos(theta) AS x, R*sin(theta) AS y
from PolarCoordinates