Subject Re: [firebird-support] Was poor selectivity in foreign keys
Author German Pablo Gentile
Helen Borrie wrote:

> Sorry, I don't understand what you are saying here. Custom RI is the
>*alternative* to creating a foreign key, i.e. declarative RI, in situations
>where the effect of declarative RI is worse than the risk of a RI
>violation. You would not have both a FOREIGN KEY constraint *and* custom
>RI on this relationship.
What i mind is, why i need that index in custom RI. For a better

>If you need to apply custom RI triggers, be mindful of the possible
>outcomes if you use transaction configurations that are at the "dirty" end
>of the scale. ReadCommitted isolation, when carelessly used, allows the
>possibility of phantom rows and undesirable overwriting. Declarative RI
>-the FOREIGN KEY constraint - provides better protection than custom RI
>triggers against the integrity breakages inherent in such conditions.
I only need the beforedelete check. The existence check will be done at
app level so only allow insert via lookups to foreign tables.
In the beforedelete can happen that trouble?