>>One way is to use another field with an autogenerated integer as the PK for this table and just use the Garment and >Service as FKs to their respective parent tables.
>
>Thanks C. W.
>service and garment are childs to the same parent table. it is a pricing table for drycleaning.
>Example: to find price for drycleaning, which is a service, for blouse which is a garment, you would issue "SEEK str(garment.recid)+str(service.recid)" in the parent to get the price to charge the customer.
In the pricing table, how is cleaning a skirt distinguished from hemming a skirt, or cleaning a blouse?
Here's a good design:
<b>Garments Table</b>
GarmentID, GarmentName
1 Blouse
2 Shirt
<b>Services Table</b>
ServiceID ServiceName
1 Cleaning
2 Hemming
3 Wash Dry Fold
<b>Pricing Table</b> (This is a many-to-many table)
PriceID Price, Garment, Service
1 $1.59 1 1
2 $1.38 1 2
3 $2.00 1 3
4 $0.59 2 1
The Pricing Table should include every combination of Garment and Service, and your orders should include the PriceID. Much easier than including the GarmentID and the ServiceID.
Also, with a design like this it's much easier to change prices or whatever.