MongoDB — Most Relevant Database Used In Industries ..

Use Case of MongoDB ..


Hello All … This is Pritee and I am come with new article and that is Industry use case of MongoDB. So let’s get started..

In today’s rapidly increasing database market, it is important to select the right database. Although RDBMS databases like SQL, Oracle, Postgres are there, but the NOSQL databases like MongoDB, Cassendra, HBase grows rapidly.

MongoDB is the preferred database of leading enterprises and powers up products and solutions at various establishments including AstraZeneca, Adobe, ebay, Electronic Arts, SAP, CISCO, Google, Verizon and the Royal Bank of Scotland.

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 stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB is a tool in the Databases category of a tech stack.

The fastest-growing database technology helps organizations across many industries to create applications. MongoDB was built for people who are building internet and business applications who need to evolve quickly and scale elegantly.

The collections are stored physically in a MongoDB database:


_id: ObjectId(7ef12a67d21c)

username: ‘’,

password: ‘password’


The MongoDB database is developed and managed by MongoDB. It also provides official driver support for all the popular languages like C, C++, C#, and .Net, Go, Java, Node.js, Perl, PHP, Python, Motor, Ruby, Scala, Swift, Mongoid. So, that you can create an application using any of these languages. Nowadays there are so many companies that use MongoDB like Facebook, Nokia, eBay, Adobe, Google, etc. to store their large amount of data.

How it Works… ?

As we know that MongoDB is a database server and the data is stored in these databases. Or in other words, MongoDB environment gives you a server that you can start and then create multiple databases on it using MongoDB.

  • The MongoDB database contains collections just like the MYSQL database contains tables. You are allowed to create multiple databases and multiple collections.
  • Now inside of the collection we have documents. These documents contain the data we want to store in the MongoDB database and a single collection can contain multiple documents and you are schema-less means it is not necessary that one document is similar to another.
  • The documents are created using the fields. Feilds are key-value pairs in the documents, it is just like columns in the relation database. The value of the fields can be of any BSON data types like double, string, boolean, etc.
  • The data stored in the MongoDB is in the format of BSON documents. Here, BSON stands for Binary representation of JSON documents. Or in other words, in the backend, the MongoDB server converts the JSON data into a binary form that is known as BSON and this BSON is stored and queried more efficiently.
  • In MongoDB documents, you are allowed to store nested data. This nesting of data allows you to create complex relations between data and store them in the same document which makes the working and fetching of data extremely efficient as compared to SQL. In SQL, you need to write complex joins to get the data from table 1 and table 2. The maximum size of the BSON document is 16MB.

NOTE: In MongoDB server, you are allowed to run multiple databases.

Features of MongoDB :

  • Schema-less Database :

It is the great feature provided by the MongoDB. A Schema-less database means one collection can hold different types of documents in it. Or in other words, in the MongoDB database, a single collection can hold multiple documents and these documents may consist of the different numbers of fields, content, and size. It is not necessary that the one document is similar to another document like in the relational databases. Due to this cool feature, MongoDB provides great flexibility to databases.

  • Document Oriented :

In MongoDB, all the data stored in the documents instead of tables like in RDBMS. In these documents, the data is stored in fields(key-value pair) instead of rows and columns which make the data much more flexible in comparison to RDBMS. And each document contains its unique object id.

  • Indexing :

In MongoDB database, every field in the documents is indexed with primary and secondary indices this makes easier and takes less time to get or search data from the pool of the data. If the data is not indexed, then database search each document with the specified query which takes lots of time and not so efficient.

  • Scalability :

MongoDB provides horizontal scalability with the help of sharding. Sharding means to distribute data on multiple servers, here a large amount of data is partitioned into data chunks using the shard key, and these data chunks are evenly distributed across shards that reside across many physical servers. It will also add new machines to a running database.

  • Replication :

MongoDB provides high availability and redundancy with the help of replication, it creates multiple copies of the data and sends these copies to a different server so that if one server fails, then the data is retrieved from another server.

  • Aggregation :

It allows to perform operations on the grouped data and get a single result or computed result. It is similar to the SQL GROUPBY clause. It provides three different aggregations i.e, aggregation pipeline, map-reduce function, and single-purpose aggregation methods

  • High Performance :

The performance of MongoDB is very high and data persistence as compared to another database due to its features like scalability, indexing, replication, etc.

Why do Developers Love MongoDB..?

  • It is a schema-less NoSQL database. You need not to design the schema of the database when you are working with MongoDB.
  • It does not support join operation.
  • It provides great flexibility to the fields in the documents.
  • It contains heterogeneous data.
  • It provides high performance, availability, scalability.
  • It supports Geospatial efficiently.
  • It is a document oriented database and the data is stored in BSON documents.
  • It also supports multiple document ACID transition(string from MongoDB 4.0).
  • It does not require any SQL injection.
  • It is easily integrated with Big Data Hadoop

Drawbacks Of MongoDB :

  • It uses high memory for data storage.
  • You are not allowed to store more than 16MB of data in the documents.
  • The nesting of data in BSON is also limited.

Use Cases :

Apervita :

With MongoDB, vital healthcare data stays accessible AND secure

Medicine is, at heart, a data problem. Diagnosis and treatment need as full a picture as possible, but that picture is painted from some of the most intimate, private details of a patient’s life. These must be protected from misuse. They must also be immediately accessible to the caregivers and decision-makers. Squaring that circle of accessibility and security is one of the great issues of modern-day digital life.

