Help please bit rusty Order Processing

hullstorage

Registered User.
Local time
Today, 00:29
Joined
Jul 18, 2007
Messages
213
I want to create a new project but just need a bit of help as i am a bit rusty now..

I have a database for send out orders but need a little reminding on relationship for this database.

Please note that the customer will order multiple items from the products on each order i.e.


1 x AJG001 - SOLID TEAK 8FT TABLE
8 x AJG004 - SOLID TEAK STACKING CHAIRS
8 x AJG015 - GREEN STACKING CHAIR WATERPROOF PADS
1 x AJG025 - PARASOL BASE
1 x AJG026 - GREEN PARASOL




[CustomerTable]
CustomerID
CustomerName
Address
Town
Postcode
Telephone

[OrdersTable]
OrderID
CustomerName
StockCode
Description
Quantity
OrderComplete Yes/No

[ProductsTable]
StockCode
Description

Please note that the customer will order multiple items from the products on each order i.e.

ON THE FORM WILL BE ( ORDER WILL PROBABLY BE SUBFORM )


Customer Details
===============================================
JOHN SMITH
99 HIGH STREET
LONDON
SW1 1AP

quantity stockcode description
===============================================
1 AJG001 SOLID TEAK 8FT TABLE
8 AJG004 SOLID TEAK STACKING CHAIRS
8 AJG015 GREEN STACKING CHAIR PADS
1 AJG025 PARASOL BASE
1 AJG026 GREEN PARASOL


thanks in advance for your help
 
You need two tables for orders, one for the order header and one for the detailed lines.
 
You need two tables for orders, one for the order header and one for the detailed lines.

sorry how do you mean and where do i need the primary keys
 
Because you need to have more than one product on an order, you need to hold each prodct on a separate record. But all these lines are part of one order you need a record in another table that identifies the order. So you need

[OrdersHeader]
OrderID PK autonumber
OrderNumber your own order number
CustomerName FK link to Customer table

[OrderDetails]
OrderDetailID PK autonumber
OrderID FK Link to OrderHeader table
StockCode FK link to products table
Description
Quantity
 

Users who are viewing this thread

Back
Top Bottom