Subject RE: [firebird-support] Re: Looking for ideas: keeping log of changes
Author Paul Hope
> <paulhope@...> wrote:
>
> > We have used the method you outlined for some time.
>
> Do you use BEFORE or AFTER triggers? Any particular reason why?
>

I'm not sure it matters unless the update can fail and call an exception
which might cause the AFTER not to fire. I tend to use befores for things
that can modify the data and afters for things that report on it.

>
> > We also use another
> > approach which is to use a trigger to record changes on a field by
> > field basis This is easier to read and works better when
> the changes
> > are typically on a small number of fields each time.
>
> I was thinking about this too but cons outweight the pros for
> me. With this approach the main work is done when record is
> changed, but I expect that the diff is rarely needed, so it
> is better to create it "on demand".
>
>
> ain