ID fields are a powerful way to organize your data models, and SQL provides all the tools you need to take advantage of them.
By Joe Pluta
In my previous article, I talked about using two files to monitor the SQL activity on my system. One had the actual unique SQL data statements while the other held more-granular data for each statement: information about the jobs that used the statement, the user ID, the IP address, and so on. If I had that all in one table, then I'd be repeating some really large SQL statements over and over again. The idea instead was to create a unique ID field for each new SQL statement and track all the data using that ID as a key.