Implicit constraints in a view

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 8 Nov 2006 20:29:55 -0800
Message-ID: <1163046595.709014.296500_at_m7g2000cwm.googlegroups.com>


NENASHI, Tegiri wrote:
> Aloha Kakuikanu wrote:
> > Please note, that the actions should be consistent. For example, you
> > can not do
> >
> > insert ('JanHidders', 'RMI') into AllPosters;
> > insert ('JanHidders', 'IMR') into AllPosters;
> > commit;
> >
> > because no transaction on the base tables could produce such result on
> > the view.
>
> Why not ? What constraint does not permit the insert ? The insertion
> can be done into the tables directly, no ?

When we define a view, we also define some implicit constraints. Here is quite an obvious one:

check type = 'IMR' or type = 'RMI' or type = 'I'

I suggest that you are not allowed to do the following

insert ('SomeGuy', 'NotAValidTyp') into AllPosters;

exactly because of this constraint. Likewise, in the cited example. Which constraint:-? Received on Thu Nov 09 2006 - 05:29:55 CET

Original text of this message