I have a really long list of itinerary items with integer values. I was thinking about creating a database with each of these items with like fifty columns but that seemed a bit long-winded, and the itinerary may change. Is there a better way to store these name => value pairs in a database? serializing seems a bit crude, I was thinking about just creating an itinerary_items db with name, value columns and sticking the data in there. What is the best solution?
Share
Why not save them like like properties in a table. that is
If one wants multiple instances of the array, one could always add an extra key for keeping track of the instances:
Problem with the approach of using this kinds of solutions is that the data tend to be more less human-readable and there be alot of extra joins if you have several properties on an object.