database design - Storing multidimensional data in MongoDB -


i attempting convert large mysql database of product information (dimensions, specifications, etc) mongodb flexibility , move away restriction of column based table. freedom of being able add new key-value, without making update table structure.

an example of data here: http://textuploader.com/9nwo. envisioned collection being "products", nested collection each product type (ex. hand chain hoists), , nested collected manufacturer (ex. coffing & harrington). 1 large multidimensional array. learning nested collections not allowed in mongodb, i'm @ dead end.

how store kind of dataset? nosql right choice this?

if nested structure not necessary, can "flatten" data having each document in collection specific product , each product can have manufacturer product type fields. can index these fields can still query them without nested structure.

if need preserve hierarchy, mongodb has tutorial on designing product hierarchy model here: http://docs.mongodb.org/ecosystem/use-cases/category-hierarchy/. essentially, each product has ancestors array. bit trickier keeping hierarchy date on inserts , updates


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -