Answer the question
In order to leave comments, you need to log in
How to properly design a database for a wholesale online store?
The bottom line is that I need to design a database for a wholesale clothing store. Some product categories (such as T-shirts) contain multiple attributes (such as size and color). The database should take into account the number of T-shirts of a certain size and a certain color (for example, white T-shirts in size S - 54 pieces, light yellow T-shirts in size M - 74 pieces). The main difficulty is that there can be a huge number of combinations of sizes and colors, due to the large number of colors and sizes, and it would be nice to put this in a separate table. I can’t even imagine how it should be implemented, because. I don't have much experience in database design. If anyone has a simple and elegant solution that I just don't know due to lack of experience, I would be very grateful.
PS I'll write again: there is very little experience, so do not judge strictly.
Answer the question
In order to leave comments, you need to log in
A simple architectural solution - EAV , including for the task of characteristics (filters, properties) in an online store. Moreover, it also scales quite well. So to say, this is a lightweight version of search engines (Sphinx, Elasticsearch, Solr...) to start with. And often it can be enough with the head.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question