0% found this document useful (0 votes)
13 views

Big Data MongoDB

Uploaded by

Aijaz Chopan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Big Data MongoDB

Uploaded by

Aijaz Chopan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

What is MongoDB?

•MongoDB the most popular NoSQL database, is an open-source


document-oriented database.
•The term ‘NoSQL’ means ‘non-relational‘.
•It means that MongoDB isn’t based on the table-like relational
database structure but provides an altogether different mechanism for
the storage and retrieval of data.
• This format of storage is called BSON ( similar to JSON format). A simple
MongoDB document Structure:

{
title: ‘Big Data',
by: ‘Aijaz Ahmad',
url: 'https://www.bigdata.org',
type: 'NoSQL'
}
What is MongoDB?
• MongoDB is an open-source document-oriented database that
is designed to store a large scale of data and also allows you to
work with that data very efficiently.
• It is categorized under the NoSQL (Not only SQL) database because the
storage and retrieval of data in the MongoDB are not in the form of
tables.
• The MongoDB database is developed and managed by
MongoDB.Inc under SSPL(Server Side Public License) and
initially released in February 2009.
• 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 used MongoDB like
Facebook, Nokia, eBay, Adobe, Google, etc. to store their large amount
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.
Features of MongoDB
• 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.
Features of MongoDB
• 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.
Where do we use MongoDB?

• MongoDB is preferred over RDBMS in the following scenarios:


• Big Data: If we have huge amount of data to be stored in tables,
think of MongoDB before RDBMS databases. MongoDB has built-
in solution for partitioning and sharding our database.
• Unstable Schema: Adding a new column in RDBMS is hard
whereas MongoDB is schema-less.
• Adding a new field does not effect old documents and will be
very easy.
• Distributed data Since multiple copies of data are stored
across different servers, recovery of data is instant and safe
even if there is a hardware failure.
MongoDB Examples
• MongoDB has its fans, and here are a few examples of organizations or
companies that use the database.
• Aadhar. India’s Unique Identification project boasts the largest
biometric database in the world.
• The Aadhar Project uses MongoDB to store the massive demographic
and biometric data of over 1.2 billion Indians. Aadhar also uses
MongoDB to store project images.
• eBay. The popular online auction site uses MongoDB for projects such
as cloud management, metadata storage, search suggestions, and
merchandise categorization.
• Shutterfly. This well-known Internet-based photo-sharing company has
over 6 billion images and a transaction rate of up to 10,000 operations
per second. Shutterfly moved from Oracle to MongoDB, as it found the
non-relational database more suited to their needs.
• Electronic Arts. EA uses MongoDB for FIFA Online 3, their popular
Advantages of 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
Disadvantages of MongoDB
• It uses high memory for data storage.
• You are not allowed to store more than 16MB data in the
documents.
• The nesting of data in BSON is also limited you are not
allowed to nest data more than 100 levels.

You might also like