Blog Post

Up Together Node N Mongo

                                 Up Together  Node  N  Mongo

Node.js is a rapidly growing technology that has been overtaking the world of server-side programming with surprising speed. MongoDB is a technology that’s revolutionizing database usage. Together, the two tools are a potent combination, thanks to the fact that they both employ JavaScript and JSON.

The relational databases held the leadership for decades likes of MySQL, Oracle, or MS SQL, etc. But in current era modern apps require more diversity and scalability. Non-relational databases, like MongoDB, have appeared to meet the existing requirements and replace current relational environment.

Node.js and MongoDB "grew up together". They have historically had the best tooling. This tooling satisfies developer laziness. Node and Mongo are both examples of tools which "break the rules" of everything we've done since the 1990s,What I wanted to say is that Mongo by it self, as a tool, is neither good nor bad. Its like a hammer. If you work with nails - its perfect for you, but if you only have screws - well you are screwed by using a hammer :)

Mongo is a is an open-source  NoSQL database - the basic unit is a document. It’s using JSON for everything .As a starter it’s easy to use and understand it ,Because it's JavaScript and JSON all the way down(even as a query language).

Storing and retrieving hierarchical objects is easier in MongoDB, MongoDB's flexible nature permits for easy agile / iterative development. Mongoose like ODM (object document mapper) makes working with MongoDB with Node.js feel very natural.  MongoDb works very well within asyncronous environments.


Since the day I've introduced my self to NodeJS, Most tutorials I found on internet exclusively used MongoDB. There is a "term" for such stack - MEAN (Mongo, express, angular, node). MEAN technologies are known not because they are best compatible but because they are leading technologies presently. It is an ideal for startups where only one full-stack JavaScript developer can run the whole service from the ground up.

Now Day’s , The art of development currently focuses on API driven web apps. RESTful API are built with NodeJS, Express, Mongo powers the interface and serves the content.

There are some fallbacks like Joins, Transactions. You can't join records with it . If you don't want to normalize your data and do joins, you should consider MongoDB.

MongoDB is highly recommended in scenarios where fast processing and simplicity is the key. Due to its NoSQL based query mechanism it is robust, scalable and highly efficient.

Give it a try learn about it, and then if you think MySQL is better use MySQL. Every technology serves its purpose.

I remember a quote by someone I read on internet "A developer should never marry a technology".

Keep moving! Happy researching!