Re: Regional Concept
"Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> wrote in message
news:4538e773$0$631$bed64819@news.gradwell.net...
Oliver Wong wrote:
The hard part isn't constructing the SQL query. The hard part is
getting the database. Where are you going to get a database containing
the names and addresses of everybody?
Well, given a name and address like
A Person
28, Garden Villas
Entbury-on-the-Wash
it isn't too difficult to come up with addresses of neighbours: 26 Garden
Villas and 30 Garden Villas -- not to mention the people across the road.
Of
course, that isn't totally reliable (I know streets where the opposite
side of
the road has a different name, let alone just following a different
numbering
convention), but it'll usually work.
There are also corner cases... literally:
|
A | | B
| Foo St. |
C | | 28 Bar St. D
-----| |----------------
Bar St.
-----| |-------
| |
E | | F
What are the address of A, B, C, D, E and F?
Another problem is that it won't give the
the name of the person living at that number. There are database you can
buy
which will provide that information (depending on where you -- or your
victims -- are), but I can't think of a single valid use for the names of
the
neighbours so I wouldn't mention them here even if I did happen to know
where
they could be bought.
Right, for the DB, it was primarily the name-address association I was
concerned about. I realize though that I had mis-read the original problem
statement. I had assumed that the input was a name, not an address.
- Oliver