As part of a group project at University we've hit a bit of a deadlock with a design decision (read: argument). We have multiple fields, on multiple tables, that are to be used as selections (ie, they'll become some kind of drop-down box, with a limited set of options). At the same time we need to make it possible for the admin users to modify the options that are available for each field from within the system.
Now, if it was a single field in a single table, I would just create a new table containing all the possible lookup values and replace the field in the original table with a lookup value that references the lookup table. And we plan on doing something like this, but, since we've got several fields across several tables the path is less clear.
Currently, we have two competing design suggestions, which I've outlined below. I've intentionally omitted the arguments behind the two options because I'd like to see what you guys have to say without adding bias.
I'd like to know, at least:
- In which circumstances is each of these options the best?
- Are there any no-so-obvious gotchas with either option that we should be aware of?
- Are these any other options that we have missed?
Seperate:
Give each field in each table a seperate lookup table to reference. Queries simply join each table to its field as required.
Combined:
Combine all the lookup tables in to a single Lookup table. Have a Fields table, which describes to the application which fields are modifiable, and then add an intermediate table to create a many-many between Fields and Lookup to describe which lookup values are available to which fields.