|
Best way to start a comparison list.
I have 36 parameters that must be assigned to a user and a document. The 36 parameters are unique and they will be either on or off. There will be no nulls in the list. Each user and each document will be assigned 1 or more of these parameters. When the user assignments match the document assignments the document will be displayed.
I can do this with 36 separate tables, one for each parameter and tie the user ID or the page ID to the table. For example:
primaryID, user ID, documentID, parameterOn/Off
This will leave a null in one column because a single record will either be assigned to a user or a document.
I could set up 72 tables like this:
for the document
primaryID, documentID, parameterOn/Off
for the user
primaryID, userID, parameterOn/Off
or I could set up a single table with as follows:
primaryID, userID, documentID, parameter1On/Off, parameter 2 .... and so on for all 36 parameters.
What do you think would be the best approach to simplify the task of matching document 1 with parameter 1, 5, and 9 to user 1 with parameter 1, user 2 with parameter 9, or user 3 with parameter 1 and 5 set to on?
|