際際滷

際際滷Share a Scribd company logo
MongoDB
What is mongoDB
MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing
that you need
1.MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document
and data structure can be changed over time
2.The document model maps to the objects in your application code, making data easy to work with
3.Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and analyze your data
Why use MongoDB?
1. MongoDB stores documents (or) objects and Now-a-days, everyone works with objects
(Python/Ruby/Java/etc.)
2. Scalable High-Performance Open-source, Document-orientated database.
3. Built for Speed & Rich Document based queries for Easy readability.
4. Full Index Support for High Performance.
5. Replication and Failover for High Availability.
6. Auto Sharding for Easy Scalability & Map / Reduce for Aggregation.
What is MongoDB great for?
1. Semi-structured Content Management.
2. Real-time Analytics & High-Speed Logging.
What is MongoDB not great for?
1. Highly Transactional Applications.
2. Problems requiring SQL.
How mongoDB differs from traditional dbs ?
SQL Database
Relational database
Supports SQL query language
Table , Row and Column based
Support foreign key and triggers
Emphasizes on ACID properties (Atomicity, Consistency,
Isolation and Durability)
SQL Database
Relational database
Supports SQL query language
Table , Row and Column based
Support foreign key and triggers
Emphasizes on ACID properties (Atomicity, Consistency,
Isolation and Durability)
Analogy of MongoDB with traditional dbs
Database
Table
Record/row
Column
Index
Join
Foreign Key
Partition
Database
Table
Record/row
Column
Index
Join
Foreign Key
Partition
Query Operators
$eq
$gt, $gte
$lt, $lte
$ne
$in
$nin
$or $and $not $nor
$exists
$eq
$gt, $gte
$lt, $lte
$ne
$in
$nin
$or $and $not $nor
$exists
MongoDB: CAP approach
Consistency
1. all replicas contain the same version of the data
Availability
1. system remains operational on failing nodes
Partition tolarence
1. multiple entry points
2. system remains operational on system split
BSON format
Binary-encoded serialization of JSON-like documents
1.Zero or more key/value pairs are stored as a single entity
2. Each entry consists of a field name, a data type, and a value
3. Large elements in a BSON document are prefixed with a length field to facilitate scanning
Work with mongo
mongod
1. mongod is the primary daemon process for the MongoDB system. It handles data requests, manages data access,
and performs background management operations.
Mongos
1. mongos for MongoDB Shard, is a routing service for MongoDB shard configurations that processes queries
from the application layer, and determines the location of this data in the sharded cluster
Crud in MongoDB
 show dbs; (will list out the database that present in the mongodb)
 use exampledb; (will switch or create new database)
 Db.CreateCollection();
 Db.collectionName.Insert({key:value});
 Db..collectionName.remove({key:value})
 db.inventory.find( { id: value" } )
 db.dropDatabase();
Map  Reduce Functionality
Map (Key , Value) -> Reduce ()-> Final Output
Introduction to Mongodb
Sharding in mongo
Sharding
It is a method for distributing data across multiple machines. MongoDB uses sharding to support deployments
with very large data sets and high throughput operations.
Scaling
1.Vertical Scaling
2.Horizontal Scaling
Sharded Cluster
A MongoDB sharded cluster consists of the following components:
Shard :
Each shard contains a subset of the sharded data. Each shard can be deployed as a replica set.
Mongos:
The mongos acts as a query router, providing an interface between client applications and the sharded cluster.
config servers :
Config servers store metadata and configuration settings for the cluster. As of MongoDB 3.4, config servers must
be deployed as a replica set (CSRS).
Chunks : MongoDB partitions sharded data into chunks. Each chunk has an inclusive lower and exclusive
upper range based on the shard key
Shard Keys : To distribute the documents in a collection.
references
1. http://docs.mongodb.org/manual/tutorial/getting-started/
2. https://www.tutorialspoint.com/mongodb/mongodb_overview.htm
3. http://www.c-sharpcorner.com/article/overview-of-mongodb/
Questions?
Thank You

More Related Content

What's hot (20)

PPTX
CMS Mongo DB
Srineel Mazumdar
PDF
MongoDB - An Introduction
sethfloydjr
PPTX
MongoDB presentation
Hyphen Call
PPT
performance analysis between sql ans nosql
RUFAI YUSUF
PDF
Mongo db a deep dive of mongodb indexes
Rajesh Kumar
PPT
Intro to mongo db
Chi Lee
PPTX
Mongo db Quick Guide
Sourabh Sahu
PDF
Polylog: A Log-Based Architecture for Distributed Systems
Kamil Sindi
PPTX
Mongo db workshop # 02
FarhatParveen10
PDF
JSON Application
Lin Tzu Cheng
DOCX
MongoDB DOC v1.5
Tharun Srinivasa
PPT
Introduction to mongodb
neela madheswari
PPTX
Analytical data processing
Polad Saruxanov
PPTX
MongoDB: An Introduction - june-2011
Chris Westin
PPTX
Introduction to MongoDB
NodeXperts
PPTX
Mongo db
AbhiKhurana8
PDF
Beginner's guide to Mongodb and NoSQL
Maulin Shah
PPTX
MongoDB Schema Design by Examples
Hadi Ariawan
PDF
Storage dei dati con MongoDB
Andrea Balducci
PPTX
MongoDB
nikhil2807
CMS Mongo DB
Srineel Mazumdar
MongoDB - An Introduction
sethfloydjr
MongoDB presentation
Hyphen Call
performance analysis between sql ans nosql
RUFAI YUSUF
Mongo db a deep dive of mongodb indexes
Rajesh Kumar
Intro to mongo db
Chi Lee
Mongo db Quick Guide
Sourabh Sahu
Polylog: A Log-Based Architecture for Distributed Systems
Kamil Sindi
Mongo db workshop # 02
FarhatParveen10
JSON Application
Lin Tzu Cheng
MongoDB DOC v1.5
Tharun Srinivasa
Introduction to mongodb
neela madheswari
Analytical data processing
Polad Saruxanov
MongoDB: An Introduction - june-2011
Chris Westin
Introduction to MongoDB
NodeXperts
Mongo db
AbhiKhurana8
Beginner's guide to Mongodb and NoSQL
Maulin Shah
MongoDB Schema Design by Examples
Hadi Ariawan
Storage dei dati con MongoDB
Andrea Balducci
MongoDB
nikhil2807

Similar to Introduction to Mongodb (20)

PPT
Mongodb Training Tutorial in Bangalore
rajkamaltibacademy
PDF
A Study on Mongodb Database.pdf
Jessica Navarro
PDF
MONGODB VS MYSQL: A COMPARATIVE STUDY OF PERFORMANCE IN SUPER MARKET MANAGEME...
ijcsity
PDF
MONGODB VS MYSQL: A COMPARATIVE STUDY OF PERFORMANCE IN SUPER MARKET MANAGEME...
ijcsity
PDF
MONGODB VS MYSQL: A COMPARATIVE STUDY OF PERFORMANCE IN SUPER MARKET MANAGEME...
ijcsity
PPTX
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
PPT
Introduction to MongoDB
Ravi Teja
PDF
Mongo db dhruba
Dhrubaji Mandal
PDF
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
PPTX
MongoDB by Emroz sardar.
Emroz Sardar
PPTX
Top MongoDB interview Questions and Answers
jeetendra mandal
PPTX
MongoDB.pptx
Aayush Chimaniya
PPTX
05201349_Unit_7_FSWD_ advanced learning.pptx
ozakamal8
PPTX
05201349_Unit_7_FSWD_II(1) with advance.pptx
ozakamal8
PPTX
05201349_Unit_7_FSWD_ advanced learning.pptx
ozakamal8
PPTX
05201349_Unit_7_FSWD_II(1) with advance.pptx
ozakamal8
PPTX
How to learn MongoDB for beginner's
surajkumartpoint
PDF
Mongo db halloween party
Andrea Balducci
PDF
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Laura Ventura
PDF
Introduction to MongoDB and its best practices
AshishRathore72
Mongodb Training Tutorial in Bangalore
rajkamaltibacademy
A Study on Mongodb Database.pdf
Jessica Navarro
MONGODB VS MYSQL: A COMPARATIVE STUDY OF PERFORMANCE IN SUPER MARKET MANAGEME...
ijcsity
MONGODB VS MYSQL: A COMPARATIVE STUDY OF PERFORMANCE IN SUPER MARKET MANAGEME...
ijcsity
MONGODB VS MYSQL: A COMPARATIVE STUDY OF PERFORMANCE IN SUPER MARKET MANAGEME...
ijcsity
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
Introduction to MongoDB
Ravi Teja
Mongo db dhruba
Dhrubaji Mandal
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
MongoDB by Emroz sardar.
Emroz Sardar
Top MongoDB interview Questions and Answers
jeetendra mandal
MongoDB.pptx
Aayush Chimaniya
05201349_Unit_7_FSWD_ advanced learning.pptx
ozakamal8
05201349_Unit_7_FSWD_II(1) with advance.pptx
ozakamal8
05201349_Unit_7_FSWD_ advanced learning.pptx
ozakamal8
05201349_Unit_7_FSWD_II(1) with advance.pptx
ozakamal8
How to learn MongoDB for beginner's
surajkumartpoint
Mongo db halloween party
Andrea Balducci
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Laura Ventura
Introduction to MongoDB and its best practices
AshishRathore72
Ad

Recently uploaded (20)

PDF
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
PPT
FINAL plumbing code for board exam passer
MattKristopherDiaz
PDF
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
PPT
SF 9_Unit 1.ppt software engineering ppt
AmarrKannthh
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
PPTX
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
PDF
惠惘惘 惺 悋惠忰 悋惆悋 惠惆 悋悋悄 忰 悴悋忰.pdf
忰惆 惶惶 惠惠悸
PDF
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
PDF
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
PPTX
Functions in Python Programming Language
BeulahS2
PPSX
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
PPTX
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
rr22001247
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
PDF
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
PDF
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
PPTX
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
PPTX
CST413 KTU S7 CSE Machine Learning Introduction Parameter Estimation MLE MAP ...
resming1
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
FINAL plumbing code for board exam passer
MattKristopherDiaz
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
SF 9_Unit 1.ppt software engineering ppt
AmarrKannthh
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
惠惘惘 惺 悋惠忰 悋惆悋 惠惆 悋悋悄 忰 悴悋忰.pdf
忰惆 惶惶 惠惠悸
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
Functions in Python Programming Language
BeulahS2
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
rr22001247
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
CST413 KTU S7 CSE Machine Learning Introduction Parameter Estimation MLE MAP ...
resming1
Ad

Introduction to Mongodb

  • 2. What is mongoDB MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need 1.MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time 2.The document model maps to the objects in your application code, making data easy to work with 3.Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and analyze your data
  • 3. Why use MongoDB? 1. MongoDB stores documents (or) objects and Now-a-days, everyone works with objects (Python/Ruby/Java/etc.) 2. Scalable High-Performance Open-source, Document-orientated database. 3. Built for Speed & Rich Document based queries for Easy readability. 4. Full Index Support for High Performance. 5. Replication and Failover for High Availability. 6. Auto Sharding for Easy Scalability & Map / Reduce for Aggregation.
  • 4. What is MongoDB great for? 1. Semi-structured Content Management. 2. Real-time Analytics & High-Speed Logging. What is MongoDB not great for? 1. Highly Transactional Applications. 2. Problems requiring SQL.
  • 5. How mongoDB differs from traditional dbs ? SQL Database Relational database Supports SQL query language Table , Row and Column based Support foreign key and triggers Emphasizes on ACID properties (Atomicity, Consistency, Isolation and Durability) SQL Database Relational database Supports SQL query language Table , Row and Column based Support foreign key and triggers Emphasizes on ACID properties (Atomicity, Consistency, Isolation and Durability)
  • 6. Analogy of MongoDB with traditional dbs Database Table Record/row Column Index Join Foreign Key Partition Database Table Record/row Column Index Join Foreign Key Partition
  • 7. Query Operators $eq $gt, $gte $lt, $lte $ne $in $nin $or $and $not $nor $exists $eq $gt, $gte $lt, $lte $ne $in $nin $or $and $not $nor $exists
  • 8. MongoDB: CAP approach Consistency 1. all replicas contain the same version of the data Availability 1. system remains operational on failing nodes Partition tolarence 1. multiple entry points 2. system remains operational on system split
  • 9. BSON format Binary-encoded serialization of JSON-like documents 1.Zero or more key/value pairs are stored as a single entity 2. Each entry consists of a field name, a data type, and a value 3. Large elements in a BSON document are prefixed with a length field to facilitate scanning
  • 10. Work with mongo mongod 1. mongod is the primary daemon process for the MongoDB system. It handles data requests, manages data access, and performs background management operations. Mongos 1. mongos for MongoDB Shard, is a routing service for MongoDB shard configurations that processes queries from the application layer, and determines the location of this data in the sharded cluster
  • 11. Crud in MongoDB show dbs; (will list out the database that present in the mongodb) use exampledb; (will switch or create new database) Db.CreateCollection(); Db.collectionName.Insert({key:value}); Db..collectionName.remove({key:value}) db.inventory.find( { id: value" } ) db.dropDatabase();
  • 12. Map Reduce Functionality Map (Key , Value) -> Reduce ()-> Final Output
  • 14. Sharding in mongo Sharding It is a method for distributing data across multiple machines. MongoDB uses sharding to support deployments with very large data sets and high throughput operations. Scaling 1.Vertical Scaling 2.Horizontal Scaling
  • 15. Sharded Cluster A MongoDB sharded cluster consists of the following components: Shard : Each shard contains a subset of the sharded data. Each shard can be deployed as a replica set. Mongos: The mongos acts as a query router, providing an interface between client applications and the sharded cluster. config servers : Config servers store metadata and configuration settings for the cluster. As of MongoDB 3.4, config servers must be deployed as a replica set (CSRS).
  • 16. Chunks : MongoDB partitions sharded data into chunks. Each chunk has an inclusive lower and exclusive upper range based on the shard key Shard Keys : To distribute the documents in a collection.