There is an online bike shop. There are about 40 categories of goods. Each category has its own properties (fields). Kakuy architecture advise to do? 40 tables, so that each category has its own table? At first I did this: a table of goods (with properties common to all categories) and a table for storing properties.
- oneThis is what was “at the beginning” much better. - Mike
2 answers
A week later, the authorities would knock something into their heads: the old 40 categories are bad, not good, we urgently switch to a new classification from 100 categories. And a week later: to return everything as it was. And what, create-delete tables? Don't need this. At first it was right.
Unambiguously it is better to store goods in one table, together with all properties. If there are many properties, and they can all be different, then it is better to put the properties in a separate table.
At first I did this: a table of goods (with properties common to all categories) and a table for storing properties.
And what is the problem at the moment to continue to do so?