MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » August 2014

RE: Trigger issue with authority



fixed

Here's the deal, many people try to shoehorn triggers into their old
philosophy of doing things,
or, they want the trigger program to simply call their old monolithic
program.

For example, I update row x in myschema/mytable. A trigger is fired.
Programmer uses bare minimum of the capability of the trigger and has it
fire off a program that then checks mytable for all changes. argh!

While, what should happen is they actually evaluate the data passed to the
trigger program. They now know that row x was updated. They can even
compare to find out exactly what columns were updated, and act
accordingly. And, if they want to change that same row, do NOT call some
other program to read it, modify it, and update it. Instead, simply
update the trigger buffer so that it writes the desired changes out to the
table.

I've seen lots of these never ending programs constantly analyzing tables
for changes by people who'd rather put a physical trigger to their head
than to learn how to do a trigger right.


Rob Berendt





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact