Search code examples
databasestandardsmodeling

Best practices for consistent and comprehensive address storage in a database


Are there any best practices (or even standards) to store addresses in a consistent and comprehensive way in a database ?

To be more specific, I believe at this stage that there are two cases for address storage :

  • you just need to associate an address to a person, a building or any item (the most common case). Then a flat table with text columns (address1, address2, zip, city) is probably enough. This is not the case I'm interested in.
  • you want to run statistics on your addresses : how many items in a specific street, or city or... Then you want to avoid misspellings of any sorts, and ensure consistency. My question is about best practices in this specific case : what are the best ways to model a consistent address database ?

A country specific design/solution would be an excellent start.

ANSWER : There does not seem to exist a perfect answer to this question yet, but :

  • xAL, as suggested by Hank, is the closest thing to a global standard that popped up. It seems to be quite an overkill though, and I am not sure many people would want to implement it in their database...
  • To start one's own design (for a specific country), Dave's link to the Universal Postal Union (UPU) site is a very good starting point.
  • As for France, there is a norm (non official, but de facto standard) for addresses, which bears the lovely name of AFNOR XP Z10-011 (french only), and has to be paid for. The UPU description for France is based on this norm.
  • I happened to find the equivalent norm for Sweden : SS 613401.
  • At European level, some effort has been made, resulting in the norm EN 14142-1. It is obtainable via CEN national members.

Solution

  • I'd use an Address table, as you've suggested, and I'd base it on the data tracked by xAL.