Re: Oracle7 Cascading Updates??

From: Sridhar Subramaniam <avion_at_ozemail.com.au>
Date: 1996/01/06
Message-ID: <30EEACA0.4AA0_at_ozemail.com.au>#1/1


Eddie Hernandez wrote:
>
> How can I set Oracle to perform automatic cascading updates? In
 other words
> lets say I have a '1 to many relationship' and a user changes the
> primary key value of a record in the '1' table. I would like all its
 childrens'
> foreign keys to reflect the new change. If any of you are familiar
 with Access,
> Access includes this very convenient feature along with Cascading
 Deletes
> also.
>
> Is there a way to do this without having to create a trigger?
>
> BTW, I am running Oracle7 Workgroup Server on a Windows NT Server.
>
> Any help would be appreciated, thanks,
>
> --
>




> Eddie Hernandez North Broward Hospital
 District
> Programmer/Oracle DBA 1608 SE 3rd Avenue
> hernb0_at_nbhd.org Ft. Lauderdale, FL
 33316
>


Eddie,
Cascade updates are not supported by Oracle. It is sort of bad database design to have primary keys changing from time to time. Cascade deletes are fully supported.
If, however, your app does call for cascade updates from parent tables to all child tables, you will have to drop all referential integrity constraints ( foreign key ) and enforce these using triggers.

-- 
Cheers

Sridhar Subramaniam
Avion Consulting Services
Sydney - Australia
Email : ssubrama_at_nibucorp.ccdn.otc.com.au / avion_at_ozemail.com.au

Disclaimer : All opinions are truly and just mine.
Received on Sat Jan 06 1996 - 00:00:00 CET

Original text of this message