I need an advise for the Audit Trail of the Help Desk module for my application. Customer wants to keep the the track of each and every changes in the help desk module of application. There are more then 40 fields on the help desk form(more cold be added in future). I have two options for the complete audit trail.
1st: I create a denormlized table for the track of all the fields having four columns for each field ie new value, old value, updated date, updated by
. on the basis of these column i can track all the fields.
2nd: I create a table that keeps the track of each changes ie
change_id, HD-Ticket_id, updated_date, updated_by
and create another table that keep the track of each changes along with the change_id as forign key in this table ie id, change_id, field_name, value
.
in the 1st option table is very complex but it will give the full log quickly and in the 2nd option tables are very simple but query that will generate the log is seems very complex, we tried a query to generate the log but it take too much time and causing the connection time out almost every time we try to pull data.
Can anyone help me to find the batter way for Audit Trail.
第一种方法被广泛使用,您还必须添加更多列,例如PageName , KeyId (该表的PK)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.