Mongodb as multidimensional databases


Presently, I’m working on storing large amount of foods inventory in Javascript using multidimensional array and thinking of storing the same array in 3D into MongoDB. Having no idea if such database could manage this? Or is this relevant for NoSQL?

X-rows: Which floors
Y-columns: Index/No
Z-Depth: Name, Price, items left, etc.


Is there a reason each item couldn’t be a document in a collection, such as Items? Each item could have attributes for floor, index, name, price, etc.


Think in terms of documents. What does a 3D set of documents look like? A pile of papers! Given the schema you’ve described, the natural representation in Mongo would probably to have each floor represented by a separate document (or sheet of paper).


Beside this project, I have been experiment 3D dimensional array for music notation such as MusicXML mapped into Javascript. Sound like a good idea to store into MongoDB and could it be retrieve in realtime as fast as microsecond?

Just wonder what is the latency to retrieve notes using .find() from minimongo?

Example, find notes at column 1, find notes at column 2, find notes at column 3. etc.