4 ms·
So i've been trying to find an the ideal case for mongodb, because I have to teach a nosql database to some people I am mentoring. I'm leaning heavily towards
by AdrianRossouw 13y ago
So i've been trying to find an the ideal case for mongodb, because I have to teach a nosql database to some people I am mentoring.
I'm leaning heavily towards couchdb though.
http://daemon.co.za/2014/04/when-is-mongodb-the-right-tool http://daemon.co.za/2014/04/when-is-mongodb-the-right-tool
- wilsonfiifi 13y agoHave a look at this: https://github.com/johnwilson/bytengine https://github.com/johnwilson/bytengine. It could have been built with CouchDB however some features such as ad-hoc querying and partial document updates make MongoDB a more compelling choice (albeit prone to some scalability issues until mongodb version 2.8 hopefully lol!).
- AdrianRossouw 13y agothanks! I'll take a look at it. I use elasticsearch for adhoc querying : http://daemon.co.za/2012/05/elasticsearch-5-minutes/ http://daemon.co.za/2012/05/elasticsearch-5-minutes/ And couchdb does have atomic in-place updates, http://wiki.apache.org/couchdb/Document_Update_Handlers http://wiki.apache.org/couchdb/Document_Update_Handlers I used the latter recently to track the last view-time on images, as well as to build a schema migration routine in like 100 lines of code. edit fixed link
- id 13y agoWhile MongoDB has many use cases, it's just perfect if you need to pass over JSON to your JavaScript. Or need JSON output for any other reason.
- AdrianRossouw 13y agoI can't see how that's a defining feature for it, because couchdb and others also do this really really well. Most of the time you don't even need db drivers, because couchdb is just a REST server.
- zaidf 13y agoOn the list of reasons to use MongoDB, shouldn't being able to pass over JSON be at the bottom of the list given how trivial it is to pass a mysql row as a json array?
- arkham 13y agoWell, for teaching purposes, independent of suitability for a use case there are multiple courses available for free here: http://education.mongodb.com http://education.mongodb.com And, more node.js specific (but also offline capable, and available any time): http://mongodbschool.io/ http://mongodbschool.io/
- AdrianRossouw 13y agothanks. the latter is especially useful. I'll pass it along to people for extra reference.
- rdtsc 13y agoI would stay with CouchDB. Its web interface if really good for inspecting and debugging what is inside the database. Really good for development. Also it has a very nice HTTP interface so can talk to it straight from the Web via a proxy.
- sync 13y agoBe sure to check out RethinkDB as well, which is pretty much mongo with a MUCH nicer query interface and saner locking. http://rethinkdb.com/ http://rethinkdb.com/ http://rethinkdb.com/docs/comparison-tables/ http://rethinkdb.com/docs/comparison-tables/
- AdrianRossouw 13y agoI've had it recommended a few times now. I'll add it onto the pile =)
- sandstrom 13y agoI can also recommend checking out rethinkdb. It feels like MongoDB but without many of the downsides. Not saying MongoDB is bad (I've used Mongodb and like it), but much of their API-design is quirky/bad, locking is an issue and mmap feels weird too.
- tomsoft 13y ago-> an ideal use case: capture and store unstructured data, typically tweets. Tweets structure is json based, quite complex with many field and substructure. It's incredibly to store and manipulate such data with Mongodb without even knowing all the details of the fields! It's also a good use case beacause mongodb is fairly good at adding data, pretty bad at deleting data. same with some others document json oriented database (like elastic search), but mongodb is a good compromise in many area, the query language is easy to understand and powerful, the biggest issue being the diffculty to do complex computation and aggreagation: mapreduce help, aggreagation framework helps too, but in this area SQL is generally much faster for instance.