×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Best table structure for a log table

Best table structure for a log table

Best table structure for a log table

(OP)
Hello,

I am setting up a log table.

In short it will record events that happen in several tables.

A clients table, property table and an applicants table.

The events are not related to each other as such.

For example. Client10 with a log note may be in the first record
Property52 may be in the next
Etc....


I will have to store the ID in each record along with the log note.


My options seem to be to have seperate fields for each table ID

Ie. Fields like. LogClientId, LogPropertyId, LogAppId.

... And store the associated unique Id seperately in each field.

OR

I could have one ID field and one Item field. Ie.

LogId. = 50
LogItem = Property.

I would be interested to gather some opionion.

Thank you Mark.

RE: Best table structure for a log table

You should use the latter because it is a normalized structure.
This assumes all your ID's are the same dataype. Either all numeric or all text. If you have both than you would have to make the logID text and save the numeric IDs as text. This may be fine or not depending on what else you plan to do. If you save numeric ID as text in your log table than you may have difficulty joining the table in a query back to the other table from where it came. You will get a datatype mismatch. In other words "50" will not join on 50.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close