Pardon me but I am taking the liberty of jumping in with a request for clarification via conceptual example.
I follow AstroTeg's point about performance not being an issue in the case discussed here and the importance of using standard sql structures to enable reporting (not having to interpret serialized data, etc) yet ...
Conceptually, I am having trouble with applying this approach in my case (why I have to apply stuff, I'll never understand).
I have been designing an ad banner mgt script for neighborhood websites that would display a given banner ad if 1) The community created and inserted the ad into db table OR 2) If the neighborhood's known postal code has a matching postal code in a set of postal codes that are attributes of each given banner.
#1 is easy - tracking a creator id with each banner inserted solves this one.
#2 has me baffled ... π
My point of confusion is around how to store the postal code attributes of the banner. I presumed to store them as a serialized array of postal codes in a banner table field.
I had concerns about my ability to maintain and report on serialized values and came to this forum to investigate options.
Since the possible set of postal codes is completely dynamic, I don't understand how I can represent this in a standard approach to table design ... I suppose I could have a postal code assignment table with x rows for each banner but one record for each postal code attribute seems like overkill ... I looked at mysql's SET data type and found it is limited to 64 elements and I think that may be too restrictive for this application.
After reading this thread, I feel I should be looking for a table design/coding approach that avoids serializing my postal code attributes. Can anyone fill in the blanks for me on this or tell me "tough luck, create the assignment table?" I don't expect a code review but would love to get the concept clear in my head. Thanks.