Added a number of MySQL triggers which keep the tables in sync #38