Subject Re: [firebird-support] Triggers best practice
Author Thomas Clarke
On Mon, Jun 13, 2011 at 9:54 AM, firebirdsql <firebirdsql@...> wrote:

>
>
> I have a couple of tables that have tallys and several triggers that
> maintain these tallys.
>
> Some of the updates can trigger the same trigger multiple times (since
> firebird fires a trigger per row). Is this considered best practice or would
> a stored procedure be better (don't really like to use stored procedures
> since it adds an extra level of maintenance)?
>
>
>

Hi there,

My experience with triggers has been they are wonderful in simple cases and
can be nightmares in complex situations where triggers may kick off other
triggers. Very hard to debug. So I try to beep my trigger use down to a
minimum and to keep them as simple as possible. I often just use stored
procedures outside of the triggers for generating statistics and reporting
information.

Just my 2 cents worth.

Thomas Clarke
Cyber Sea Incorporated
Barbados


[Non-text portions of this message have been removed]