views:

43

answers:

2

Hello all,

I am trying to create a generic address class that could be used to store any address from any country.

For example here in the UK we have post code where as in USA I think they use Zip code. I have few ideas in mind but I just wanted to see what others think.

Thanks.

A: 

It depends how you want to use that class. If you want to display all addresses within a specified locality (e.g. 'North America'), you might want to think about some kind of hierarchy. If you just want to print addresses, you might have to accept the huge variability and just store address as a big string.

Bobby Jack
+1  A: 

It also depends on what level of detail you want. For instance, do you need to geocode addresses - producing an identifier that geographically locates the address? Do you need to validate that the address exists? Do you need to be able to convert the address to the standard format for the national postal authority?

If you need these features, then you need more than your own class - you need a third-party product.

I'd mention one, but although it did these things, it was unpleasant, to say the least. Google "Data Quality", "Address Standardization", "Data Profiling" and things like that.

John Saunders
I will probably also need to show the addresses on map (e.g. google map) so geocode is important. you mentioned third party ? What products are available out there ? That might help.Thanks.
Raha
John Saunders