This question already has an answer here:
Almost in every interview for the position of web developer, they ask about stored procedures and triggers well I am aware from their definition and basic usage but the truths is I have never used any of them in any of my project. Well I have seen other developers who used them but only when they were the only solution.
My question is are they really important and interview is incomplete without asking questions about triggers and stored procedures. I tend to do keep almost all my logics in PHP, like if change in one database table row will require change in other database table row, I run another query from PHP rather than writing trigger, is it wrong or bad practice? do I need to change my approach? any examples in which use of stored procedures and triggers are better than performing similar operations in PHP?