How do I store more then the default limit of 16 MB in a mongodb record

If you deal with large data and want to store it using mongodb you may have encountered this problem before. By default mongodb limits a record to 16 MB max. So I started researching and I found out that there is a solution to this problem. The solution is GridFS.

What is GridFS?

GridFS is a way to store data which is larger then the default 16MB.

How does it work?

GridFS chops the data into pieces and stores them in a separate document in one collection. In addition it also stores meta data in another collection.


How does the developer access the information stored in GridFS?

If you are accessing this through your application you need a driver. For example if your using node.js then I would suggest using node-mongodb-native because it supports GridFS.

For more detail visit:

https://github.com/zmhassan/node-mongodb-native/blob/1.3-dev/docs/gridfs.md

If you are using commandline then you can use mongofiles?
Visit this page for more details:

http://docs.mongodb.org/manual/reference/mongofiles/






Check out my latest project a career search engine:
http://www.bzcareer.com

Comments

Popular Posts