Subject | foreign key vs triggers |
---|---|
Author | Evelyne Girard |
Post date | 2003-12-30T18:36:51Z |
Is there a way to make a foreign key lock the records the same way triggers
do ?
If I have a foreign key and I update a value (not the key field) on the
referenced table, I cannot insert a record for this key field in the
"refererring" table (I get a lock conflict).
On the other side, if I implement the same integrity constraint with 3
triggers( on referenced_table update, delete and on referring_table update
or insert), I can insert the record without any trouble.
Evelyne
do ?
If I have a foreign key and I update a value (not the key field) on the
referenced table, I cannot insert a record for this key field in the
"refererring" table (I get a lock conflict).
On the other side, if I implement the same integrity constraint with 3
triggers( on referenced_table update, delete and on referring_table update
or insert), I can insert the record without any trouble.
Evelyne