Answer the question
In order to leave comments, you need to log in
Correct product catalog collection structure?
Good day. I am designing a database for an online clothing store, DBMS - MongoDB, the project itself is educational. I'm interested in how goods should be stored correctly, in terms of both requests being quickly executed, and that the requests themselves are not too complicated.
As I see it: there is a collection of products, it consists of such documents (each color is, in fact, a separate product):
{
'id': 1,
"gender": "male",
"category": "jeans",
"subcategory": "slim",
"name": "Slim Jeans",
"description": {
"cardDescr": "",
"shortDescr": "",
"fullDescr": ""
},
"frontImage": "",
"backImage": "",
"otherImages": [],
"color": "light indigo",
"price": 6995,
"sale": 0,
"size": [
{
"waist": 28,
"length": 28,
"qty": 20
},
{
"waist": 28,
"length": 30,
"qty": 25
}
//...
]
}
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