Answer the question
In order to leave comments, you need to log in
How to make a database structure correctly?
How to properly structure the database of an online store?
Each product can have different characteristics, and these characteristics are selected from the database when adding the product. For example, the Phone product has memory, but the Stiralka product does not.
I am describing all this to the fact that I need to make a filter for such different products that may have different characteristics. How to make the structure correctly - products, characteristics and filters.
How does the table structure for filters look in general? I'm doing this for the first time, I want to achieve flexibility, in order to make it easier to work with data
Answer the question
In order to leave comments, you need to log in
Product table (id, group_id, name, price, balance, ...)
Attribute table (id, name, type)
Table of possible attribute values (attribute_id, value)
Table of possible product characteristics (group_id, attribute_id, required)
Product characteristics table ( product_id, attribute_id, value)
This is the bare minimum.
I think it's not difficult to enter such a request in Google and study everything yourself.
Let's just say, study a lot of examples, and find good and bad places in them.
"Example of product database structure"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question