Managing Multiple Billing / Shipping Addresses - Order System
Posted 24 July 2006 - 02:26 PM
I'm all about normalizing databases, and I want it to be convenient for customers to store multiple addresses (shipping and billing) to make ordering easier, and to have optimal database performance. Naturally, a problem would arise for historical purposes if somebody places an order on 7/24/06, and updates their address on 7/25/06, thereby reflecting the wrong address on the 7/24/06 order. So, here's what I had in mind; let me know if this is good or if you have had any other experiences managing addresses.
I plan to have a table for addresses, with a FK to the customer ID, a PK address_id, a flag for active/inactive, the usual address info, and a "nickname" for easy reference to the address. Then, users can add as many addresses as they like. If a user were to update an address, it would mark the old address as inactive and then insert a new address with the updated information and new PK. Is this the best way?
Also, do you find it best to tie in billing information directly with a billing address in the same table, or better to have shipping and billing addresses in one table, with a billing/shipping flag, and then link billing addr and billing info? I know some sites like buy.com associate a payment method directly with a billing address, and am not sure the best way to go about it.
Thanks for the help!
Posted 24 July 2006 - 04:08 PM
Posted 24 July 2006 - 04:18 PM
mark old as inactive, create new listing
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users