Subject Re[2]: [firebird-support] Primary Key, Foreign Key
Author Helen Borrie
At 12:01 PM 20/11/2003 +0200, you wrote:
>Hello Helen,
>
> >It's a 1:1 relationship, so it's very easy to implement a cascading delete
> >(if wanted) and existence rules using custom triggers. Drop the FK
> >relationship
>
>Thanks for response.
>
>So you actually suggest that I implement referential integrity using
>triggers instead of FK. Unfortunatelly this implies inconsistencies in
>design. Do you think that benefits of dropping the FK index worth it?
>Will execution plans be better?

The execution plans will be better because you avoid the duplicate
indexes; but if you want to keep the RI in formal constraints, then use
surrogate primary keys for the optional 1:1 relations and then *do* have
the foreign keys. This also gives more flexibility if you have other
dependencies.

heLen