Wow! Thanks a lot for your explanation.
Since it shakes my brain a lot, let me fully explain the requirement of the system.
I attached a JPEG of the ERD sketch.
The point here:
Categories could be main categories and sub categories.
A main category can have many subcategories.
Products can only be assigned to 1 subcategory.
Additional attributes are assigned to main categories.
Therefore, the subcategories and products that fall under a main category must inherits all the attributes that assigned to that main category.
Sales table must somehow linked to products, with their additional attributes attached. Like for example:
Yoke buy 3 shirt A size S: 1 red, 2 blue.
Please see the image for explanation.
I have no problem with fixed table, but since this is a cms system, admins must be able to add/edit/delete their additional attributes to a main category.
The image is all I can think about so far... but I believe I made mistakes somewhere....
I will go on and read about normalization further.
Please please please bear with me. I have all this fog inside my head, dunno how to solve this. Thank you very very much in advance.
