MongoDB storage of multi-dimensional arrays

Posted on

Question :

Using MongoDB 3.0.7 as the primary datastore. I connect to it using ReactiveMongo 0.11 on a JVM-based language.

My question is: how well does Mongo store multi-dimensional arrays? For image analysis, I’m storing multiple images in the form of Array[Array[Double]]. There will be 60 images in a single document, each around 250px width and height.

Is this array structure sufficient enough, or do I need to rethink my schema?

Answer :

MongoDB can efficiently store these images provided their total size does not exceed the 16MB document limit. If you are likely going to this, you should consider redesigning your schema, otherwise your schema design will be fine.

Leave a Reply

Your email address will not be published. Required fields are marked *