title: Are database triggers necessary?
body: <p>In my experience, they are not a good idea because they can result in surprising side effects, and are difficult to debug (especially when one trigger fires another). Often developers do not even think of looking if there is a trigger.</p>
  <p>On the other hand, if you have logic that must occur every time a new <code>FOO</code> is created in the database, then it may be the most foolproof place to put it is an insert trigger on the <code>FOO</code> table.</p>
  <p>The only time we're using triggers is for really simple things like setting the modified date field of a row.</p>
  <p>I'm struggling to figure out whether triggers are necessary and would appreciate any input. If they are necessary, what are the most important issues to consider when implementing them?</p>