Re: View updating in practice?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 11 Nov 2002 16:41:13 GMT
Message-ID: <3DCFDD95.4885F6D7_at_exesolutions.com>


Jens Lechtenbörger wrote:

> 71062.1056_at_compuserve.com (--CELKO--) writes:
>
> > >> I would be delighted if anybody out there was willing to share
> > their experiences with me. <<
> >
> > The SQL-92 standard is actually very conservative about what VIEWs are
> > updatable. They have to be based on:
> >
> > (1) a SELECT statement on one and only one table; this can go thru
> > several layers of VIEWs on top of VIEWs, however.
> >
> > (2) The VIEW must include all the columns of a key (i.e. a UNIQUE or
> > PRIMARY KEY constraint) in the base table
> >
> > (3) All columns not shown in the VIEW must have default values or be
> > NULL-able (if you think about it for a minute, this lets you construct
> > and insert a complete row into the base table).
>
> I don't even agree with this. If wouldn't want a user to delete
> from a projection that includes the key if s/he is not allowed to
> select from the underlying table. Just because s/he doesn't know
> what exactly is being deleted.
>
> Regards,
>
> Jens

I may be misunderstanding your posting. But try to delete from a view where you can not delete from the underlying table. You may find it a bit difficult to do.

Daniel Morgan Received on Mon Nov 11 2002 - 17:41:13 CET

Original text of this message