title: Mongodb vs Postgres in Nodejs
body: <p>I'm building a NodeJS application and am utterly torn between NoSQL MongoDB vs RMDS PostregresSql. My project is to create a open source example project for logging visitors and displaying visitor statistics in real time on a webpage using NodeJS. I was planning on using MongoDB at first, because lot of NodeJS examples and tutorials, albeit mostly older ones, used it and paas hosters with a free tier are abounding. However, I was seeing a lot of bashing on MongoDB recently and found that people who tried to use MongoDB ended up switching to Postgres:</p>
  <ul>
  <li><a href="http://blog.engineering.kiip.me/post/20988881092/a-year-with-mongodb" rel="nofollow noreferrer">http://blog.engineering.kiip.me/post/20988881092/a-year-with-mongodb</a></li>
  <li><a href="http://dieswaytoofast.blogspot.com/2012/09/mysql-vs-postgres-vs-mongodb.html" rel="nofollow noreferrer">http://dieswaytoofast.blogspot.com/2012/09/mysql-vs-postgres-vs-mongodb.html</a></li>
  <li><a href="http://www.plotprojects.com/why-we-use-postgresql-and-slick/" rel="nofollow noreferrer">http://www.plotprojects.com/why-we-use-postgresql-and-slick/</a></li>
  </ul>
  <p>I also a fan of Heroku and have heard a lot about Postgres because of that and find that SQL queries can be nice sometimes.</p>
  <p>I'm not a database expert, so I can't tell for the life of me which way to go. I would really appreciate it if you could give some advice on which one to consider and why.</p>
  <p>I have a few criteria:</p>
  <ol>
  <li><p>Since I want this to be a example, it would be nice to have a way to host a decently sized amount of data. I know that MongoDB definitely offers this, but Postgres paas like Heroku seem to have pretty small databases (since I am logging every visitor to the website)</p>
  </li>
  <li><p>A database that is simplistic and easy to explain to others.</p>
  </li>
  <li><p>Performance doesn't really matter, but speed can't hurt</p>
  </li>
  </ol>
  <p>Thanks for all of the help!</p>
  <p><strong>Note</strong>: Please no flame wars, everyone has their own opinion :)</p>