Keep Track users activity

Posted by Kpoudyal2010 under ASP.NET on 12/30/2011 | Points: 10 | Views : 2945 | Status : [Member] | Replies : 5
Guys,

I am working on an Application where we store 1000 of documents, every document has Document_id in Table , and we know our users by their UserID
Now, i want to keep track Who viewed Which items and when user logged in i want to display as your recent activities as a list of documents he/she viewd that week,
Any Suggestion would be appreciated,
Thank you,





Responses

Posted by: Sksamantaray on: 12/30/2011 [Member] Silver | Points: 25

Up
0
Down
you can create a UserActivity Log table where you should have userid,documentid,dateViewed etc.
When user view a document its corresponding procedure is called.
In that procedure you insert a record to UserActivity table.
From this table taking userid , documentid and date you can view the activity taken by user for one or more document for a specific period and how many times a particular document is view etc.

Thanks,
Sanjay

Kpoudyal2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kpoudyal2010 on: 12/30/2011 [Member] Starter | Points: 25

Up
0
Down
Thank you for your suggesstion, If i keep tract all the User Activity everday, i have 1000 users and they view many documents and what will happened the performance of DB in the future if i insert every new row in the table ?

Kpoudyal2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 12/31/2011 [Member] Silver | Points: 25

Up
0
Down
you are keeping only userid,docid and date not huge data so i don't think it will create performance issue.
If you think so then you can maintain a history database and transfer current data say every year or 6month gap.
when you require old data late say date is less than year or 6 month then you can refer to history database to fetch data and view it accordingly

Thanks,
Sanjay

Kpoudyal2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 12/31/2011 [Member] Starter | Points: 25

Up
0
Down
Great Suggestion Mr.Sksamantaray.

Hope this is the way google handling the data by separating old (with histroy db) & new db


Kpoudyal2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kpoudyal2010 on: 12/31/2011 [Member] Starter | Points: 25

Up
0
Down
Do you guys have any sort of code sample or reference site ?

Kpoudyal2010, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response