Which is the most efficient schema or collection design for this kind of site that sells shoes/ clothes, each item basically has the following fields: Type(e.g loafers), name, style(e.g classic), color, description, size(s), quantity, rating.
So, how can I create the schema so that, for instance under styles, each would have its own colors, each color with its sizes, and each size with its quantity (stock).
Thanks in advance. Am new to meteor
As a developer you are the one to decide.
Following articles may lighten your path:
http://blog.mongodb.org/post/87200945828/6-rules-of-thumb-for-mongodb-schema-design-part-1
http://blog.mongodb.org/post/87892923503/6-rules-of-thumb-for-mongodb-schema-design-part-2
http://blog.mongodb.org/post/88473035333/6-rules-of-thumb-for-mongodb-schema-design-part-3
Thanks, I chose the nested one, interesting
There’s also a very good section on data modelling in the MongoDB docs:
https://docs.mongodb.org/manual/core/data-model-design/
It features a section with common design patterns:
https://docs.mongodb.org/manual/applications/data-models/
In my experience nested schemas are usually not worth the headaches. Using your example, the schema you describe would make it very hard to query for all items of one size disregarding their color, for example.