Apervita is a specialist cloud-based health infrastructure company that exists precisely to enable the safe communication of records, contracts, and other documents between stakeholders.

A MongoDB customer for over seven years, the company adopted document-based database technology because a document model better fits healthcare industry data. In 2018, Apervita made the decision to migrate its entire platform onto MongoDB Atlas on AWS.

The challenge regarding technology architecture design within the healthcare industry is twofold. First, you must account for and maintain compliance in the face of ever more stringent regulations. Second, you need to be cognizant that the wealth of personally identifiable information (PII) in medical records poses an enticing target for malicious cybercriminals. The question of how to secure such databases led to a fundamental architectural decision, as Apervita CTO Michael Oltman says.

‘Only the client can see the data’

“Healthcare is about networking data between and within the clinical and insurance parts of the industry, passing patient records and providing metrics to ensure value,” he says. “Obviously, that data needs to be encrypted when at rest in storage or when in-flight, and most standard relational database models provide that. The server side decrypts the data to work on it, with a separate system securing it when delivering it to clients.”

But that isn’t secure against many breaches, where an attacker can access the data when it’s being processed within the server. A better model, Oltman says, is for the data to stay encrypted until it reaches the client.

“Client-side field-level encryption means only the client can see the data,” he explains. “At no other point — including during database administration, backups or transfer — does the data exist unencrypted. An attacker without the right keys to a particular dataset can’t see anything human-readable, as it’s ciphertext at all times outside the client.”

“We wanted to add external keys to eliminate that single-breach model,” says Oltman. By building the system in partnership, Apervita could contribute to the beta testing, the documentation, and integration challenges, with direct reference to its actual data use.

“We give the users a master key, so they can encrypt every field in their databases, and then we destroy our copy of that key. That adds a whole new level of security, which is exactly what the industry needs,” he says. “If you have 50 technologists, 25 are worried about security and how it integrates with what they’re doing. Move that to the client, and they’re free to innovate without worrying about the database implications.”

Having that functionality as an intrinsic part of the database client was the only way to make it work, argues Oltman. “Imagine bringing it in as a separate service, as a third-party solution. Imagine the refactoring it would need.”

Focus on building secure applications without expending additional engineering time..

📝MongoDB’s close relationship with AWS as a platform meant that client key management could be handled by AWS’s own Key Management Service, considerably easing compliance and verification requirements.

“We’ve ended up with a nuclear launch-code level of security,” Oltman says. “To get access, you need our key, their key, as well as the server and the client. We can’t give access away if we don’t have it. We provide the data and ways to use it, but we can’t see it.”

The system is based around standard open-source crypto libraries and OS-integrated services, and Apervita’s provisioning is further secured by following best practices for virtual networks, security firewalls, and tight entitlement controls.

“Everything is behind controlled doors,” Oltman says. “Our default position is that the worst that can happen from our side is that the data is lost — and that’s it. It’s not disclosed. Our clients are fine with that. It’s a relief that they’re the source of record. We aren’t the official source of the data. We’re more than happy to work on other recovery procedures, but as standard, the data with us is completely secure.”

As for the performance implications of multiple-key encryption and management, Oltman says, there is a modest worst-case hit of 10 to 15 percent in throughput.

“It works at scale, it works with the tools that developers understand, and it removes a huge layer of concern and management of security.”

Michael Oltman, Chief Technology Officer, Apervita

By utilizing this, customers can focus on building secure applications without expending engineering time to secure where the data resides outside of their app.

Outside of its work with Apervita, MongoDB has grown the client-side field-level encryption capability to work on multiple cloud providers and 19 platforms, with around 15 languages supported, standard libraries, and copious custom access control and key management options. The system can be built into an application in minutes without the developer needing domain expertise.

MongoDB Client-Side Field Level Encryption is available wherever you run MongoDB 4.2 whether that’s the Atlas fully-managed cloud service, or in your own data center with Enterprise Advanced, or the Community server. Additionally, Apervita recently announced a Deep Encryption™ feature, becoming the first healthcare company to offer this level of encryption technology. They can easily enable this feature for any of the 2,500+ hospitals already on the Apervita platform, helping protect the most sensitive workloads in the industry.

MongoDB Realm :

Build better apps faster with edge-to-cloud sync and fully managed backend services including triggers, functions, and GraphQL.


Innovate. Iterate. Get to great, faster. Build best-in-class apps across Android, iOS, and web with MongoDB Realm’s intuitive app development services.

DATA SYNC CAN BE SIMPLE, Build it fast, Build it right,
Build it with Realm

MongoDB Realm Provides

Simplify data sync

Automatically sync data from the Realm Mobile Database to MongoDB Atlas whenever devices are online — no error handling needed.

Data consistency and app reliability are guaranteed.

Build apps faster

Using MongoDB Realm Sync means no conflict resolution code, no need for an ORM, and no standing up servers.

That’s thousands of lines of code you won’t need to maintain long term.

Optimize for mobile

On mobile, speed, battery life, and data usage matter.

Using Realm’s Mobile Database and Sync ensures apps run fast, work offline, and won’t drain a device’s battery or hog data.

That’s All from my side …

I hope this will help you to learn more about MongoDB and there use cases.

If you like it then clap and share and want to connect with me then below is my Linked In profile Link..

Thank You So much For Spending some time for reading this Article..

See you soon..



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store