Scott_Hall
Registered User.
- Local time
- Yesterday, 16:05
- Joined
- Mar 27, 2017
- Messages
- 50
I'm wrestling with how best to implement change tracking in a smooth way and thought I would see how other people have approached it.
I am tracking budget data and the change actions that occur over time, with approval state and the needed to see prior configurations, not just creating a static log of all data changes like an audit trail. I'd like to know what people see as best practice.
The database currently has 3 tables-
-tblBudgets - [BID] is PK, other metadata
-tblBudgetLines - [BLID] is PK, [BIDfk] is FK,[Event],[StartDate],[EndDate],[Cost], one to many with tblBudgets
-tblChangeControls - [CCID] is PK, other metadata
I need to be able to:
My issue is that I'm not sure the optimal way to manage this data.
Anyway, I'm curious as to what has worked best for folks in various scenarios.
Thank you,
Scott
I am tracking budget data and the change actions that occur over time, with approval state and the needed to see prior configurations, not just creating a static log of all data changes like an audit trail. I'd like to know what people see as best practice.
The database currently has 3 tables-
-tblBudgets - [BID] is PK, other metadata
-tblBudgetLines - [BLID] is PK, [BIDfk] is FK,[Event],[StartDate],[EndDate],[Cost], one to many with tblBudgets
-tblChangeControls - [CCID] is PK, other metadata
I need to be able to:
- Record the changes to a budget over time, but changes may or may not get approved (someone could ask for time or money and be rejected, keeping the original value).
- Pull up a budget and see the current approved dates/dollars
- Look back at each stage between approved changes, tracking cost growth and date shifts, etc. i.e. it was initially $1000, then changed to $1500, then $2000.
My issue is that I'm not sure the optimal way to manage this data.
- I could make a standard audit trail table. Each time a line is updated in tblBudgetLines I write the original value into the audit log. Maybe the CCID is tied in this log so that we know a specific line changed by request X. What does this mean when it is not an updated line, but a new or deleted line? There is either a new entire line in the budget (but not the audit trail- how can I tell it is new), or the line is gone from the BudgetLines (how do I know it was removed).
- I could keep all of the line variations in the main tblBudgetLines table but add a column to represent state...maybe need the CCID for each line as well.
- Maybe junction table that has line (BLID) and "Added","Modded","Removed"
Anyway, I'm curious as to what has worked best for folks in various scenarios.
Thank you,
Scott