mongodb

An Overview of MongoDB

By May 31, 2018 August 18th, 2022 No Comments

It’s no secret that NoSQL databases have gained tremendous ground over relational databases in the last decade. A primary driver for this is the huge amount of data generated today from sources we never would have dreamed of two decades ago. Cell phones, mobiles applications, and social media alone created the need to handle massive amounts of data from many different sources and with multiple different structures. This data works best with “schemaless” databases, like the many document store and/or key value store NoSQL databases that exist today.

MongoDB has been leading that pack of NoSQL document store databases for most of the last 4 years.

According to DB-Engines ranking, there are now 45 document store specific datastores listed by DB-Engines.

So now let’s talk quickly about MongoDB in general before talking specifics around scaling in MongoDB and why we at ObjectRocket are able to run hosted MongoDB database services for our customers at truly massive scale using different methodologies depending on their application needs, workloads, and activity patterns.

What is MongoDB?

Introduced in 2009, MongoDB is the top NoSQL document database. A document store database is a database that stores data as documents. It is used for various workloads by a wide range of companies including Google, Facebook, TheChive, UPS, Braze, Cisco, Electronic Arts, and many more.

Why Use MongoDB?

MongoDB and similar NoSQL databases allow for faster, more flexible development cycles that help lower software and deployment costs. Additionally, developers love the schemaless aspect where they are not forced into more rigid structures like they are with relational databases. MongoDB meets the need for flexible data models that serve unstructured, semi-structured, and structured data types.

There are several additional reasons to use MongoDB instead of other document store DBs:

  • MongoDB meets the need for flexible and scalable architectures that are built from the ground up as fault tolerant clusters with redundancy. It provides this high availability via multi-member replica sets that use a PRIMARY/SECONDARY relationship where writes and reads go to the PRIMARY by default.
  • MongoDB with its native BSON format and JSON extensions supports many more programming languages (27) versus some of its competitors like Cassandra (13) and Couchbase (14)
  • MongoDB provides robust indexing capabilities including secondary indexes and index intersection to cover a wide variety of queries.
  • MongoDB includes a powerful Aggregation Pipeline that allows for data transformations along the way.
  • MongoDB has also begun implementing features such as retryable writes and change streams in their march towards ACID compliance for Multi-Document Transactions, expected to be available later this summer. (We’ll keep you posted.)

Good General Uses MongoDB

  • Highly unstructured data (no need for a rigid, defined schema)
  • Lots of data
  • High write activity
  • Balancing writes and reads/queries
  • Desire for duplicate or denormalization

Specific Use Cases for MongoDB

  • Mobile and mobile analytics
  • Catalog data and inventory
  • Content management
  • Social media user data
  • Game user data
  • Internet of Things (IoT)
  • Augmented reality (AR), Virtual reality (VR), and MR related applications
  • Core and off-chain datastores that support blockchain initiatives

What about searching through and managing all of that data? In a performant way? That’s where scaling comes in. In an upcoming blog, we’ll cover when the time is right to scale and two approaches to scaling MongoDB. 

Ready to start a conversation to see if MongoDB is right for your application and use case? Schedule a call with our database experts.