Solved Determine time of activity.

My schools apps included code which allowed program developers and admins to check which items each person used during each login session together with the time that item/control was last touched. This was mainly used for several purposes
1. Prioritise future development priorities
2. Manage an audit of error logging...again related to development priorities
3. Manage forced logouts after a specified period of inactivity
However it had one further use - to determine an approximate logout time for sessions terminated abnormally. This was taken to be the latest activity time in that session. The missing logout times were plugged as one small part of the automated maintenance update that ran each night at around 03:00
 
Last edited:
The discussion about normalization is at least partly obscured by the question of "What are you storing?"

If you are storing events which can be either login or logout or other kinds of events, that table structure in post #1 works.

If you segregate login and logout from other events and put them in a separate Session table, you are storing sessions, not events, so the session isn't finished until you toss in the end date/time. Normalization DOES depend on what you are normalizing. In this case, the attributes of the session would include end date/time because that IS an attribute of a session.
 
I read this article years ago, found it too geeky for me to understand and moved on...

DBG's solution gave me real world application of it and the light bulb came on. Took awhile but what else have I got to do??

Great stuff, appreciate it!
 

Users who are viewing this thread

Back
Top Bottom