What would be the best schema to store the 'address' for different entities?

Posted by Cesar on Stack Overflow See other posts from Stack Overflow or by Cesar
Published on 2009-07-27T02:02:03Z Indexed on 2010/05/21 16:40 UTC
Read the original article Hit count: 208

Suppose we're making a system where we have to store the addrees for buildings, persons, cars, etc.

The address 'format' should be something like:

State  (From a State list)
County (From a County List)
Street (free text, like '5th Avenue')
Number (free text, like 'Chrysler Building, Floor 10, Office No. 10')

(Yes I don't live in U.S.A)

What would be the best way to store that info:

  • Should I have a Person_Address, Car_Address, ...
  • Or the address info should be in columns on each entity,
  • Could we have just one address table and try to link each row to a different entity?

Or are there another 'better' way to handle this type of scenario?
How would yo do it?

© Stack Overflow or respective owner

Related posts about sql

Related posts about schema