pros/cons re constraints on audit tables
pros/cons re constraints on audit tables
От:
Karsten Hilbert <Karsten.Hilbert@gmx.net>
Дата:
I have been using everyones favourite implementation of auditing by using triggers on insert, update and delete the concept for which has been posted here time and again (mine comes complete with a Python script to auto-generate the needed triggers on marked tables - mail me if interested). Every so often it has been said that the audit trail tables should not bear any constraints. I have so far used "not null" constraints in my audit trail tables on those attributes that are constrained thusly in the audited source table. I have marvelled back and forth on whether this is a good idea many times but haven't come to a conclusion. So, if anyone thinks this is a really dumb thing to do please tell me. Rational arguments and examples for when this would fail are highly welcome. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346