CHeighlund
Programmer
I'm working with a form that has a large number of boolean values that need to be stored to the database. These values tend to come in sets - a single form entry might contain checkboxes for two to ten different options, all of which need to be recorded whether the form value is yes or no.
Would it be more efficient (db processing time and/or storage space) to make each individual boolean value a db field, or would it be more appropriate to make a single char(X) field for the set (where X is the number of boolean items in the set) that gets marked as some binary pattern (ex: 5 items, first and third ticked, yields pattern 10100 in a char(5) field)?
Would it be more efficient (db processing time and/or storage space) to make each individual boolean value a db field, or would it be more appropriate to make a single char(X) field for the set (where X is the number of boolean items in the set) that gets marked as some binary pattern (ex: 5 items, first and third ticked, yields pattern 10100 in a char(5) field)?