Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: FOREIGN Key to a View ?
In article <36248B1E.14A4180_at_hadassah.org.il>,
Isaac Chocron <Itshak_at_hadassah.org.il> wrote:
>
> It's possible to create a foreign key to a view ?
>
No this isn't possible in Oracle 7 (I don't know about 8, but I doubt it)
If you *really* want to do this you could (probably) try using triggers. Have a per-row insert/update trigger on the child table that checks that the new record has a matching record in the parent *view*, and have per-row delete/update/insert triggers on all the tables used in the view to ensure that any changes to these records do not result in the view now not returning a record that is "referenced" by the child table.
While this may work, I have never tried it & suspect that the performance would be terrible!
--
Regards
Yuri McPhedran
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Oct 14 1998 - 10:37:57 CDT
![]() |
![]() |