Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a team who designs the tables and relations for software developers. In our organization, they are pretty strict about enforcing 3NF normalization - which to be honest, I agree with given the size of our organization and how the needs or our clients change over time. There is only one area I'm not clear about the reasons behind their design decision: addresses.

While this mostly focuses on addresses in the United States, I think this could apply to any country that does this. Each piece of an address gets its own column in the addresses table. For instance, take this gnarly U.S. address:

Attn: Jane Doe
485 1/2 N Smith St SW, APT 300B
Chicago, IL 11111-2222

It would get split up in the database like this:

  • Street number: 485
  • Street fraction: 1/2
  • Street pre-directional: N (North)
  • Street name: Smith
  • Street type: ST (Street)
  • Street post-directional: SW (Southwest)
  • City: Chicago
  • State: IL (Illinois)
  • Zip code: 11111
  • Zip4 Code: 2222
  • Country (assumed to be U.S.A.)
  • Attention: Jane Doe
  • P.O. Box: NULL
  • Dwelling type: APT (Apartment)
  • Dwelling number: 300B

And there would be a few other columns related to rural routes and contract routes. Furthermore, our specific application will likely have a few international addresses in it. The data modelers said they would add columns specific for international addresses, which would be the normal line 1, line 2 fields.

At first I thought this was WAY overboard. Researching online repeatedly refers to using address line 1, 2, 3 and possibly 4, then splitting out city, region and postal code. We do have one use case for our new application where this granularity is beneficial. We have to validate that the user is not creating a duplicate business, and checking the address is one of the validations. We can get it to work with address line 1 and 2, but it would be more difficult.

As for our specific application, we need to store multiple kinds of addresses for businesses and people (physical, mailing, shipping, etc). We might need to generate printable form letters, but that requirement hasn't been discussed so far.

Some other things applications in our organization need to support:

  • Auditing (with full history tables)
  • Printing mailing labels
  • Generating printed forms

While our application might not be doing everything that every other application is doing, splitting addresses into multiple components is an enterprise standard where I work. Regardless of whether our application would benefit from it, we are forced to do this.

In order for me to better understand their design decision, and to sell our client on the idea...

What problems are solved by splitting the street address into individual columns?

Bonus points for anyone who has implemented a system like this, because they ran into problems.

share|improve this question
    
Nice question! This is strongly related to Dr. E. F. Codd original (1969-1970) normal form. Perhaps some confidentiality aspects could prevent you from disclosing the specific context of interest for which you are implementing this database, but if you can tell what's the purpose of said implementation (particularly the requirements covered by the Address table, e.g., how it is going to be employed by its end users), you might attract more accurate answers. – MDCCL 8 hours ago
    
@MDCCL: I added a little more context. – Greg Burghardt 7 hours ago
    
I can see how you could get a very specifically formatted address out of it and it might be useful for bar-coding. Otherwise it seems a bit overboard to me. – Kenneth Fisher 7 hours ago
1  
Just as a snarky comment - tell your modelers they are missing about 35 possible post mail fields. If they are going to do this, the should be doing it right. :) – Karen Lopez 7 hours ago
    
And keep in mind some addresses still won't fit your template -- I've seen some real street addresses along the lines of "down the street from the cement factory" from developing countries. – duskwuff 7 hours ago

Like all design questions, there's a hugely qualified "it depends". It depends on your data story - how the data is collected, how it is used, how it gets updated, etc. All my comments should be taken as discussion points, not how-to answers.

It sounds like* you could benefit more from using an address validation service than trying to build one for yourself. While they are costly, many such services come with significant mailing discounts.

Of course, there is a compromise here, for certain data stories. You can persist the parsed out address pieces and create a computed column (set of columns, likely) for the combined address. This is an implementation answer, with all the normal caveats implied.

I have implemented the parsed out address design. We absolutely needed this for data quality AND data processing needs. But that was a business that had physical addresses, postal addresses, virtual addresses, etc.

The other issue that can come up is that different postal services require the same information to be presented in different formats/orders/etc. So having the parts modeled out supports presenting the same info in a variety of formats and layouts.

Finally, you don't need to have international business operations to have to support international data. Even US-based businesses need to support international addresses. It's a huge data mistake to assume you will never have that. Customers move, vendors change HQs, vendor contact info can be international even if they have a US HQ. Even if your current systems made that mistake, you don't want to carry this one forward.

I highly recommend the writings and blogging by Graham Rhind. He's the expert in the data field about addresses of all kinds and the trade-offs associated with them.

*all I've said here is a gross generalization. There are so many questions I'd have to help come to a design solution that it might take a few hours of chatting. Likely some pictures and some data profiling, too. And then a lot of really quirky data stories about addresses.

share|improve this answer
    
"you don't need to have international business operations to have to support international data" -- very true. And on top of that we are physically located near the border of another country. The modeling team did give a solution for international addresses, which is to provide line 1, line 2 and line 3 fields in the database. – Greg Burghardt 6 hours ago
    
Though you said this "is a gross generalization" the one-side-fits-all solution for addresses we have enterprise wide makes your answer all the more applicable. – Greg Burghardt 6 hours ago
    
"mailing discount"??? "volume discount" would seem to fit; but even with autocorrupt I'm not sure how you could get from one to the other. – Dan Neely 5 hours ago

Separating out postcode/zip code, building name, road name can make sense. But then when you start adding “town”, “area” etc it gets questionable, compared to just line1, line2 etc. The issue is that even I and my wife can’t agree on the name of the town we live in! Is the “village” name to be put in the town field, or does it go in the line below the road name, with the local city being put in the town fields? (Some people will get offended if you where they lived a village instead of a town, other people living in the same location will get offended if you call it a town instead of a village!)

Therefore trying to do anything fancy, is no better than the address verification system you use, but it gets even worse, in the UK ALL address should have a post code, but yet the post code is not allocated until sometime after a house is built…… So a system has to allow every rule about address to be broke!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.