V
V
Vova2015-07-15 16:40:50
PostgreSQL
Vova, 2015-07-15 16:40:50

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

1 answer(s)
V
Viktor Vsk, 2015-07-15
@RoossoCocosso

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 question

Ask a Question

731 491 924 answers to any question