Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.2Mb
PDF (A4) - 38.2Mb
PDF (RPM) - 37.1Mb
HTML Download (TGZ) - 10.2Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 9.0Mb
Man Pages (TGZ) - 206.2Kb
Man Pages (Zip) - 314.7Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  Data Types  /  Data Type Overview
User Comments
  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.