1

The topic came up in this other question. We were discussing sign value on a primary key having any significance.

If there are good times to use geometry in building queries the sign value could be somewhat useful. Are there any such times?


For instance I could query rows based on a Doppler pattern, increasingly skipping rows as I get further away from the starting point.

5
  • 1
    What does "use geometry in searching or selecting" mean? Can you add an example? May 24, 2011 at 14:48
  • Doppler is all I thought of off-hand. May 24, 2011 at 14:55
  • 1
    how about geometric data, like latitude and longitude :) May 24, 2011 at 15:04
  • Makes sense, it is a grid-like system so there could be some use in there. ;P I wonder if anyone has used anything like that before May 24, 2011 at 15:46
  • 1
    OSM have (though not for the PK) May 24, 2011 at 17:27

1 Answer 1

2

In response to the latitude/longitude data, relational database systems like SQL Server have spatial data types (http://msdn.microsoft.com/en-us/library/bb933876.aspx) which allows you to handle that kind of stuff. You don't really need to skip rows or anything crazy like that to satisfy a need to make stuff "look" right, if that makes any sense. What is it that you're trying to do? Say if rowA is 200 rows away from rowB, then do X?

2
  • Well if you have a table with lots and lots of very precise data about a game map and some effect goes off but you only want to query information that actually 'touches' the effect. Then I wonder if it is ever good or common practice to select row based on deltaX, for instance. Jun 1, 2011 at 19:57
  • Unfortunately that sounds more like a physics/game engine issue/solution, of which I'm not familiar with at all. Sorry :-/
    – SQLChicken
    Jun 28, 2011 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.