Case: I have a table T1 keeping records of submissions through a form. On updates to the records on this table, I want to insert a row to table T2.
For this case, how would the performance of the following scenarios compare?
Scenario A: An AFTER UPDATE ON T1 trigger builds and inserts the relevant row. Since T1 has no references to T2, this would be okay.
Scenario B: Server side service layer (PHP, python, whatever) inserts the relevant row after making the update.
Scenario C: This would be stored procedures, but there are many comparisons of SPs and triggers, so you don’t have to include them.
Given the choice between triggers and python, I would choose triggers. Triggers on your data ensure that T2 contains a record for T1 no matter how the data is inserted, rather than relying on the application, thus ensuring the integrity of your data. If you add another application which adds records to T1, with triggers, T2 still gets records inserted.
I don’t know why you discount stored procedures though, nor where you get the idea that triggers are faster or “more suited to the nature of a database server”