ID #1165

Does SQLyog support spatial datatypes?

 

Well .. both yes and no!

'spatial' (or 'geometrical'/'geodetical'/'geographical') datatypes are special datatypes used in conjunction with specific types of programs like GIS ('Geograhical Information Systems') and CAD ('Computer Aided Design') etc. programs. These datatypes describe in a single row/column combination properties of a geometrical object (a point, a line, a polygon etc.). MySQL support such datatypes for use with the above-mentioned program types. But the implementation of those datatypes differ from all other datatypes in the respects that:

* special SQL syntax is required to handle them client side. There is a binary and a text-type syntax availble. The binary syntax will normally be used internally by GIS, CAD etc. programs  for use with the drawing/graphics routines of such programs. The text-type syntax is mainly intended for human access to such data. However both client implementations differ from how such data are handled internally by the server, what also means that plain SELECTs, INSERTs will fail (it may insert garbage or return a (client-side or server-side) error).

* there is no direct mapping possible for the implementation of such datatypes in MySQL to variable types in common programming languages.


In SQLyog we do not currently support those datatypes from the CREATE/ALTER TABLE dialogues. We also do not support the special SQL syntax required for manipulating those datatypes using INSERTs/UPDATEs from the DATA and RESULT tabs (and they even do not diplay here in a human readable form).

 

But this does not mean that you are not able to use SQLyog with tables containing such data. What is possible is

* You can do *anything* supported by the server from the SQLyog editor: Valid statements containing CREATE/ALTER TABLE and INSERT/UPDATE statements will execute successfully also with 'spatial' data.

* You can edit all non-spatial columns in the table from both the SQLyog DATA and RESULT tabs also if one or more 'spatial' colums are displayed in the actual view as long as you do nothing with such datatypes themselves. If you do an error dialogue will display informing you that this cannot be done 'GUI-wise'.

(Also note that before version 8.13 it was only possible to edit tables with spatial data from RESULT tab - not DATA tab) and only if no spatial columns were displayed)

 

Tags: -

Related entries:

You can comment this FAQ