db design question
Date: Sat, 21 Jul 2001 23:32:46 GMT
Message-ID: <305cab98.0107011652.3f1580e2_at_posting.google.com>
I'm new to DB design and have a question:
I need a DB which contains orders made by customers. Also, if the customer changes an order, I don't want to modify the original order, because I want to keep the old versions of the orders so that I can have a history of the changes. So, I assume, I should treat each modification as a new order. My problem is how to represent this in the database. I can imagine a number of alternatives, but I would like to use the best one.
The one I think is the best is as follows. Please critique.
OrderTable
OrderNumber (unique number)
CustomerID (relating to a customer table)
OrderContentTable
OrderNumber (from OrderTable)
Date (Date and OrderNumber determine uniqueness)
ProductOrdered (relating to a product table)
This way I can have a history of the orders by sorting a particular orderNumber from the OrderContentTable by date.
Is this the best method?
Thank you for any assistance.
Nick Received on Sun Jul 22 2001 - 01:32:46 CEST