Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm building small application using Node.js and MongoDB and I'm planning to host it on Openshift or Heroku. All that hate that MongoDB takes here on HN makes me reconsider technologies I am using.

I will not have many relations in my database (model User, model Document, User owns Document... and that's all) so I thought that NoSQL databases will do. Plus, MongoDB lets me use GridFS - I'm planning to store pdf presentations in it.

If I should drop MongoDB, what other technology should I use? Or should I fall back to Postgres + ORM and manage my files in filesystem manually?

I don't want to start a flame, I am looking for an advice. I have considered MongoDB to be "good enough" as GridFS lets me store my files without a hassle, but after all that I read on the Internet, now I am not so sure.



It's not about "hate".

There's no emotion involved, in fact.

It's about rationally looking at a given tool, considering its capabilities, considering how it can be beneficial and harmful in a given situation, and considering how it compares to similar other tools.

Sometimes this analysis is in favor of a given tool. PostgreSQL is a good example of this. It excels in many different ways, including some that overlap with MongoDB and other so-called NoSQL databases.

Sometimes this analysis is not in favor of a given tool. MongoDB is a good example of this. It has some pretty serious issues, and there are often better alternatives.

When people suggest to not use MongoDB, it's generally not some emotional response due to "hate". It's usually because they've considered what it can do and how it works, and it turns out that in pretty much all cases there is a better alternative available that should be used instead.


I don't think it's hate - it's a call for users to understand and examine the implications of assumptions that the developers of the tools have made.

Don't take the advertising taglines and slogans as a panacea - there are still a ton of things to understand about how mongodb might or might not work for your circumstances. The advertising buzzwords are just that - advertising. You need to examine each and every technology that you chose as part of your project.

And I totally recommend the entire Jepsen series from that site http://aphyr.com/tags/Jepsen - it's an eyeopener!

In my opinion, if you are starting some experiments, etc, just use postgres! It removes a lot of doubt and new learning/confusion from your development.


PostgreSQL actually works quite well as a noSQl/document store :) I believe the best answer though is "it depends". I'm not sure this is the best place but if you gathered your requirements and listed them I'm sure a dstabse that will keep your data safe can be recommended.


If it's a small app, just use Maria or Postgres. IMO, the only time to even think about using one of these non-traditional stores is when you've scaled past what SQL systems can offer. And even then, I'd use the non-traditional store like I use a C extension in Python -- only for the parts that can't scale without it.


Most of the MongoDB hate comes from the PostgreSQL crowd.

It's actually a fine database for many domain models i.e. lots of nested data and GridFS does work pretty well. That said don't use GridFS. Use something like S3 and reference the files.

And if you are planning to use MongoDB then look at MongoLab/MongoHQ. Anyone who says you should run your own database should NOT be listened to. Use a hosted solution if you are starting off small. You don't want to be spending your valuable time testing your backups (just one of the many operational activities most people don't do).


> Most of the MongoDB hate comes from the PostgreSQL crowd.

Or anyone who doesn't like losing their customers' data.


I was in a similar situation to you when MongoDB was a lot less mature. Postgres was my "go to" store and I was a very skeptical of the Mongo hype.

My view would be to use Mongo if it's just a small project. It's a good time to learn exactly how Mongo is different and get a first hand experience of what the trade-offs are.


I've tried to go non-relational for things that required a few relations and keeping things consistent was a pain. Owners would drop and documents referring to them would still be in the database, causing problems. I'd go with Postgres until you know it's not enough (and I do, nowadays).


I've used MongoDB quite a bit, and find it convenient. That said, it also has flaws (many has been pointed out on HN and elsewhere).

It's schemaless and malleable, easy to restructure the data. Fairly easy to operate, replication is easy to setup.

Don't use GridFS though, I'd go for S3 or similar instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: