I've seen people that are dead against database triggers. I agree with them to certain extent, in that, a poorly written trigger logic (with calls to data intensive DML queries) can cause performance bottlenecks. But to categorically deny its use, seems to be not selling with me and puts in a place where I have to argue for it. Am I missing anything? Are DB triggers really a bad idea?
Here is an example: Any time a Purchase Order is approved, I want to send an email notification to all people involved in the approval hierarchy.
The trigger will flag a change to authorization_status column in po_headers_all table and be done with. This flag will then kick off a job that picks up the approval hierarchy and build a email list and notify them.
What would be the best way to accomplish real time notification of an approved PO?