I think the typical way of attacking a problem would be a second and third 
table.  The second table would look like:

flat_type table
  flag_type_id
  flag_type (like the column name in your original table)
  flag_type_description (BONUS:  you can describe each flag)

product_flag table
  product_id (fk to your original table)
  flag_type_id (fk to the flag_type table)
  flag_value (0, 1, or whatever you want to store here)

The advantages with this method are several:
1)  No wasted storage for all those NULLs where a flag is not needed
2)  Should be very fast to lookup by product_id to get all flags
3)  You can expand to an arbitrary number of flags
4)  Your schema remains normalized

Sean

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to