Subject | Re: [firebird-support] What is better? use integrity referencial or triggers? |
---|---|
Author | Ray Drew |
Post date | 2003-11-27T11:13:28Z |
Martijn Tonies wrote:
two back that FK's with low selectivity could affect performance (FB1)
and that this would not be an issue if the creation of an index on FK's
was made optional. In the meantime it was recommended (by Helen IIRC)
that in this situation it might be preferable to implement RI through
triggers rather than FK constraints.
Is this still recommended with FB1 - or have I misunderstood the advice?
Ray
> > for the check of the primary keyI agree with this entirely but... there was some discussion a year or
>
> A Primary Key constraint.
>
> >, and the foreign key?, what is
>
> A Foreign Key constraint.
>
> > better?, declare it trought constraints?, or do trought declare
> > triggers that do the job?.
>
> No, I would throw triggers out of the window any day for this.
> http://www.cvalde.net/document/declaRefIntegVsTrig.htm
two back that FK's with low selectivity could affect performance (FB1)
and that this would not be an issue if the creation of an index on FK's
was made optional. In the meantime it was recommended (by Helen IIRC)
that in this situation it might be preferable to implement RI through
triggers rather than FK constraints.
Is this still recommended with FB1 - or have I misunderstood the advice?
Ray