[dev] Audit trailing in Hermes

Vinay Kumar vinay.kumar at ejyothi.com
Wed Nov 14 09:39:40 UTC 2007


Quoting Jan Schneider <jan at horde.org>:

> 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.

Thanks for the suggestions.

Actually we are looking only for EDIT action on time slices . I think  
logging all actions is good one but not essential now. Since we are  
doing only the audit trail on EDIT action, duplicating record is a  
good choice. The edit operations are rare in ideal situation and the  
table may not grow larger. We would also like to track the changes in  
all the fields of the timeslice table, so I think that this approach  
will simplify the design.

Kindly share your ideas also, so that we can evaluate the pros and  
cons of the two approaches.

Regards

Vinay Kumar
Programmer Analyst
Ejyothi Services/Ascella Technologies







More information about the dev mailing list