I’m creating a database to track our participants in Access 2010.
Main data is stored in a table called ParticipantMaster.
I have a few fields in ParticipantMaster that I want to assign lookup values to.
School (MLK High, Central High, Northeast High…)
Interests (Visual Arts, Drama, Sports, Literature….)
Color (Red, Blue, Green…)
I could create a table School, another table Interests, another table Color, and then have the source for each one to be SELECT Color.ColorName FROM Color and then SELECT School.SchoolName FROM School and then SELECT Interests.InterestPicker from Interest…. this is how I usually do things.
But then I wondered if instead of three separate tables, I could have one table called ParticipantData with fields called School, Interests, Color… and then have my lookup queries be SELECT ParticipantData.School from ParticipantData, and SELECT ParticipantData.Interests FROM ParticipantData, and SELECT ParticipantData.Color FROM ParticipantData
Are there advantages/disadvantages to one way or the other?
The lookup table you described was a bit unique. Most people wouldn’t suggest you do this.
The one below makes a bit more sense
the major downsides to having a single table like this are
Its really hard to make the Foreign Key constraints perfect. e.g. You want to limit ParicipantMaster.Color to just IDs that correspond to the LookupType color but the best you can do is limits it to IDs that are in the Participant Data table.
It becomes painful if you want to add attributes to just one LookupType. For example you want to add SchoolDistrict to the LookupType of school you have a bunch of undesirable choices. (A. Allow schoolDistrict to be an attibute of color. B. Rip out the School from the lookup table and fix all your code, C. Add a table that links to participant table)