Earlier quoted context omitted.
MongoDB has THE WORST vendor lock-in imaginable, so only use it if you know that you could throw everything away. Source: my last employer used MongoDB, and switching to an RDBMS would have forced us to rewrite ~80% of the codebase.
About 80% rewrite: it is poor abstraction problem rather then vendor lock-in one
Never, ever, ever use MongoDB
51–60 of 122 posts
Re: Never, ever, ever use MongoDB
#52Now with PostgreSQL 9.4 there isn't really any reason to use MongoDB (JSONB is better suited than BSON). For any other use CouchDB.
There are a few. Mongo has excellent integration with Hadoop and is becoming very popular in the big data analytics space. Likewise it is gaining traction in the EDW space as a result of their partnerships. Also it stills remains one of the simplest databases to setup and use making it still my goto for hacks/spikes.
Re: Never, ever, ever use MongoDB
#53Re: Never, ever, ever use MongoDB
#54Earlier quoted context omitted.
If your data really doesnt matter you might as well just use ElasticSearch as a document store, its a lot easier anyways
ES is wicked easy to setup and use, but it's not recommended as the primary data store for split-brain scenarios, IIRC.
Re: Never, ever, ever use MongoDB
#55I think people only use it because it stores JSON and let's you query it arbitrarily on demand. It appears to be as good as CouchDB, but with on-demand queries, as good as Postgres, but with JSON (!). It appears to be quick and easy and the tool for the job. Also, when people say NoSQL they actually mean MongoDB.
Cassandra, Couch, Redis, Riak, Dynamo...
Re: Never, ever, ever use MongoDB
#56Relationships in MongoDB are commonly stored as ObjectID references, and (at least on node) the default Mongo client (Mongoose) makes you write schemas to enforce these. I think Mongo is awful too, and I'm sure there are problems with this approach - I'd love for someone with more DB knowledge to go into details - but saying there are 'no relations' seems to be an oversimplification.
Mongoose is a client-side library. It emulates relations and schemas client-side, as I also pointed out in the article.This also means that the database cannot optimize for relations and schemas, as it doesn't even know they exist . Mongoose is also very much not the default MongoDB client in Node.js - it's a third-party client library by Automattic. The official client according to the MongoDB documentation is `mong…
Thanks for your excellent explanation and totally understood re: not being able to optimise for relationships on the server.
Re: Never, ever, ever use MongoDB
#57Now with PostgreSQL 9.4 there isn't really any reason to use MongoDB (JSONB is better suited than BSON). For any other use CouchDB.
There are a few. Mongo has excellent integration with Hadoop and is becoming very popular in the big data analytics space. Likewise it is gaining traction in the EDW space as a result of their partnerships. Also it stills remains one of the simplest databases to setup and use making it still my goto for hacks/spikes.
It's not hard to make it easy to do a thing in the wrong way - and that's exactly what MongoDB does. It doesn't make you set up authentication or table schemas, so it looks 'really easy to set up'.
In reality, though, you're wasting hours to save 10 minutes. Because at a later point, you're going to have your database broken into (if it can even be called that, without authentication), or you end up corrupting your data because two of your applications disagree over what the current object schema is.
To know how easy something really is, you need to compare how hard it is to set something up correctly. And once you do that, MongoDB falls far behind.
Re: Never, ever, ever use MongoDB
#58https://pbs.twimg.com/media/CF9XvchWYAEKzTp.jpg
Source .sketch file is in:
https://github.com/mikemaccana/stickers
Joke is Alex Sexton's, I licensed font, designed, and printed them. Apparently a couple have found their way to Mongo HQ.
Re: Never, ever, ever use MongoDB
#59Earlier quoted context omitted.
Mongoose is a client-side library. It emulates relations and schemas client-side, as I also pointed out in the article.This also means that the database cannot optimize for relations and schemas, as it doesn't even know they exist . Mongoose is also very much not the default MongoDB client in Node.js - it's a third-party client library by Automattic. The official client according to the MongoDB documentation is `mong…
I have used and am aware of node-mongodb-native (I wrote http://stackoverflow.com/questions/19546561/node-mongodb-err... where we discovered it wrapped and threw away all exceptions in callbacks in the stable production version ), but Mongo (the company) have recommended Mongoose. The language now is vaguer than it was 'you can use it natively if you want, or use Mongoose' http://docs.mongodb.org/ecosystem/drivers/no…
Re: Never, ever, ever use MongoDB
#60I've used MongoDB recently for the first time, for an internal project. Being schemaless, I believe it did speed up development time significantly, and allowed me to add stuff more gradually, but you could say that's just a way to indulge a certain laziness of design. Now that the project has matured, stepping back I can see how a relational database would be a better fit, but if I had used a rdbms from the beginning…
The article mentions CouchDB and other schematic-less, document DBS, which should be equally good for prototyping but suck less.