Re: On view updating

From: Tony Andrews <andrewst_at_onetel.com>
Date: 21 Sep 2004 02:45:11 -0700
Message-ID: <1095759911.683254.192790_at_k26g2000oda.googlegroups.com>


Laconic2 wrote:
> "Tony Andrews" <andrewst_at_onetel.com> wrote in message
> news:1095695006.709332.227670_at_h37g2000oda.googlegroups.com...
>
> > Both views return those employees who belong to a department based
in
> > London. But the first is a join view, and so a DELETE from this
> > corresponds to a DELETE from emp AND dept; the second corresponds
only
> > to a DELETE from emp. Yet the optimiser might well transform one
form
> > into the other (unless it takes account of this - in which case
> > optimisation options have been reduced).
> >
>
> You've lost me. Why would the first view have to delete any
departments?

Because that's how Intro to DB Systems says view updating should work. It's not my desire that that should happen, it's what Date said should happen.

> While we're at it, column wildcarding and logical data independence
> interact with each other.
>
> If, after you define one of these views that retireves "emp.*", I
come
> along and "ALTER TABLE emp ADD COLUMN
> fubar TEXT NOT NULL" should your view now return the new column or
not?
> Should your view suddenly become "non insertable?"

Good question. I only used the wildcard out of laziness (or more charitably: to keep the examples simple). Received on Tue Sep 21 2004 - 11:45:11 CEST

Original text of this message