I have a table that will have several fields, such as counties, age_groups, gender, sports, etc..
on countries I will be storing data with this format["US","CA","DK","FI","RU","SE"]
on age groups I will be storing data with this format["2000","1999","1998"]
on age groups I will be storing data with this format["M","F"]
on age groups I will be storing data with this format["soccer","hockey", "tennis"]

Is it a bad idea/practice so store serialized/json_encoded data on mysql?

4 Years
Discussion Span
Last Post by extjac

Typically speaking, it is very bad practice to store serialized (or JSON) data in a database. This is big, red flag that you are not normalizing your database. Thus you're going to have dependencies all over the place, and it will make maintaining your data an absolute nightmare.

Could you paint a more complete picture on what all of this data is and how it's being used? I'd be happy to help you design better schema, but I need the bigger picture


Hi Bob,
I actually have several tables with relatioships. The thing is that i wanted to know if it was a bad idea/practice to store the data as json/serialized. (It seems so simple to code it)
thanks for your answer.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.