Answer the question
In order to leave comments, you need to log in
Database architecture and sorting?
Goodnight! I would like to hear advice and criticism of my database architecture, regarding several entities, as well as help and advice in sorting these things.
There is a service that stores product templates, they are added by the administrator. Then, suppliers can select an item from the list and set the price and quantity. After which it is sold. There are also such things as characteristics, groups of characteristics, according to which we collect N characteristics and bind them to a product. For example, a group of characteristics - a phone, will include, say, a screen, memory, storage.
Each characteristic has its own values, for example screen: ips, oled, amoled, etc...
Therefore, I have a table to store the names of the characteristics
specifications:
id,
title,
position
specifications_values:
id,
specification_id
value,
position
specifications_groups:
id,
title
specifications_groups_relation:
id,
specification_group_id,
specification_id
Phone X 16GB(position:1) EU(position:1)
Phone X 16GB(position:1) CHINA(position:2)
Phone X 32GB(position:2) EU(position:1)
Phone X 32GB(position:2) CHINA(position:2)
Answer the question
In order to leave comments, you need to log in
EAV crutches can often be rendered more beautifully using jsonb.
without much blood to do using eloquent orm?
Project in laravel.
The thing is - how wrong and heaped up does the base look for solving my problem? What to remove and what to add?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question