views:

17

answers:

0

Looking into requirements for the User Session table for a social site.

Currently I am designing it to store:
• UserID - links to user's who owns the session
• Session ID - unique to the user
• Session start – Time, Day, Date, Time zone
• Session end – Time, Day, Date, Time zone
• Session length
• MAC address
• Computer name
• IP address
• Browser
• Platform (Web, Mobile, Mobile web)
• Screen resolution
• Session flag – this is used in security component by user to flag a session (report to admin) about unauthorized use of their account.
• Login email used – this is recording the email the user used to login. (Since there are work/school networks which may have their own email, the user can have multiple emails as secondary emails all of which can be used to login)
• Activity logID – this links to the activities table that has all the activities which occurred in the given session.

Is this good or what else is needed or should be separated into its own table? The assumption is each login is 1 session. So any thing the user does between login & logout should be only 1 session, and all the activities that occur will share the same session history but have their own individual action history.

There will be mult-language also, which I an yet to add in.

Also, High traffic is a possibility and what I read is storing too much in session adds server load. Not sure if it's separate from the table?