开发者

I want to store customer shipment and billing address should I do in one table on two?

When a customer orders a product he can give a different billing address and a different shipping address how should this be implemented using good schema techniques, what are the recommended best practices for this? thanks开发者_如何学Go


Have two tables:

  • an Orders table
  • an Address table

On the Orders table, you should have two foreign key references to ShipmentAddress and BillingAddress, both referencing the Address table.

I would definitely put those two addresses into the same table - each "thing" of the same type (address) belongs in the same table.


there should be different table for all the entities . 1. Customer 2.Products 3.Order

in order table u can user the address field to store the shipping address and billing address

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