Re: On view updating

From: Tony Andrews <andrewst_at_onetel.com>
Date: 20 Sep 2004 06:03:24 -0700
Message-ID: <1095685404.749627.19430_at_h37g2000oda.googlegroups.com>


Alfredo Novoa wrote:
> What do you think about this?
>
> http://www.dbdebunk.com/page/page/1396086.htm
>
> I can't agree more with this:
>
> ---
> I therefore have come to believe that "view updateability" should be
> allowed to happen IF AND ONLY IF the system has PRECISELY ONE WAY to
> "resolve" the user's request.
> ---
>
> In my opinion any approach to the view updating problem that is not
> based in logical inference is an absurd.

Agreed. I don't like a lot of the view updating rules laid out in the latest Intro to DB Systems, and nor apparently does C J Date any more. I'm intrigued that David McGoveran still considers it a "solved problem". I suppose it depends on what you mean by solved. We seem to have started from "All views are updatable; SQL vendors should do better" via "all views are updateable - subject to certain constraints" to "all views are updatable - subject to certain constraints AND the Assignment Principle". This is all very well, but it seems to me we are effectively back to square one: "some views are updateable; some are not".

In this particular case I think the theorists have been over-scornful of the SQL vendors (perhaps out of habit!) I don't know whether Oracle is unique or not in having the "key-preserved" rule for view updateability; it may not be perfect, but it does mean that many views are updateable, and in ways that don't violate constraints, the Assignment Principle, or "common sense".

Some clear problems with updating views: 1) the transformation made by a view is often one way: you can't be sure what is in the base tables to achieve the result you see from the view.
2) views, unlike base tables, are often not even in 2NF - hence updating views could lead to "update anomalies": if you delete the last v_employee then you also delete his department.

My feeling is that views are NOT equivalent to base tables in all cases, and therefore it is unsurprising that they can't be used as if they were base tables in all cases. Received on Mon Sep 20 2004 - 15:03:24 CEST

Original text of this message