Help With New Project - Relationships

hullstorage

Registered User.
Local time
Today, 00:43
Joined
Jul 18, 2007
Messages
213
Hi all,

I am creating a new project and was wondering how the best way to setup my tables and relationships.

Here are my current tables and contents

CUSTOMERS TABLE
==============
CustomerID
Name
Address
Postcode
Contact

PRODUCTS
==============
ProductID
StockCode
ProductDescription
UnitAmount

ORDERS
==============
OrderID
OrderDate
StockCode
Quantity
ShipDate
CompletedYesNo
Driver

DRIVERS
==============
DriverID
DriverName
Address
MobileNumber
 
Have you looked at the Northwind sample database that coems with Access to get an idea about how to set up orders.
 
Hi all,

I am creating a new project and was wondering how the best way to setup my tables and relationships.

Here are my current tables and contents

CUSTOMERS TABLE
==============
CustomerID
Name
Address
Postcode
Contact

PRODUCTS
==============
ProductID
StockCode
ProductDescription
UnitAmount

ORDERS
==============
OrderID
OrderDate
StockCode
Quantity
ShipDate
CompletedYesNo
Driver

DRIVERS
==============
DriverID
DriverName
Address
MobileNumber


If I'm right in assuming that Orders involve Customers, Products and Drivers, then all the ID's you have at present will be PK's and the Orders tbl will need CustomerID, change Stockcode in Orders to ProductID and change Driver in Orders to DriverID. These 3 flds will all become FK's.

All the PK's will relate to the FK's in a 1 : many.
 

Users who are viewing this thread

Back
Top Bottom