Subject | Re: [ib-support] Design Advice |
---|---|
Author | Lucas Franzen |
Post date | 2002-01-10T22:51:54Z |
> Should I create a foreign key constraint with 'on update cascade' and 'onLuiz,
> delete set null' in T1 as:
>
> ALTER TABLE T1
> ADD CONSTRAINT FK_XX
> FOREIGN KEY ( c2 )
> REFERENCES T2 ( nr )
> ON UPDATE CASCADE
> ON DELETE CASCADE
>
> or for performance, I must to do it using triggers em T2 to update T1?
using an "action" in a foreign key is nothing else than generating a
"system trigger" that will save you time to do the coding of a trigger
on your own.
I doubt there's any speed difference between explicit
update-/delete-triggers and defining the appropriate actions in the
foreign key constraint.
Luc.