These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Best way to do event tracking?
PostPosted: Wed Aug 29, 2007 10:24 pm 
Newbie

Joined: Tue Feb 06, 2007 5:46 am
Posts: 10
Now, I know this isnt strictly an NHibernate question, but it's what I'm using for implementation and this is the best forum I could think of to post to (mostly because I'd prefer an answer from someone with at least some knowledge of NHibernate).

One of the sites I am working on needs a lot of reports depending on various site events like user registration, user posted content, user deleted content, user modified content, user contacted another user, etc.

So, I simply made an Event object that has fields for EventType (see list above), Timestamp, User, and ItemID (to get back to whatever particular item the event refers to).

I'm not entirely sure this is a good solution, so I'm open for suggestions on how to enhance it and/or get rid of it and do something entierly different.

One such idea I came accross is called History Tables and basically what you do is have a corresponding history table for each table. The history table has all the same fields as the regular table except it adds on a change type field and a timestamp field. The possible change types are create, update, and delete. Then you just create triggers that do inserts into the history table whenever the regular table is modified, giving you a comple change history for every table.

Now, my problem with this solution is that it seems like overkill--I'm not really interested in collecting every chage in data, I'd rather just know that the change took place.

Any thoughts, suggestions, etc. would be appreciated.

_________________
Josh Coady
http://jlcoady.net/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.