Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Great response. In addition, if you want to 'store arrays' in the database, you may like to look at ORMs which can make database access behave in a more object oriented way. Doctrine is one such ORM for PHP. Learning Doctrine is not trivial, however. Commented Nov 24, 2009 at 17:07
  • The problem is joins can be very expensive and seems very common for web applications to avoid multi-table joins. This is particularly true if you are going to cache the object and or use a search engine like Solr (eliminates search problem). Commented May 3, 2011 at 17:50
  • @Adam Gent: Agreed. There is no universal solution, but in general the database should be as normalized as possible. However, there are, as you mention, of course scenarios where one would put serialized, JSONified, ..., arrays into a database. Commented May 4, 2011 at 19:19