Thread: Team Automation
View Single Post
  #4   Spotlight this post!  
Unread 28-07-2003, 10:23
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Sure, sorry, I misunderstood.

Say you have a table holding participant information called PERSON. That table should have an AutoNumber field named PERSON_ID that is the primary key. Its a number that automatically increments each time you add a record.

Each time you have a meeting or an event you probably want to keep track of who was there. Create another table named EVENT with an AutoNumber primary key named EVENT_ID. EVENT may have some fields like:

event_begin, datetime
event_end, datetime
event_type (meeting, regional, fundraiser, etc..)
description

In order to keep track of who attended each event, you would create a table to link the PERSON table to the EVENT table. This is called an Associative Relationship. Call it PERSON_EVENT, and it will contain the two keys from the parent tables, PERSON_ID and EVENT_ID. You can also add other metadata like:

person_id, long int.
event_id, long int.
time_in, datetime
time_out, datetime
role_type (pit crew, scouting, electrical, mechanical, etc.)

The person_id and event_id are called Foreign Keys, since their value is the key from another table. When you log a person into an event you add a record to PERSON_EVENT with the person's PERSON_ID value and the event's EVENT_ID.

To get the list of people who attended an event you just join PERSON and EVENT with PERSON_EVENT by linking on person_id and event_id.
Reply With Quote