B
B
Bogdan2020-04-09 20:55:33
MySQL
Bogdan, 2020-04-09 20:55:33

Table structure for property mini-filter?

How to store correctly, so that later you can choose the relationship.

spoiler
5e8f6141a5d6b498749171.jpeg

For example, they chose black, for it there is Quality of goods: copy, high copy, original
, there is also only Revision L681h
, but at the same time, there is only black for the original.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BasiC2k, 2020-04-09
@BasiC2k

In any case, all these properties are tied to a specific product.
Therefore, you can make two tables:
"Products", with fields:
- id
- product name
"Properties", with fields:
- id
- product id
- Property name
- Property value
Dump all product properties into the property table. Further, everything is simpler: the user made a choice of color (according to your picture) - a request for a selection was sent: what properties the products with the selected color have. Based on the sample, fill in the fields for the sample below. Etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question