Why can't I add items to the database?

Is MongoDB (or other document database) a good noSQL option for application where it has users (millions ) and user can have one or more lists, each list containing items (photo, video, note, song)  associated with users. Users can add more lists, delete lists...users can add items to lists, delete

  • Answer:

    Of course this is possible. I would not store any blobs in the database though, instead using S3 or CloudFiles, depending on what you need to do with the data. Here is how I would approach this: * Start using a hosted database like http://mongohq.com . The $50 plan should be good enough for your needs in terms of volume. You can always upgrade later when you have high numbers of concurrent user activity. * Implement a test server in node.js and mongoose.  Create some test data. * Use any load testing tool to test the performance of this. * Fine tune the schema until you have derived an optimum for your use case. The key to making this work is having a good understanding of the underlying data set, especially the quantities involved (How many items does a list have, etc), and your ability to let go of things you learned when creating SQL schemas (like normalizing the db).

Martin Wawrusch at Quora Visit the source

Was this solution helpful to you?

Other answers

Sure, with the right doses of replicasets and sharding, it is very doable. You do need to just store metadata for large binary leaves (songs, photos, etc) in mongo with data streamed/stored elsewhere (gridfs, mysql, etc). Also, WriteConcern's are tunable - use stricter (like fsync_safe) or less strict depending on your application requirements.

Gaurav Sharma

I also think it is doable but in case you are thinking of using nested documents i.e. a User document contains list of other documents. Please make sure that your document size remain in limit. Otherwise you will start getting exception.

Shekhar Gulati

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.