[dev] Audit trailing in Hermes

Jan Schneider jan at horde.org
Tue Nov 13 23:57:48 UTC 2007


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> Quoting Vinay Kumar <vinay.kumar at ejyothi.com>:
>
>> Basically there are two approaches to keep the changes. One solution
>> is to create a new table to keep all the changes. The second method is
>> to use the existing table with some additional fields.
>>
>> I would prefer the second approach, because the edit/delete operations
>>   on a timeslice row is probably minimal. The basic ideas is to add a
>> new timeslice entry, whenever a timeslice is edited. Store the ID of
>> the original timeslice  as timeslice_parentid in the new entry. Also
>> mark the new timeslice as NOT EDITED  using another field.
>
> That means you have to duplicate ALL of your data on edits, deletes,
> submissions, approvals... any possible action. Seems like a waste - as
> well as making the data model not very clear to someone looking at it
> - as opposed to a nice, lean audit table (that in addition could be a
> bit less lean but much more useful by storing information about what
> actually happened).

I have to agree. This also gives some performance bonus because the  
main table doesn't grow larger aka gets slower, and the log table  
could be without an index and thus fast to append.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list