Need an opinion
Do you think its a good idea storing basic audit information for all entities in a common database table? I mean Created By, Created On, Modified By, Modified On. The entity table will have the Audit Id & timestamp
Audit information is typically queried during updates to check conflicts and sometimes from business logic associated with the Creator for e.g. owner of the record in a CRM New Lead row.
May be we should never use audit fields as business fields.
I think it will make the inserts slow because of two tables per entity but overall will make the entity classes compact and will make auditing a ON/OFF switch
There are basically three options I’m aware of:
It really depends on what sort of audit data you’re interested in. In many cases, it’s no use knowing who made a change and when if you can’t see what the change actually was because other people have changed the same entity since then.