Answer the question
In order to leave comments, you need to log in
The data structure for the product catalog. Attributes affect the price. How to organize?
Help resolve the dilemma.
The task is probably typical, you can poke my nose where to read . A
product, for example a T-shirt, can have different colors and materials that affect the price, description, photo, availability.
As a result, if a T-shirt has 10 colors and 10 materials for one model, there will be 100 variations.
From the point of view of further manipulations, it is very convenient to store its own object / record in the database for each variation.
The client, of course, should see only one model, with a choice of color, material.
As a result, if there are 100,000 products, we have 10,000,000 records in the database.
If you imagine that there will be different photos, for example, 10 per position, then you want to call your mother and are afraid in all directions.
The numbers look intimidating.
Duplication in the database is also alarming (all other parameters for 100 variations are identical)
Tell me if I'm on the right track or where I'm wrong?
Technology stack: MongoDB, php
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question