How should I model my MongoDB collection for nested documents?
问题 I'm managing a MongoDB database for a building products store. The most immediate collection is products, right? There are quite several products, however they all belong to one among a set of 5-8 categories and then to one subcatefory among a small set of subcategories. For example: -Electrical *Wires p1 p2 .. *Tools p5 pn .. *Sockets p11 p23 .. -Plumber *Pipes .. *Tools .. PVC .. I will use Angular at web site client side to show whole products catalog, I think about AJAX for querying the