Is array serialization always bad idea? I'm making form-generating app in php. I have Widget table with type_id (html input) field, and I would like to add options field, like width/height, step, range, etc. Different widgets do have different options though.

I can think of two options:


Use separate meta table for every input type (20+)
Use serialized array as a meta


Option 1 seem more "legal", but option 2 would be easier to implement and maintain(?).

Would performance be considerably better with option 1?

EDIT: This widget table will be accessed only through widget_id and used to render html. Changes are possible, but they shouldn't happen that often.
If you actually plan to query these attributes separately (such as "Find all form elements with height = 20 and colour = #FF3377") then it is probably better to store them in some kind of queryable attributes table. If you are only plan to use a set of attributes as a whole, and never query inside it, never update/insert/delete individual attributes for specific form elements, then serializing the array and storing it as a BLOB (or something) might not be so bad, as it would keep your design simpler.