I'm not sure I understand exactly what you need, but I would use something like that (w/ MySQL):
<?
CREATE TABLE product (
product_ID int(9) NOT NULL auto_increment,
category_id int(3) unsigned NOT NULL,
//etc...
PRIMARY KEY product_ID
);
CREATE TABLE category (
category_id int(3) unsigned NOT NULL,
category_name varchar(16) NOT NULL,
PRIMARY KEY category_id
);
CREATE TABLE sub_category (
sub_category_id int(3) unsigned NOT NULL,
sub_category_name varchar(16) NOT NULL,
category_id int(3) unsigned NOT NULL,
PRIMARY KEY sub_category_id
);
?>
In this case, each product has one category
each category can have many products
& each category can have many subcategories
Hope this helps you.