Everything is fine in my project except with the audit fields. Just insert and update is being audited in our imaginary universe.
I proposed one table like similar to the next examples:
Suggestions for implementing audit tables in SQL Server? Just table name, table column, user, action and date.
But my team didn't think the same way, they put a column on each table to track an update or insert time. And when I asked why? they told me that is the way that they keep the track in their work.
In the end I give up and I put every field on each table. Since all the team except me, told me to put that fields.
Example:
Their approach
Table Customer
+-------------+-------------+-----+--------------------------------+-------------+
| Name | LastName | ... | LastModification (Audit Field) | User |
+-------------+-------------+-----+--------------------------------+-------------+
| varchar(30) | varchar(50) | ... | datetime | varchar(30) |
+-------------+-------------+-----+--------------------------------+-------------+
My approach
Table Customer
+-------------+-------------+-----+
| Name | LastName | ... |
+-------------+-------------+-----+
| varchar(30) | varchar(50) | ... |
+-------------+-------------+-----+
Table Audit
+-----------+------------+--------+------+-------------+
| TableName | TableField | Action | User | DateAndTime |
+-----------+------------+--------+------+-------------+
So the question is:
Which is a better design, one table that keep the history of transactions or one field for each table? (Pro and cons)