Are database triggers evil? [closed]

The main problems with triggers are

  • They are completely Global – they apply no matter what the context of the table activity;
  • They are stealthy; it’s easy to forget they are there until they hurt you with unintended (and very mysterious) consequences.

This just means they need to be carefully used for the proper circumstances; which in my experience is limited to relational integrity issues (sometimes with finer granularity than you can get declaratively); and usually not for business or transactional purposes. YMMV.

Leave a Comment