Jump to content

What is the best way to categorize a product


mostafatalebi

Recommended Posts

Hello everybody

 

I'm developing a simple product-gallery website. Due to my client request, I should code it from scratch and don't use CMS such as wordpress. I wonder what is the best way for a product to have cateogries? Let me explain:

 

I have product A which is a Laptop. It has following categories:

 

ASUS, light, expensive, office, award-winner

 

Each of the above words a category. For instance the cateogry "office" includes laptop appropriate for office and non-graphical tasks and the other words are explanatory as well. Then, I want to make a product table, what is the best solution for category field? Should I make a column for each cateogry, in that way I have to impose a limit on it. For instance 5 columns for category which makes it limited. Or, I should use only one category and separate them with comma. In that way I should use a little reg exp.

 

What is your suggestion?

 

thanks in advance

 

you seem to have mixed up categorys and tags.  But anyway, given this kind of layout I would have an id/category ref table and match up all id's that the the product matches in a prod-id/cat-id x-ref table that would have only those two columns with them set as a compound PK.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.