I and my friend argued with each other about the design of a database.
He argues that to ensure the integrity of a complex database is better to use triggers.
I believe that for this purpose is better to use keys (primary, unique), and constraints.
I think that the use of triggers is dangerous, because they work "behind the scene" and it's not easy to say what will happen after the execution of a command. Moreover, if trigger has a bug it can break DB's integrity.
What do you think about it?