If all you are dealing with are squares, I would just deal with 4 numbers in your table that can be indexed representing Top, Left, Height, Width, then run your query where your point in question has its "X" coordinate between Left, Left+Width and "Y" coordinate between Top, Top+Height.