I’m making a database and have a table structured as follows
Att1 Att2 Att3 ....
User1
User2
User3
....
where I would like each of the attributes (Att1, Att2, Att3,…) to have a boolean variable attached to it. Something like the following:
Att1 No
Att2 No
Att3 Yes
... ...
Each attribute is a numerical score from the user (listing preference), but I want to tag each attribute with whether it’s actually important or not. Is there a standard approach for handling this type of dependency? Thanks!
Oh, it would be nice if we could have records embedded in tables. However, standard SQL and most databases do not support this (although there are exceptions).
I would use a consistent naming convention, inventing fields like “IsImportantAtt1” and “IsImportantAtt2”. When I do this, I also have the convention that all the “Is” variables take on only the values of “Y” or “N”. If I want to see “Yes” and “No” in the output, then I use views for that conversion or do it in the application layer.