SlideShare a Scribd company logo
1
Open source, High performance, Document oriented
Albin John
S5 MCA
NO:04
NIELIT Calicut
2
Need of MongoDB
Relational vs. NoSQL Comparison
 What is MongoDB?
MongoDB Key Features
3
• To understand we need to look at
• BigData
• NoSQL
4
• Massive volume of both structured and
unstructured data , which is difficult to process
using traditional database and software
techniques.
5
• Approximately 90 percent of all the real-time
information being created today is unstructured data.
• Every day 2.5 quintillion (1018) bytes of data are being
generated.
• 90 percent of world's present day data has been
created in the two previous years alone.
6
• High Volume – amount of data
– Facebook take 500 terabytes of new data every day
• High Variety – range of data types and sources
– geospatial data, audio and video etc..
• High Velocity – speed of data in and out
– on-line gaming systems support millions of
concurrent users, each producing multiple inputs
per second
7
• Relational databases can scale and handle Big
Data but the effort is huge.
8
What is NoSQL
• Non-relational next generation databases
• Different data models (Not relational)
• A collection of very different products
• Most are not using SQL for queries
• No predefined schema
9
• Relational
• Divide into tables, relate into foreign keys, DB
constraints, normalized data, the Interface is SQL
• NoSQL
• Store in schemaless format, redundancy
encouraged,Interface varies and is optimized for the
implementation, no forced DB constraints.
10
Document DB
MongoDB, CouchDB
Wide Column– Column Family
Cassandra, HBASE, Amazon SimpleDB
Key Value
DynamoDB, Voldemort, MemcacheDB
Graph
Neo4J, OrientDB
Many many many, many more! (http://nosql-database.org/)
11
And now
let’s look at MongoDB
12
• MongoDB is an open-source NoSQL-Database developed by
10gen in C++.
• Developed in 2009
• It consists of set of databases
• In which each database contains multiple collections.
• Every collection can contain different types of objects
called document
• Every document is represented as a JSON structure: a list of
key-value pairs.
13
14
RDBMS MongoDB
Database Database
Table Collection
Row Document
15
16
Horizontally Scalable
-Sharding
Agile
Flexible
High Performance
Application
Highly
Available
-Replica Sets
{ author: “Albin John”,
date: new Date(),
text: “MongoDB”,
tags: [“database”,
“flexible”, “JSON”]}
17
• Data stored as documents (BSON)
• Schema free
• Dynamic Queries
• Capped collections
• Sharding (sometimes called partitioning) for
scalability
• Replication
18
• MongoDB does not need any defined data schema.
• Every document could have different data!
name: “jeff”,
eyes: “blue”,
height: 72,
boss: “ben”}
{name: “brendan”,
aliases: [“el diablo”]}
name: “ben”,
hat: ”yes”}
{name: “matt”,
pizza: “DiGiorno”,
height: 72,
boss: 555.555.1212}
{name: “will”,
eyes: “blue”,
birthplace: “NY”,
aliases: [“bill”, “la
ciacco”],
gender: ”???”,
boss: ”ben”}
19
• JSON (Java Script Object Notation)-exchange and store data
• schemaless
• Excellent performance
• MongoDB actually use BSON (Binary JSON).
20
• Work with data in BSON is same as in JSON.
• It is serialized into a special binary encoded format
21
• Run a query without planning for it in advance
• Like SQL queries in an RDBMS
• Wonder why listed as a feature?
• Not all NoSQL databases support dynamic queries
(CouchDB biggest “competitor”)
22
• Fixed-size collections called capped collections
• Use the db.createCollection command and marked it as
capped
//limit our capped collection to 2 megabyte
db.createCollection(’logs’, {capped: true, size: 2097152})
• When it reaches 2MB limit, old documents are
automatically removed
23
• Scale up, vertical scaling
Increasing server capacity (more CPU, RAM)
Managing is hard, possible down times
• Scale out, horizontal scaling
Adding servers
No single point of failure cause whole system (servers fail often, thus
replication)
24
• MongoDB provides horizontal scale-out for
databases using a technique called sharding
• MongoDB distributes data across multiple physical
partitions called shards(mongod).
25
Manual sharding :
application maintains connections to several completely
independent database servers
storing different data on different servers
querying against the appropriate server to get data back
Autosharding:
 which eliminates some of the administrative headaches of
