I have a sample table below:
+-------------------------------------------------------------------+
| id | name | flag1 | flag2 | flag3 | flag4 | flag5 | flag6 | flag7 |
+-------------------------------------------------------------------+
| 1 | fred | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
+-------------------------------------------------------------------+
What I would like to know, is this the most efficient and easiest way to retrieve these data?
I'm currently working on Enum which has some Flag Attribute Logic.
In that case, if:
flag1 = 1
flag2 = 2
flag3 = 4
and so on..
I'll just create a table with this design, then add another table for look up of those values:
+------------------+
| id | name | flag |
+------------------+
| 1 | fred | 125 |
+------------------+
Any suggestions?