Database structure behind Ordering system
Two tables are mainly used to store the information of the Order:
-
Order header: One row per order.The information stored here is at least:
-
Client: Link to the Userlist table with the information about the buyer. Step 2 of the wizard.
-
Shipping: Link to the Addresses table with information of where to ship the items to. Step 3 of the wizard.
-
Billing: Link to the Addresses table with information of where to send the bill to. Step 4 of the wizard.
-
Extra fields from the Order form template: Each field in the form will be present in the Order headers table. Step 5 of the wizard.
-
Order lines: Links to the Order lines table, were each record is 1 individual item. Step 6 of the wizard.
-
Suggestions: Link to the Suggestions table, where each recond can represent a set of items that can be suggested in step 6 of the wizard.
-
Order lines: One row per individual item ordered.The information stored here is at least:
-
Quantity: Number or copies ordered for this item. Set in Step 6 of the wizard.
-
Unit price: Price for this item. Represented pricefield is set in the Order template.
-
Total price: Calculation of the Unit price multiplied by the Quantity.
-
Order header: Link to the Order headers table, where 1 record is 1 order.
