I have a fairly common scenario where a user can select from a set of attributes. The attributes in the UI are represented by checkboxes.
For example:
Components: Harddrive(y/n), CPU(y/n), Monitor(y/n), Keyboard(y/n), etc....
In the past I have generally modeled this scenario like this:
"PCs" 1:M "PC Components" M:1 "Components"
Another option is to make the "attributes" as y/n fields in the "PCs" table.
e.g.
PCs (table)
-----------
PCId(PK)
Harddrive(y/n)
CPU(y/n)
etc...
In the past my rationale for going with one vs the other is based on whether the user can enter new attributes. If the answer is yes, then I go with the first option, if the answer is no, then I usually go with y/n attributes.
However now I have a scenario where there are about 20 attributes divided into multiple categories. After creating the ERD, it just looks "wrong" and the table has an absurd number of columns.
My question is, is there a standard/correct way to model this? If so, does it have a name?