Raptor wrote:
Hi,
I'm quite new to MySQL and quite impressed by its feature set. I've
also been looking at Interbase and it has a feature that allows a
multidimensional array to be stored in a single field.
InterBase (and the open-source version, Firebird
http://firebird.sourceforge.net/) provides an N-dimensional array type
as a proprietary extension to SQL. This feature is not generally
available in other RDBMS's. It's also not generally supported by
middleware products (ODBC, JDBC, DBI, etc.) because it doesn't map to a
standard SQL datatype.
Does MySQL also have this feature?
No, MySQL does not provide an array datatype.
I need a three
dimensional point to be stored. Each point represents a radar point. If
anybody can suggest a different approach, I'm all ears.
You could store array data as a binary BLOB datatype, and write code in
your application to encode/decode an array to/from a BLOB.
Anothe solution would be to represent an array in a dependent table,
where each row is one radar point, and there are five columns: three
for the coordinates, one to reference the primary key of the master
table, and one more for some kind of ordering (what you would use the
array index for). You'd have to do a join between your master table and
your "radar points" table.
Regards,
Bill K.