DEV Community


Discussion on: Explain MongoDB Like I'm Five

rafalpienkowski profile image
Rafal Pienkowski

Hi Sean.

I'll start with answers to your three questions.

  • Does it still have keys?

    Yes. There are in MongoDB keys. Keys concept doesn't changed between MongoDB and classical RDBMS.

  • Does it use SQL?

    Nope. There is specific comparative query language which allow you to perform CRUD operations and data aggregation. Here is a nice page from MongoDB documentation which compares MongoDB statements to SQL statements.

  • Are there web viewers (similar to phpMyAdmin)?

    Yes. There are several tools. Some are commercial some not.
    - MongoDB Compass
    - Robomongo
    - MongoBooster

So let's back to explanation about MongoDB.

MongoDB as a document database. In case of MongoDB we're storing documents which are in JSON notatnion.


(This is a little lie, because they are physically stored as BSON (Binary JSON) sorry for that :))

MongoDB stores documents in containers named collections. MongoDB allows documents in collections to have different shape. Of course you can have nested documents in collection. You can't join documents across collections. MongoDB doesn't support transactions as well.

By the way maybe you're familiar with LAMP acronym (Linux Apache MySQL PHP). Nowadays there is a new acronym MEAN (MongoDB, Express, Angular, NodeJs).

This is only an introduction to an introduction of MongoDB. If you're interested in MongoDB there is MongoDB University page. It provides free online courses which can help you to discover and udnerstand MongoDB. I encourage you to try it.

I hope my explanation will be helpful for you. If you had more questions just ask me.

jvarness profile image
Jake Varness • Edited

How often is MongoDB used nowadays with the rise in popularity of PostgreSQL? Is the MEAN stack obsolete with the rise in popularity of other technologies like AWS, Azure, and Heroku, and frontends like React and Vue?

rafalpienkowski profile image
Rafal Pienkowski

How often is MongoDB used nowadays with the rise in popularity of PostgreSQL?

In my opinion we shouldn't compare NoSQLs like MongoDB with relational database systems. MongoDB isn't silver bullet for problems with database performance. In my opinion MongoDB is high performance in terms on reads and writes (and it also depends on data model) but it doesn't apply to scenarios which contain data aggregation and/or transactions.

Great example of MongoDB usage is as a persistent store in RabbitMQ. It fits all requirements for storing messages. But MongoDB is unsuitable for any king of transactional systems.

I personally faced the problem that customers don't trust MongoDB and they want to keep traditional databases like PostgreSQL. That in my opinion stops expansion of MongoDB. Please keep in mind that I'm not saying that we should throw away relational databases and replace it with NoSQLs.

Here is a list of MongoDB customers from official site. It's possible that you're using MongoDB without awareness (like in example with RabbitMQ).

Is the MEAN stack obsolete with the rise in popularity of other technologies like AWS, Azure, and Heroku, and frontends like React and Vue?

Maybe the peak of popularity of MEAN is behind us. MEAN as a concept was introduced in 2013. I agree that especially frontend technologies are changing rapidly (2-3 years for a frontend framework is an age). So nowadays React and/or Vue became popular too. That gives us ME R N or ME V N but it doesn't sound so nice like MEAN :)

AWS, Azure, Heroku are only platforms. For example you can ithout problem you can host your MEAN solution on Azure. You can create and host Node.js app use an Express as a backend framework, an Angular as a frontend framework and communicate with MongoDB or CosmosDB with exposed MongoDB API without any problems.

Please remember that are only my opinions. You can disagree with all my opinions, especially about frameworks lifecycle or MongoDB future. I'm not a technology oracle :)

Thread Thread
jvarness profile image
Jake Varness

Oh no, that's what I was wanting to get. I just wanted to hear from your experience if certain parts of that stack feel like they are showing their age a little bit or if you think they can still be considered modern.

I have a book that I bought like 3 years ago about Mongo, Angular, and Node, but it's been amazing to see how rapidly those platforms have evolved. Angular in plain ol JavaScript is aging with the rise of TypeScript and Dart. Wasn't sure if people also felt the same way about Mongo.