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

Home -> Community -> Usenet -> c.d.o.server -> Re: Referential Integrity Using View

Re: Referential Integrity Using View

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 06 May 2002 19:32:34 GMT
Message-ID: <3CD6DA4B.1EBD0FAE@exesolutions.com>


Mark & Kristi Wagoner wrote:

> Thanks for the info.
>
> I can't use the tables in this case because the view is actually a union of
> two tables. I am trying to make sure any rows in a third table contain an
> identifier that is defined in at least one of the other two tables.
>
> I guess I'll have to use a trigger.
>
> "Frank" <fbortel_at_home.nl> wrote in message news:3CD6E271.7080209_at_home.nl...
> > Mark & Kristi Wagoner wrote:
> >
> > > Is there a way to use a view as the target of a foreign key definition?
> I
> > > created a primary key on my view but, since you must specify the DISABLE
> > > clause when creating it, I cannot reference it in a table's foreign key
> > > clause. I am using 9.0.1
> > >
> > > Thanks
> > >
> > >
> > >
> >
> > Nope - a view is just that: a way of looking at data.
> > Define on tables (what's wrong the the tables, used in
> > the view?). So: no referential constraints on views
> >

That is dealt with by putting constraints on the underlying tables or in an extreme case with an INSTEAD OF trigger.

Have you tried using a view to violate table constraints or are you making assumptions that you can?

Daniel Morgan Received on Mon May 06 2002 - 14:32:34 CDT

Original text of this message

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