Jump to content

MySQL Creating Categories?


random1

Recommended Posts

Hey All,

 

I've created a table:

 

CREATE TABLE `product_category` (
`productcategory_id` BIGINT(50) UNSIGNED NOT NULL COMMENT 'The ID of the Product Category',
`productcategory_parent_id` BIGINT(50) UNSIGNED NOT NULL COMMENT 'The ID of the Product Category\'s Parent',
`productcategry_status_id` BIGINT(50) UNSIGNED NOT NULL COMMENT 'The Status ID of the Product Category',
`productcategory_name` VARCHAR(100) NOT NULL COMMENT 'The Name of the Product Category',
PRIMARY KEY (`productcategory_id`)
)
ENGINE=InnoDB
ROW_FORMAT=DEFAULT

 

This table holds the categories that I want to link to my 'product' table.

 

I've looked at: http://www.sqllessons.com/categories.html

 

as a starting point.

 

Is there a standardized structure of handling categories for products, services, items etc?

 

The structure needs to allow for categories having parents and for subcategories.

 

E.g:          Food > Fish > Fresh Water Fish ......

 

Any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.