🔅Case-study on how industries are using MongoDB.

Rishabh
6 min readMay 13, 2021

What is MongoDB?

According to Wikipedia, MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).

In other words: MongoDB is an open-source document database built on a horizontal scale-out architecture. Founded in 2007, MongoDB has a worldwide following in the developer community.
Instead of storing data in tables of rows or columns like SQL databases, each row in a MongoDB database is a document described in JSON, a formatting language.
Here’s a simple JSON document describing contact information:

Document databases are extremely flexible, allowing variations in the structure of documents and allowing storage of documents that are partially complete. One document can have others embedded in it. Fields in a document play the role of columns in a SQL database, and like columns, they can be indexed to increase search performance.
Best of all for many developers, the programmer can change the structure of the database easily as needs change. Some say this turns data into code.

From its founding, MongoDB was built on a scale-out architecture, a structure that allows many small machines to work together to create systems that are fast and handle huge amounts of data.

MongoDB has always focused on providing developers an excellent user experience, which, in addition to all its other properties, has made MongoDB a favorite of developers worldwide for a huge variety of applications.

Why Use MongoDB?

MongoDB is a document database built on a scale-out architecture that has become popular with developers of all kinds who are building scalable applications using agile methodologies.

MongoDB was built for people who are building internet and business applications who need to evolve quickly and scale elegantly. If you are doing that, you should consider MongoDB.

Companies and development teams of all sizes use MongoDB because:

  • The document data model is a powerful way to store and retrieve data that allows developers to move fast.
  • MongoDB’s horizontal, scale-out architecture can support huge volumes of both data and traffic.
  • MongoDB has a great user experience for developers who can install MongoDB and start writing code immediately.
  • MongoDB can be used everywhere by anyone:
  • For free through the open source community edition
  • In the largest data centers through the enterprise edition
  • In any of the major public clouds through MongoDB Atlas
  • MongoDB has developed a large and mature platform ecosystem, which means: MongoDB has a worldwide community of developers and consultants, so it is easy to get help.
    MongoDB works on all types of computing platforms, both on-premise and in the cloud (both private, and public clouds such as AWS, Azure, and Google Cloud)
  • MongoDB can be used from all major languages.
  • MongoDB can be accessed from all major ETL and data management systems.
  • MongoDB has enterprise-grade support.

The Power of Document-oriented Databases

The name Mongo is a slice of the word humongous.

The database has its roots in the frustrations of Dwight Merriman, Eliot Horowitz, and Kevin Ryan, who co-founded MongoDB in NYC in 2007 after they struggled to build web-scale applications for DoubleClick, one of the pioneers of digital advertising technology that eventually became a part of Google.

The founders wanted to build a database that developers would love, a database that would break through the barriers in Relational Database Management Systems (RDBMS) that use the SQL query language.

Why do Developers Love MongoDB?

A multitude of new databases is created every year. MongoDB has become one of the most popular in the world because developers really like using it to store, manage, and retrieve data when creating applications.

To understand whether MongoDB is right for you, let’s look at why developers like MongoDB so much.

The Power of Document-oriented Databases

MongoDB is the pioneer of what has come to be called NoSQL databases, which developed because RDBMS systems based on SQL did not support the scale or rapid development cycles needed for creating modern applications.

NoSQL is an umbrella term; it includes document-oriented databases like MongoDB, columnar databases, in-memory databases, and more.

The “documents” in MongoDB are JSON and BSON files.

JSON is powerful for many reasons:

  • It is a natural form to store data.
  • It is human readable.
  • Structured and unstructured information can be stored in the same document.
  • You can nest JSON to store complex data objects.
  • JSON has a flexible and dynamic schema, so adding fields or leaving a field out is no problem.

Perhaps most importantly, the structure of the information is under the control of the developer. Developers adjust and reformat the database as the application evolves without the help of a database administrator. When needed, MongoDB can coordinate and control changes to the structure of documents using schema validation.

MongoDB created Binary JSON format (BSON) to increase efficiency and support more data types. Data stored in BSON can be searched and indexed, tremendously increasing performance. MongoDB supports a wide variety of indexing methods including text, decimal, geospatial, and partial.

Geospatial tagging was added so that documents can be queried by location.

Main-Features:

⚙Ad-hoc queries

⚙Indexing

⚙Replication

⚙Load balancing

⚙File storage

⚙Aggregation

⚙Capped collections

⚙Transactions

CASE-STUDY: MTV Networks on MongoDB

MTV Networks owns and operates hundreds of high-traffic web properties, including spike.com, gametrailers.com, thedailyshow.com, comedycentral.com, and nike.com. These properties evolved independently using a variety of languages, frameworks, and data models MTV chose MongoDB as the data store for a new unified Java-based content management system (CMS), taking advantage of its document data model and flexible schema.

The Problem:

MTV’s web properties were originally built on a commercial, Java-based content management system that forced rich documents into an ill-suited data model. The team evaluated migrating to a relational model for a new CMS, but the diversity of web properties posed a major roadblock. Adding new data types and tables to the schema significantly dampened read performance and other operations. After struggling with this architecture, which limited the evolution and success of their system, MTV began looking for a database solution that could grow, scale, and represent data flexibly as they brought additional content brands onto the platform.

Why MongoDB?

Flexibility

MongoDB’s document storage model allows MTV to store hierarchical data (like TV episodes within a series) easily, without requiring expensive queries to build pages. MongoDB’s inherently flexible schema allows MTV to concisely model the structures and data elements required by each brand.

Queries and Indexing

rich querying capabilities of MongoDB provided a combination of features unavailable in pure key-value stores, PDBMS or the previous system. No other databases provides an efficient way to query nested content — a hallmark of a document schema. MTV found querying nested data in MongoDB easy to understand and incredibly fast.
With their previous system, all data fields had to be indexed regardless of whether they were ever queried. This led to significant wasted storage space, and unnecessary latency during updates. With MongoDB MTV can build indexes selectively, achieving high query performance and efficient use of space.

Ease of Operations

The MTV team has deep experience developing for and operating relational technologies, and found that this knowledge mapped MongoDB. The previously deployed system was difficult to cluster, requiring shared disk storage for all
cluster members. In contrast, M1 found MongoDB’s replica sets, which do not required shared disk storage, far simpler to scale via database clustering, With replica sets. each MongoDB server acts independently, and requires only local storage.

“According to Jeff Yemin of MTV, ‘From an operational perspective, [MongoDB] feels very much like MySQL, so our systems and DBA groups are quite comfortable managing the deployment”

Results

MongoDB’s document data model enabled MTV’s content management team to build a solution that can meet the needs of each of their web properties generically, while simplifying day to day operations. This lets development team focus on building features for the end user instead of back-end storage.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Rishabh
Rishabh

Written by Rishabh

Student from B.tech 2nd Year, A proud ARTH learner, love new technologies, Curious about many thing, likes to explore places, love eating pizza and much more.

No responses yet

Write a response