manual sharding.
• It handles splitting up data and rebalancing automatically.
26
• Collections  smaller chunks
• Chunks distributed across shards
• Each shard is responsible for a subset of the total data
set
• Application don’t want to know what shard has what
data
• So run a routing process called mongos in front of the
shards
• It knows where all of the data is located, so applications
can connect to it
• It connected to a normal mongod
27
28
• Replication via replica set
• Replica sets distribute data across machines for
– redundancy
– automate failover
29
• It consist of
• exactly one primary node
• one or more secondary nodes
• It primary node can accept both reads and writes
• The secondary nodes are read-only
30
Replication
Read
Write
Read
Read
Driver
Primary
Priority 1
Secondary
Priority 1
Secondary
Priority 1
Secondary
Priority 0Read
31
Read
Write
Read
Read
Driver
Primary
Priority 1
Secondary
Priority 1
Secondary
Priority 1
Secondary
Priority 0Read
32
Read
Write
Read
Read
Driver
Primary
Priority 1
Secondary
Priority 1
Secondary
Priority 1
Secondary
Priority 0Read
I last synced
1 seconds ago
I last synced
3 seconds ago
33
Write
Read
Read
Driver
Primary
Priority 1
Primary
Priority 1
Secondary
Priority 1
Secondary
Priority 0Read
Automatic
Leader Election
34
Write
Read
Read
Driver
Secondary
Priority 1
Primary
Priority 1
Secondary
Priority 1
Secondary
Priority 0Read
Read
35
Primary
Secondary
Secondary
Primary
Secondary
Secondary
Primary
Secondary
Secondary
Primary
Secondary
Secondary
Key Range
0..30
Key Range
31..60
Key Range
61..90
Key Range
91.. 100
MongoS MongoS MongoS Config
Config
Config
Clients
36
• MongoDB is the database for today's applications:
– innovative
– fast time-to-market
– globally scalable
– inexpensive to operate
37
THANK YOU
FOR YOUR
ATTENTION
ANY
QUESTIONS?

More Related Content

PDF
MongoDB: The Operational Big Data by NORBERTO LEITE at Big Data Spain 2014
PDF
TCO Comparison MongoDB & Oracle
PDF
Mongo DB: Operational Big Data Database
PPTX
Benefits of Using MongoDB Over RDBMSs
PDF
TCO - MongoDB vs. Oracle
PDF
Webinar: Faster Big Data Analytics with MongoDB
PPTX
An Introduction to Big Data, NoSQL and MongoDB
PPTX
Webinar: An Enterprise Architect’s View of MongoDB
MongoDB: The Operational Big Data by NORBERTO LEITE at Big Data Spain 2014
TCO Comparison MongoDB & Oracle
Mongo DB: Operational Big Data Database
Benefits of Using MongoDB Over RDBMSs
TCO - MongoDB vs. Oracle
Webinar: Faster Big Data Analytics with MongoDB
An Introduction to Big Data, NoSQL and MongoDB
Webinar: An Enterprise Architect’s View of MongoDB

What's hot (20)

