Maintaining audit log for entities split across multiple tables
问题 We have an entity split across 5 different tables. Records in 3 of those tables are mandatory. Records in the other two tables are optional (based on sub-type of entity). One of the tables is designated the entity master. Records in the other four tables are keyed by the unique id from master. After update/delete trigger is present on each table and a change of a record saves off history (from deleted table inside trigger) into a related history table. Each history table contains related