Enforcing Referintail integrity

Enforcing Referintail integrity

Post by Aly » Fri, 20 Feb 1998 04:00:00



Hi, if I have two tables Parent and child
how can I enforce cascade update and delete
I know that I should use either triggers or store procedure, which one is
better and how many store procedure dO I have to write and  how can I
execute the s_p( meaning how can I activate s_p to cascade update and
delete)
thanks
Aly

 
 
 

Enforcing Referintail integrity

Post by Bobby Weatherfor » Sat, 21 Feb 1998 04:00:00


Aly:

Just do it through triggers.  That's the only way to ensure the cascade
occurs during a DML (Delete, Update).  Stored procedures would mean a
client-side implementation which isn't the best way to implement business
rules.

Hope this helps.

Bobby

CSPDBA, CSI


>Hi, if I have two tables Parent and child
>how can I enforce cascade update and delete
>I know that I should use either triggers or store procedure, which one is
>better and how many store procedure dO I have to write and  how can I
>execute the s_p( meaning how can I activate s_p to cascade update and
>delete)
>thanks
>Aly