it_user110859 - PeerSpot reviewer
Consultant at a financial services firm with 51-200 employees
  • 1
  • 40

MongoDB: What are the pros/cons?

I have a client looking for the skinny on MongoDB. Pros, Cons, best fit use cases, best practices. If anyone has hands on, objective experience would like to discuss. Also, other Big Data experience around document and key value pair stores as well.

PeerSpot user
1 Answer
Jorge Olmedo - PeerSpot reviewer
Software Developer at Empresa de Telecomunicaciones de Cuba
Top 5
Aug 24, 2021

MongoDB is a very reliable and stable No-SQL engine. It's a document-based database, and use Javascript as its query language: depending on the developer expertise and skills, this could be an advantage as well as a disadvantage: SQL, as a query language, got too deep in developer's flesh and bones, so it could be hard to make the transition. Nevertheless, there are some IDEs that let developers write SQL for querying MongoDB. My advice: learn how to do it in Javascript: study, test, take some hours to deal with it, then success is achievable.

MongoDB is schema-free, and there's no referential integrity whatsoever, so it best fit in scenarios that deal with facts rather than transactions, although the last releases support transactions. 

If your data consists mainly in facts and its volume is very high (TByte or more), then MongoDB could be your engine: you can replicate your data, adding redundancy to your persistence, improving HA; you can share your data, adding some criteria to divide your data, so queries can be directed to the dataset you need, using a meaningful shared key (maybe, this is one of the most important things to do when you're dealing with a cluster, and it's also crucial to do it right so your queries go to the shard that contains the data to be fetched the most probable; otherwise, the engine will try to find your data on all of the shards).

MongoDB has a lot of APIs to programmatically deal with it, including APIs for the most common programming languages: C/C++/C#, Java, Scala, Ruby, Kotlin, Python, Ruby, Go, etc. For any of those APIs, when you ask for a connection, it actually returns a pool of connections, so the API will handle connect/disconnect/reconnect policy for you.

MongoDB can be configured to handle a variety of scenarios, such as:

- critics at writings, then you just set a standalone MongoDB and turn off the op-log feature

- consistency at readings, even in a cluster, configuring features such as returning from API calls just when the writing process was checked in the primary node, and at least, in one secondary node, or in all secondaries

Other interesting features:

- nomenclators can persist in collections, and as long as those collections remain un-sharded, you can simulate a join operation using the Lookup method from the aggregation framework, which is very, very strong.

- You can set up a Map/Reduce process from its internal query language (Wow!, I mean, Wow!

- When you configure a cluster, any operation triggered from its internal query language will be executed in parallel on all of the nodes (again... Wow!)

- There are several types of indexes available. One curious thing: in multi-field indexes, the order you use to declare it is important at calling time. There are engines that besides that order, the existence of a field could be a valid reason for using that index. In MongoDB, if the field used as a filter is not the first in the index, MongoDB will trigger what I called a full-scan search.

- Date/time fields always persist in UTC time

And etc., etc., etc.

MongoDB best fits in non-transactional scenarios, when it's important to cross query facts over the time. It supports an extremely high volume of data, keeping it steady and solid. It's not a key-value engine: for such scenarios, Redis or Cassandra will fit better, in the case of querying over the network; in the case of embedding apps, Tokyo could be a nice choice for a key-value store.

I hope this will be helpful.

Thanks for your time.

Learn what your peers think about MongoDB. Get advice and tips from experienced pros sharing their opinions. Updated: November 2022.
655,774 professionals have used our research since 2012.
Search for a product comparison
Related Questions
Miriam Tover - PeerSpot reviewer
Service Delivery Manager at PeerSpot (formerly IT Central Station)
Sep 19, 2022
Please share with the community what you think needs improvement with MongoDB. What are its weaknesses? What would you like to see changed in a future version?
2 out of 31 answers
Data Engineer | Full Stack Developer at a tech services company with 1,001-5,000 employees
Dec 21, 2020
Its security features can be better. Sometimes, my higher authority says that we are not going to use MongoDB because it doesn't provide that much security for the RDBMS or relational data that we use for transactions. Instead of MongoDB, we will use Oracle Database because for a transactional service, you have to rely on RDBMS ACID properties. I would love to work on MongoDB by using my mobile phone. When I am working remotely or traveling and have some instances deployed on my server, I should be able to check through my mobile whether all the data is being pulled. GitHub has a similar feature, where it lets you read from the laptop, and you can also pull and push with your mobile phone. I would request MongoDB to provide such a feature. Basically, I want a mobile version for both iOS and Android versions.
Software Engineer at a retailer with 10,001+ employees
Jan 13, 2021
It would be good to have scalability for clusters. For example, if we have three clusters, we should be able to increase to five clusters if required. I am not sure if such a feature is currently there. I hope there is good documentation for this.
Miriam Tover - PeerSpot reviewer
Service Delivery Manager at PeerSpot (formerly IT Central Station)
Oct 7, 2022
If you were talking to someone whose organization is considering MongoDB, what would you say? How would you rate it and why? Any other tips or advice?
2 out of 32 answers
Data Engineer | Full Stack Developer at a tech services company with 1,001-5,000 employees
Dec 21, 2020
When we provide solutions for a customer, we look at the domain in which we are working, and accordingly, we recommend or select a database. It is up to the customers which database they want to use and how they are going to use it and leverage the subscription of that database. Do they want Oracle, MySQL, or SQL Server? Based on their preferences, we select the database. For people or businesses that are currently trying to put their feet in the industry, it is a good thing to start their career with MongoDB. Sometimes, you don't have the knowledge of SQL and how to put a query to get a result. In MongoDB, there are certain things that make it different from other solutions. It is schemaless, and you don't have to have the knowledge of schemas. It is a good way to go ahead. I would rate MongoDB a nine out of ten.
Software Engineer at a retailer with 10,001+ employees
Jan 13, 2021
I would rate MongoDB an eight out of ten. It is a good product, but it requires some improvements.
Explore this product
Download Free Report
Download our free MongoDB Report and get advice and tips from experienced pros sharing their opinions. Updated: November 2022.
655,774 professionals have used our research since 2012.