I am trying to create a database to handle a lot of different products in many different categories.
"PRODUCTS" table can hold many different columns and "CATEGORIES" table can hold product category information.
Products table looks like:
p_id INTEGER AUTO_INCREMENT,
p_name VARCHAR(225),
p_category INTEGER,
p_status VARCHAR(155),
and categories table as:
cat_id INTEGER AUTO_INCREMENT,
cat_name VARCHAR(225),
cat_parent INTEGER,
The p_category on the products table holds the cat_id of the category. But problems arise when a category is deleted because you'd have to check which children the category had and delete/change the children.
Please tell me anyone, what is the best way of storing product categories which may need to be changed or removed at times without a lot of work?
Thanks!
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --