A while back, I wrote a simple orders application that allowedusers to query and update order information. The application workedfine, but lacked a user activity log. It was difficult for meto determine what a user had done with a particular order.
By creating a table (I’ll call it UserLog) with fields such asDATE, TIME, USERID, ACTION _TYPE (A for accepted entry or Q forqueried database), SQLSTRING (for the actual SQL command issuedagainst the database), and other data element fields, I was ableto capture user activity at key points in the application. TheAddItem method allowed me to quickly add records to the UserLogtable when the user queried the database or when the user accepteddata.
Not only is the user log concept useful for tracking user activity,it’s also useful for analyzing trends in data such as who is updatingthe data, how often, and what type of queries are being performedon the database.