MySQL Forums
Forum List  »  GIS

Re: Multi-dimensional data in SPACIAL types
Posted by: Jonathon Coombes
Date: June 11, 2012 08:28PM

The first thing that comes to mind would be with two columns - position (Point) and value (CHAR(1)):

Point(0,0) = 'r'
Point(0,1) = 'b' etc.

The query would have to check both however, so something like:

SELECT * FROM mytable WHERE pos = Point(0,0) and value = 'r';

UPDATE mytable SET value='b' WHERE pos=Point(0,1); etc

Probably not the best option for a chess game, but could be a good mental exercise.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Multi-dimensional data in SPACIAL types
2538
June 11, 2012 08:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.