I am building a simple webshop for my portfolio website. In this webshop there are two kind of (main) categories: Movies and Games.
Of course these categories have also need subcategories like: game_type, game_platform, movie_type, movie_quality. My question now is: What is the best way to do this?
For my products and categories i now have 3 tables:
webshop_products (wpID, wpName, wpDescription, wpPrice, wpPicture)
webshop_categories (wcID, wcName)
product_category (wpcID, wpID, wcID) -> this is my join table.
My own idea is to my two extra columns in the table webshop_categories: wcType (ENUM 'sub', 'main') and wcParent (For example the subcategory action can have the games or movies category ID as a parent)
Is this solution a good, or has someone a better idea?
Thanks and greetings Eric