How to implement MySQL SET concept with over 64 members? -
what best way replicate behaviour of mysql set col type, on 64 members?
i need naturally mysql set around 85 different options. (the limit 64.) best way implement this?
i've looked @ this question, suggests join, members 6-char strings, efficient way really create entire new, 1-column table of these members (i'll call table 2), , third table of 2 cols linking id table 1 (where have created set column) , table 2?
normalise second table uses enum:
from single-table design this:
id, ...,set_col
to these:
- table1:
id, ... - table2:
table1_id,enum_col
you can have zero-or-more relationship table1 pk (id) values in "set", not set normalised enum value. space benefits of set or enum, multiplicity of set, overcome 64 member limit of set.
Comments
Post a Comment