• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

a history log for a database

hi there
what is the best way to store a history entries for multiple users in a database,
for example would it be good to store it in a single column (on the same row as the username) and use "," to separate each entry or will it be better to store entries in a separate table with there corresponding "username" so that they can be identifyed
or is there a better way to do this?
1 Solution
In common way, the log table should be

user_id(int)   action_datetime(datetime)   Action(int)   Description(varchar)

The action is an enum that was defined before, e.g. 1: insert, 2: delete ...................
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now