> From: Joe Eugene [mailto:[EMAIL PROTECTED] > We have a need to track Form Updates by users i.e. history of > updates to Forms. > Once the user submits a from after validation, we want to > track the updates done. > e.g. > User A can change their Credit card info several times on a > Form, we need to Track those changes and any other agreements > they might have agreed to on the Form. > > Options. > 1. Save the entire contents of the Form as *.htm/*.pdf files > or populate them in the DB. > 2. Implement a complex DB Relational Structure to store the > content and data. > > Any other Ideas? Anybody else implemented something like this before?
Joe, I would recommend setting up a DB structure to take care of the historical change data. I would first identify how many fields you need to track. If it is just a couple then create a couple tables and use triggers (depending upon DB platform and application load) to capture when columns are updated or inserted. For example: I want to keep track of what credit cards users use with their accounts. Assuming I did not structure the DB to accommodate multiple accounts (CC) I would implement something like this: USER --USER_ID (PK) --USERNAME --CC_NUMBER HIST_CC_NUMBER --CHANGE_ID (PK) --USER_ID (FK) --FROM_CC_NUMBER --TO_CC_NUMBER --DATE_CHANGED Add a trigger to the CC_NUMBER column in the USER table for 'insert' and 'update' and store the appropriate values. If your needs go beyond a couple columns, you might consider a complete set of historical tables that mimic your transactional tables. If you go this route, I would evaluate application load to determine whether or not triggers are you best bet or if programming the routines in code would yield better results... I have done it both ways. HTH, Mike ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188851 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54