I am struggling with the database design for storing customer address's and relating them to orders in an inventory system. Currently I have the following schema ideas and 3 options:
Customers
CustomerID
CustomerName .....
CustomerAddress
AddressID
CustomerID
AddressType (Billing, Shipping etc)
AddressLine1
AddressLine2
City
State
Country
PostCode
Orders (Option 1)
OrderID
CustomerID
BillingAddressID
ShippingAddressID
Orders (Option 2)
OrderID
CustomerID
BillingAddressLine1
BillingAddressLine2
BillingCity
BillingState
BillingCountry
BillingPostCode
ShippingAddressLine1
ShippingAddressLine2
ShippingCity
ShippingState
ShippingCountry
ShippingPostCode
Orders (Option 3)
OrderID
CustomerID
BillingAddressBlob
ShippingAddressBlob
I need the address for an order to remain static overtime. So if I look back at an order two years ago I can see the correct address items were shipped too and billed too.