PPTX
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
PPTX
An Enterprise Architect's View of MongoDB
PDF
Overcoming Today's Data Challenges with MongoDB
PPTX
MongoDB Operations for Developers
PDF
Performance analysis of MongoDB and HBase
PPTX
Webinar: Enterprise Trends for Database-as-a-Service
PPTX
Maximizing MongoDB Performance on AWS
KEY
MongoDB vs Mysql. A devops point of view
PPT
MongoATL: How Sourceforge is Using MongoDB
PPTX
MongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
PPTX
Big Data: Guidelines and Examples for the Enterprise Decision Maker
PDF
Mongodb
PPTX
Introduction To MongoDB
PPTX
MongoDB introduction
PDF
Final_CloudEventFrankfurt2017 (1).pdf
PPTX
How Insurance Companies Use MongoDB
PDF
Intro to NoSQL and MongoDB
PPTX
How leading financial services organisations are winning with tech
ODP
Introduction to MongoDB
PPTX
Intro to Big Data and NoSQL
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
An Enterprise Architect's View of MongoDB
Overcoming Today's Data Challenges with MongoDB
MongoDB Operations for Developers
Performance analysis of MongoDB and HBase
Webinar: Enterprise Trends for Database-as-a-Service
Maximizing MongoDB Performance on AWS
MongoDB vs Mysql. A devops point of view
MongoATL: How Sourceforge is Using MongoDB
MongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
Big Data: Guidelines and Examples for the Enterprise Decision Maker
Mongodb
Introduction To MongoDB
MongoDB introduction
Final_CloudEventFrankfurt2017 (1).pdf
How Insurance Companies Use MongoDB
Intro to NoSQL and MongoDB
How leading financial services organisations are winning with tech
Introduction to MongoDB
Intro to Big Data and NoSQL
Ad

Similar to MongoDB (20)

PPTX
Big Data, NoSQL with MongoDB and Cassasdra
PDF
Introduction to MongoDB Basics from SQL to NoSQL
PPTX
Connect to NoSQL Database (MongoDB) using Node JS & Connect Node.js with NoSQ...
PPT
9. Document Oriented Databases
PPT
Wmware NoSQL
PPTX
Using MongoDB For BigData in 20 Minutes
PDF
No sq lv1_0
PDF
Baisc introduction of mongodb for beginn
PDF
20-NoSQLMongoDbiig data analytics hB.pdf
PPTX
Mongo db
PDF
MongoDB: What, why, when
PPTX
Mongo db intro.pptx
PPTX
NoSQL and MongoDB Introdction
PDF
MongoDB: a gentle, friendly overview
PPTX
MongoDB_ppt.pptx
PPTX
When to Use MongoDB
PPTX
MongoDB presentation
PDF
NoSQL on the move
KEY
NoSQL in the context of Social Web
Big Data, NoSQL with MongoDB and Cassasdra
Introduction to MongoDB Basics from SQL to NoSQL
Connect to NoSQL Database (MongoDB) using Node JS & Connect Node.js with NoSQ...
9. Document Oriented Databases
Wmware NoSQL
Using MongoDB For BigData in 20 Minutes
No sq lv1_0
Baisc introduction of mongodb for beginn
20-NoSQLMongoDbiig data analytics hB.pdf
Mongo db
MongoDB: What, why, when
Mongo db intro.pptx
NoSQL and MongoDB Introdction
MongoDB: a gentle, friendly overview
MongoDB_ppt.pptx
When to Use MongoDB
MongoDB presentation
NoSQL on the move
NoSQL in the context of Social Web
Ad

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Lesson notes of climatology university.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Institutional Correction lecture only . . .
PDF
01-Introduction-to-Information-Management.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Structure & Organelles in detailed.
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
master seminar digital applications in india
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPH.pptx obstetrics and gynecology in nursing
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Lesson notes of climatology university.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Final Presentation General Medicine 03-08-2024.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Institutional Correction lecture only . . .
01-Introduction-to-Information-Management.pdf
Pre independence Education in Inndia.pdf
Microbial disease of the cardiovascular and lymphatic systems
Cell Structure & Organelles in detailed.
Sports Quiz easy sports quiz sports quiz
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
102 student loan defaulters named and shamed – Is someone you know on the list?
master seminar digital applications in india

MongoDB