1

What is industrial best practice for bill to and ship to address tables? Do people combine them into 1 table or seperate them into 2 different tables? This is for general invoice. Thank you in advance!

gavin
  • 1,276
  • 1
  • 11
  • 17

2 Answers2

5

I would have a CustomerAddress table allowing multiple entries per Customer. An IsShippingAddress flag would indicate which one is the shipping address. An IsBillingAddress column. would be used similarly.

This way the same address could be used for both shipping and billing if desired.

D'Arcy Rittich
  • 167,292
  • 40
  • 290
  • 283
  • Or multiple shipping addresses could be allowed for each customer. e.g. work and home. –  Jan 26 '12 at 19:02
  • Programming logic wise, does that add alot of overhead? – gavin Jan 26 '12 at 19:11
  • @gavin No, I would say it is less work than using separate tables for each. – D'Arcy Rittich Jan 26 '12 at 19:35
  • 1
    I think adding 2 boolean flags would generally be less overhead than having 2 separate tables potentially with the many of the same data in each. Using one table and flags, you could set one address to be one or both of a shipping and a billing address for a customer. – j_syk Jan 26 '12 at 19:38
1

I've seen many systems with separate tables for permission and security reasons and sometimes there are many shipping addresses so a table for that is made. And also the confirmation phone, etc. You get the idea?

AlfredoVR
  • 4,069
  • 3
  • 25
  • 33