<snip>
> How about some table definitions?
</snip>
below is a simplified version:
CREATE TABLE products
(
product_key varchar(80), primary key,
attribute_1 varchar(80), not null,
attribute_2 varchar(80), not null,
...
attribute_n varchar(80) not null
);
CREATE TABLE sizes
(
product_key varchar(80), references products,
packaging_type varchar(80), -- i.e. Bags
-- i.e. Drums
-- i.e. Bottles
weight varchar(80) -- i.e. 5lbs
-- i.e. 1 gallon
-- i.e. 8 oz.
);
So now I want to create a table called orders. This table must
reference the item_number in products AND reference the packaging type
and weight so that if somebody orders stearic acid they can't select a
4.3 lb bag if we only sell 50lb bags.
This is what I mean by ¨complicated references¨
Thanks in advance,
-Dan