3

I was wondering if this breaks first normal form.

AddressTable
  Id           - PK
  Street
  City
  State

BusinessTable
  Id           - PK
  BusinessName
  AddressId    - FK

PersonTable
  Id           - PK
  FirstName
  LastName
  AddressId    - FK

The reason I ask is that I've heard that because any given field on the address table may be a business address or a person address, you have two different data types in the same column. Under that argument, I'd need to have a BusinessAddress and a PersonalAddress table. At the same time, this database seems to be very well ordered, and I'm use to databases that break first normal form being far less sensible, and it doesn't appear easy for an anomaly to appear. The closest thing to an anomaly appearing would be if a Business and Person linked to the same address, which then creates a problem if one of them updates their address but the other doesn't (or they could point to two different records with the same data in each except for the id, which might also be an anomaly).

1
  • 1
    You could have a self-employed person use the same address for his personal and business post, so that is a legitimate case. A unique index on Street, City and State would prevent duplicates, but only if the characters types were exactly the same. Address normalisation is a perennial problem in Data Quality circles. Many national postal services offer an address validation package which can be plugged into applications. May 20, 2014 at 0:47

2 Answers 2

3

No, it's fine.

Consider the situation where you have owners of things. Many types of thing can have an owner and it's not worth splitting owners into types of owner.

0

Whether it is fine depends on usage. If you treat business and personal addresses differently in any way then they should be two seperate tables otherwise one is fine. Being overgeneric and reusing tables can be a problem, if in doubt two tables are easier to join than split.

Confusion could arise if you start linking people to businesses over which address to use but that will be the case in either instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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