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

Home -> Community -> Usenet -> c.d.o.misc -> Re: View updating in practice?

Re: View updating in practice?

From: Jens Lechtenbörger <lechtej_at_uni-muenster.de>
Date: 09 Nov 2002 23:42:28 +0100
Message-ID: <m2adkinz57.fsf@pcwi1068.uni-muenster.de>


Alexander.Kuznetsov_at_marshmc.com (Alexander Kuznetsov) writes:

> Hi Jens,
>
> Sorry, but I did not like this article too much.

I'm sorry to hear that.

> I don't think the example is too practical.

To be honest, I didn't really find good examples for view updates.

> Though I can easily imagine a production system with both employee and
> basketball player related columns in one table, I would say that's not
> the best practice under most circumstances.
> I feel an OLTP database might feature a separate table TEAM,
> inheriting its PK from EMP.

Interesting that you talk about "inheriting". As I mention in another posting, one of the reviewers of my paper did not understand the issue of inheritance at all. In fact, in the end of the article I tried to say the following: Redo your schema design to avoid view updates; sometimes it might be that view updates indicate inheritance relationships that are not visible in the original design.

> If that's not an option, an INSTEAD OF
> trigger could set baskertball-realted fields to NULLS instad of
> deleting a record.
>
> Whenever we manage to isolate an OLTP database physical structure from
> the
> users, our life gets easier and performance over time usually
> inmproves.
> I thinkn amking sure users see only what we are willing to expose is a
> very good practice.

I fully agree. I don't say that you shouldn't use views. But the problem with views and external schema design seems to be that design of views starts from query requirements without taking update requirements into account. I believe (still) that update requirements should be used during external schema design to avoid view updates.

> (That's less an issue with DB2, because we cannot hint to a DB2
> optimizer. Wherever hintsd are allowed, most of them seem to go badly
> wrong over time.)
>
> ISTEAD OF triggers provied us a very convenent shortcut in many
> situations.
> I think it's a very powerful tool whenver we need to hide actual
> physicl structure from exposure. Yes it's powerful which means it's
> quite easy to abuse it.
>
> One can easily hit a pedeshtrian when driving, even the safest car in
> the world. That might not mean anything bad about the car if the
> driver is at fault.

Some cars are safer than others, and drivers should have a driving license.

Jens Received on Sat Nov 09 2002 - 16:42:28 CST

Original text of this message

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