Answer the question
In order to leave comments, you need to log in
What is the best way to make relationships between tables and the tables themselves?
Hello, tell me please, now I am making an admin panel for the site, there is an opportunity to add categories, and attach a lot of characteristics to these categories, when a product is added to a category, it receives those characteristics that were attached to the category. And by the way, one characteristic can contain several values, that is, for example, the "Size" characteristic of a product can have several different values. Now in general what I have:
categories
with categoriescharacteristics
with characteristicscategory_characteristic
connecting categories with characteristics relationship (many-to-many)products
with goodsКатегория № 1 имеет характеристики {Размер, Материал}
Товар №1.1
Наследует характеристики от своей категории: Размер, Материал
Значения характеристик: Размер: {"Большой","Маленький","Средний"}, Материал: {"Какой то материал"}
Категория № 2 имеет характеристики {Размер, Материал, Цвет}
Товар №2.1
Наследует характеристики от своей категории: Размер, Материал, Цвет
Значения характеристик: Размер: {"Большой","Маленький","Средний"}, Материал: {"Какой то материал2"}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question