Re: What is a surrogate identifier

From: Bernard Peek <bap_at_alpha.shrdlu.com>
Date: 16 Mar 2007 18:50:23 GMT
Message-ID: <slrnevlpd8.s74.bap_at_alpha.shrdlu.com>


On 2007-03-16, Marshall <marshall.spight_at_gmail.com> wrote:
>
>> You have invited us to
>> discern spurious internal structure in what should be an atom.
>
> The structure is very real. Cities and States are unquestionably
> real-world constructs, as are streets. I have modeled those
> things in a very uncontroversial way; Aunt Mildred will have
> no trouble explaining to you what those fields each mean.
>
> And what's your alternative? A string? That means pretty
> much every time you actually use an address you're going
> to have to try some error-prone technique to parse it.

I've come across situations where people have broken addresses down into substructures but in all of the examples I have seen the effort has involved a lot of work for no return.

The only situation I can think of would be an application that managed a very large mailing list, sufficiently large to get discounts on sorted mail from multiple postal authorities. In the US there is an argument for separating out the zip code because sorting by zip code can make mailings cheaper. Ditto for the UK's postcode.

Apart from that I think there are three components of an address. There is the country, which needs to appear in the place where the sender's postal authority expects it. That might be at the end of the address or the beginning.

There is the sorting code, which is what you use to extract discounts from the postal authorities. This may appear in different places for different countries. It only becomes important when you have enough mail to get bulk discounts.

There is the address proper, which is a nulti-line string. There are various national conventions for the internal structure but unless you are aiming for bulk mail discounts in a particular country the internal structure of its mail addresses is usually of little interest.

I have seen some very complex systems for parsing the internal structure of an address to store in a database, and then re-assembling it in the correct order when printing a mailing label. I have yet to see one that could justify the work involved in doing that.

>
>
> Marshall
>

-- 
bap_at_shrdlu.com
In search of cognoscenti
Received on Fri Mar 16 2007 - 19:50:23 CET

Original text of this message