We're building our DB design (using PostgreSQL) and for (almost) every table , I have the following columns
CREATE_TIMESTAMP TIMESTAMP,
CREATED_BY VARCHAR(25),
modified_TIMESTAMP TIMESTAMP,
modified_BY VARCHAR(25),
I am also using Audit tables for some of the Entity Tables. The DB about 15 tables as of now (very soon will grow to about 50). For about 20% of these Tables(which are Entities), we're required to back them up (using Triggers) to IDENTICAL copies of Audit Tables. Eg : A Family has 1 or more "Contact"s. A Contact has email, phone, etc info PLUS 1 "Address". So, when a Family gets CREATED or Modified or deleted, using the Trigger, I copy the contents of the Family Table to its AUDIT Table, Family_Audit. Similarly, when a change is made to "Contact" table, I will make a copy of it to the Contact_Audit Table. Same for Address.
Changelog Table : If I already have Audit Tables for each of the Entity Tables that need an "Audit", then what is the point of having a Changelog Table ?
Given this, I wondered if it still made sense for me to use the above "boilerplate" columns.
Any comments ?
More important, what are the boilerplate columns you add to (almost) every Table ? why ?