On Dec 9, 2010, at 11:04 AM, Paul Vernon wrote: > By doing this, I only have one record that is stored permanently per order > which is an "order record" which contains a full copy of the original basket > and the transaction information as sent back from the payment gateway. The > basket stores tax rates and costs of each item etc. so that when a basket is > de-serialized, it shows the rate of tax as it was when the order was made.
This is essential for any e-comm system. It's one of those cases where normalization doesn't work. Generally you don't want to have pointers to products, tax rates, shipping calculators, discount codes, addresses, gift certificates or anything else as the items you point to can change over time. Other approach is to implement versioning so you point to an immutable version of a product or address. That works, but it's typically more work than just having a denormalized copy of all of the info in the order and order item tables. Best Wishes, Peter -- You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en.
