[comp.databases] Foreign address formats & representations

norm@oglvee.UUCP (Norman Joseph) (06/21/89)

[The application in question is written with Progress, but the
question involves more general principles.]

I'm writing a database application that has to be able to handle
foreign (Canada and Europe mostly) addresses as well as domestic.
A straightforward and simplistic implementation for a customer
record in this database, for example, might look like this:

        table: customer
                customer-name      char(25)
                addr-line-1        char(25)
                addr-line-2        char(25)
                addr-line-3        char(25)
                phone-number       ...etc.

As you might suspect, I need something a little more elaborate for
storing and presenting the address information than a free-form
character array.  I've come up with the following:

        table: customer
                customer-name      char(25)
                addr-line-1        char(25)
                addr-line-2        char(25)
                city               char(20)
                state              char(2)
                province           char(20)
                country            char(20)
                zipcode            char(10)

but I'm not at all sure that I've accounted for most common foreign
addresses.

In addition to their representation, I need to be able to display
these addresses for reports, etc.  The problem is, if I define a
generic address "form" that includes all of the fields,  I will
end up with a lot of unappealing white spaces and gaps where
fields make no sense (domestic addresses usually don't specify
`province' or `country', for example).  More complex displays
-are- possible, but before I commit to the extra work, I want to
be certain that the table layout is reasonably solid.

So, my quandary really boils down to two questions:

    1)  What is a reasonable scheme for representing both foreign
    and domestic addresses in the same table?

    2)  What is a reasonable scheme for displaying said addresses?

I'm certain that I'm not the first person who has had to solve this
problem, and I'm hoping the net can give me some pointers at least.
E-mail would probably be more appropriate and greatly appreciated.
-- 
Norm Joseph - Oglevee Computer System, Inc.
  UUCP: ...!{pitt,cgh}!amanue!oglvee!norm
    /* you are not expected to understand this */

lecocq@hplchm.HP.COM (Christian LeCocq) (06/23/89)

Sordid detail:
	The order of the fields may be different from country to country.
In France the zip code is written before the town. Ex:
Francois Example
12 rue de Vincennes,
75012 Paris.
I have yet to see a US form or a French form which understand the other
format.
Good luck,
	Christian