My first look at MongoDB – Why I will want to use MongoDB in my next project

There are many NoSQL databases available and I had chosen to dive deeper into MongoDB so that I can use MongoDB in future projects. In this post, I list some reasons behind my decision to explore MongoDB further after doing some research on the web.

Abundant learning resources

The amount of learning resources is crucial for building up my confidence and aptitude in utilizing a certain tool or technology. I believe that in order to use a new tool efficiently, it is crucial to understand at least 65% of how it works first. And to be able to understand at least 65% of the new tool, I always turn my attention to books.

When I first searched on the topic of NoSQL on Amazon, I could find around four books on MongoDB, as compared to less than two books for other NoSQL databases.

Easy to get started

In order to pick up a new tool, pure reading is insufficient. To be efficient with MongoDB, I need to apply what I had read on some use cases. However, unless I am employed by some rich and generous employer who can give me the authority and opportunity to design and employ MongoDB for a project, chances are that I will need to learn more about it all by myself. However, I only have a few cheap laptops that I had acquired over the years to run a NoSQL database.

It seems that the creators had designed MongoDB for people like me. One of the design factors that the creators of MongoDB had considered was to make MongoDB run on commodity hardware efficiently. To complement that, the creators had also simplified the process of getting started with MongoDB into a few steps:

  • Choose the package for the operating system to run MongoDB on.
  • Download the package.
  • Unzip the package to a directory.
  • Navigate to the bin folder and run the database daemon (mongod.exe) with the command prompt.

With these few steps, I instantly have a MongoDB server which can help me store my experimental data.

Drivers available in many programming languages

The MongoDB community had created a repository of drivers which applications can use to communicate with the database daemon to manipulate data. With drivers written in programming languages that I am familiar with, such as PHP, C#, Java and Javascript, I can use MongoDB in different types of applications that I can come up with. And since the binaries of MongoDB is made portable, I can deploy it easily alongside with my application binaries.

JavaScript developer-friendly

MongoDB structures data into collections of JSON-style documents. By doing so, the usage of MongoDB became intuitive to people who are familiar with JavaScript or programming languages with similar syntactical structure.

Data agility (SQL vs NoSQL)

Every system will need to evolve with growing business needs and growing business needs often has a great impact on the database. However, there is only so much about the database which we can plan before we start to build our system. Employing RDBMS solutions will mean that we will have to change our schema as business needs evolve. Hence, I find data agility particularly attractive.

Unlike traditional RDBMS, we do not have to fix our data structures with MongoDB right from the start. For instance, we could start off with each user having a username and password and at a later time capture other details about the user without incurring downtime for schema changes.

For me, data agility also meant less hindrance from my lizard brain. I don't have to think too much into the future, since the structure of my MongoDB data can be changed easily when needed.

Furthermore, since I will be building new projects, I might as well store my data in a new and effective way.

Success stories

If something is worth using, we often see people using it. I heard Mat Wall talk about why he chose MongoDB for guardian.co.uk. On another URL, I also learn that Craigslist utilize MongoDB to store billions of records. With Guardian, Craiglist and a long list of applications using MongoDB, it became apparent that MongoDB is a database that I should include in my technology toolbox.

Other posts that may interest you

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.