Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.3Mb
PDF (A4) - 39.3Mb
PDF (RPM) - 38.6Mb
HTML Download (TGZ) - 11.1Mb
HTML Download (Zip) - 11.1Mb
HTML Download (RPM) - 9.8Mb
Man Pages (TGZ) - 212.5Kb
Man Pages (Zip) - 321.6Kb
Info (Gzip) - 3.6Mb
Info (Zip) - 3.6Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  Data Types  /  Data Type Overview
User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
  Posted by sunny verma on December 16, 2013
By default mysql doesn't support array data type, but we can store it by serializing array.
Here is the tutorial
  Posted by Ray Paseur on August 20, 2014
Rather than a serialized PHP array, a smarter array representation might be a JSON string
  Posted by Austin Bennett on June 22, 2017
Serializing any data for storage in a database defeats the purpose and the next dev that has to deal with it will be cursing your name the entire time they have to sift through it. The purpose of the database is to make data portable. You lose sight of that purpose by serializing it. Ray Paseur is on the right track (I'm not sure that was true 3 years ago haha, I can't remember). Since JSON has been officially supported it has proven to be an efficient way of storying array data while maintaining it's integrity. When you need to call it, just about every language has a quick and simple, built-in way to parse it. For example PHP has json_decode() which will take your JSON strings and present them as a PHP Object. Most others will do something similar. Whatever you do, please don't serialize your data. Not even a sadist would get anything out of watching the misery that will inevitably result from it!
Sign Up Login You must be logged in to post a comment.