Answer the question
In order to leave comments, you need to log in
How to write an ERD correctly?
Good afternoon. Tell me how best to structure the product and its decorators.
Decorators here mean, for example:
1) Wrapping paper (FK on the corresponding reference book)
2) Packing tape (just as a service, available or not)
3) Product engraving - applying text (several texts) to the product
and others.
On the one hand, all decorators are listed in the directory, have their own key and their cost:
Decorators
id name price
1 Бумага 10
2 Лента 5
3 Текст 2
id product_id decorator_id decorator_price
Answer the question
In order to leave comments, you need to log in
Create tables with decorator options. For example:
decor_text_params:
id product_id text_value text_position text_param1 text_param2
decor_paper_params:
id product_id paper_type paper_size paper_param1 paper_param2
decor_params_definition:
id decor_id param_name param_type ...
Заполнение:
1 1 "Цвет бумаги" "color"
2 1 "Размер бумаги" "int"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question