Subject | Re: [firebird-support] doing cascade update manually? |
---|---|
Author | Helen Borrie |
Post date | 2003-12-13T21:46:58Z |
At 12:19 AM 14/12/2003 +0700, you wrote:
to abort by throwing an exception -- or simply catch the change and revert
it to OLD.value if it makes sense to do that. But, IMO, creating
dependencies between columns that humans can stuff up is a fool's game.
/heLen
>Would declaring all foreign keys as CASCADE UPDATE be a "good practice"?In general, yes.
>Some of my foreign keys are referencing unique columns, not PK, andThen you are falling into the trap creating of non-atomic dependencies.
>these columns sometime change values (though infrequently). All of my PK
>usually don't change their value, but many times it's more convenient to
>refer to a UC instead of a PK.
>Sometimes I want to check whether the change in unique column value isIn triggers you can test any incoming value and cause the entire operation
>"sensible", and if it is, I want to allow that (plus cascading).
to abort by throwing an exception -- or simply catch the change and revert
it to OLD.value if it makes sense to do that. But, IMO, creating
dependencies between columns that humans can stuff up is a fool's game.
/heLen