Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
What does "use geometry in searching or selecting" mean? Can you add an example? – Jack Douglas May 24 '11 at 14:48
Doppler is all I thought of off-hand. – Garet Claborn May 24 '11 at 14:55
how about geometric data, like latitude and longitude :) – Jack Douglas May 24 '11 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 – Garet Claborn May 24 '11 at 15:46
OSM have (though not for the PK) – Jack Douglas May 24 '11 at 17:27

In response to the latitude/longitude data, relational database systems like SQL Server have spatial data types ( 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?

share|improve this answer
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. – Garet Claborn Jun 1 '11 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 '11 at 12:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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