Store 2D or higher order array in MySQL
Moderator: General Moderators
Store 2D or higher order array in MySQL
Can I define a field as variable-length multidimensional array in MySQL 5.0+? It can be done in PostgreSQL, but I couldn't find how to do it in MySQL ...
If it can't be done, what would be the most appropriate way to do this? At this moment, I serialize the array and store it in a BLOB field, but it makes its data not accessible by the DB engine.
If it can't be done, what would be the most appropriate way to do this? At this moment, I serialize the array and store it in a BLOB field, but it makes its data not accessible by the DB engine.
There are 10 types of people in this world, those who understand binary and those who don't
Thanks for replying me 
Storing the array as XML data would solve my problem partially, but still a lot of queries can not be done.
Does anybody have an idea if MySQL development team is going to implement array type soon?
Storing the array as XML data would solve my problem partially, but still a lot of queries can not be done.
Does anybody have an idea if MySQL development team is going to implement array type soon?
There are 10 types of people in this world, those who understand binary and those who don't
Imagine a 6D array stored in DB as records (along their relations) ... Now, construct a simple query to get its value back to PHP array.feyd wrote:I seriously doubt it. It's not in six right now.
What's the actual benefit? I don't see one. Feels more like a smell to me.
And this looks beautiful:
http://www.postgresql.org/docs/8.0/inte ... rrays.html
There are 10 types of people in this world, those who understand binary and those who don't
Depends on the point of view. One could say that any scalar value is just a 1x1 matrix 
What is a point in zero dimension space ?
I've heard definitions like : "a point is a sphere with zero radius" ...
Offtopic:
http://www.tenthdimension.com/medialinks.php
What is a point in zero dimension space ?
Offtopic:
http://www.tenthdimension.com/medialinks.php
There are 10 types of people in this world, those who understand binary and those who don't
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
http://en.wikipedia.org/wiki/XQuery
XML database availability is the issue there. There's no MyXML or XMLite projects
If I need to store a data structure in a DB I either use a serialized object/array, or JSON. Serialization is nice and simple, but JSON is more flexible language-wise. Six of one...
XML database availability is the issue there. There's no MyXML or XMLite projects
If I need to store a data structure in a DB I either use a serialized object/array, or JSON. Serialization is nice and simple, but JSON is more flexible language-wise. Six of one...