There are a few issues I would like to bring up in considering how to implement an address schema.
My main reason for concern/alarm is finding yet another place in the system where addresses will be stored (e-commerce, users table, address-book come to mind). I also saw a thread recently from someone saying they are going to implement a contact system and ignore any other tables in the schema (sigh).
I'll focus on the US and assume that at least some of the issues will track internationally.
First:
An address is a fairly permanent feature. Who or what actually resides there can change. People and businesses move. Even from an HR perspective, if I want to give my history of where I have lived, I think its best to map person -> from_date/to_date -> address. I can even send my addresses to a National Change of Address provider who will let me know if the person has moved http://www.usps.com/ncsc/addressservices/moveupdate/changeaddress.htm
Second:
If you are actually going to send things to those addresses, there are ways of saving lots of money if you store the address accurately (that is, in compliance with the local authority). The USPS has a very definite concept that there is only ONE correct delivery address for a given location. http://www.usps.com/ncsc/addressservices/addressqualityservices/addresscorrection.htm
Third:
An address exists at a point in space. I can get latitude/longitude ICBM coordinates for any location, why not store it with the addresses? Postgres even has a point datatype.
Fourth:
Marketers like to record additional data about an address - DMA, MSA, Arbitron Market (I worked for a radio conglomerate once upon a time), etc to help support demographics. If I buy lists for marketing, I'll get all that info - why not store it in the 'right' place - those are all based on the location.
Fifth:
For purposes of e-commerce, a map from e-commerce user to an address should include a field for 'delivery instructions' such as 'leave in garage'. This works nicely for anything that isn't brought to the door by FedEx/UPS/USPS (such as a florist). This doesn't have anything to do with your tables, but I thought I would mention it.
Sixth:
The main user registration should use your postal-address module and re-instate the Demographics search at /acs-admin/users/ - I've had clients ask to /spam everyone in California for example. When people do advertising, it would be valuable to see who registered in a certain DMA during the period surrounding the radio spot.
I'll quit at six - that's my lucky number. (But I'll start a followup post on telephone numbers ;)
Request notifications