SlideShare ist ein Scribd-Unternehmen logo
1 von 15
DB
Analytical Data Processing
DB MongoDB is a cross-platform, document oriented database that provides, high
performance, high availability, and easy scalability. MongoDB works on concept of
collection and document.MongoDB is written in C++.
 MongoDB is a database program that is :
 Free – You don’t have to pay a price to use it in your application.
 Open Source – The source is open and open source community contributes to the
development of MongoDB database program.
 Cross Platform – MongoDB build on a platform (say Linux) works on other
platforms(Windows, MacOS, etc.) as well without any modification to the code.
 Document Oriented – MongoDB stores records in form of JSON like documents.
There are many advantages in doing so. A notable advantage is that adding new
features(columns in relational database) to the database requires no hassle.
 NoSQL (Not only SQL) – MongoDB uses document based databases where each
document is a key with complex value. The document value can contain multiple
key-value pairs.
DB LOOKS COMPARED TO SQL?
SQL: MONGODB:
DB LOOKS COMPARED TO SQL?
SQL: MONGODB:
DB
 MongoDB packs the advantages of NoSQL. NoSQL database concepts were
developed to make the applications more modern and fast. NoSQL databases
overcome the disadvantages of SQL.
 Structured Data – MongoDB can handle structured data(like a spread-sheet
or table), semi structured data and unstructured data (data with no rules,
examples are multimedia content).
 Agile Development – All the NoSQL features of MongoDB makes it perfect fit
for Agile methodology for developing applications. Modern applications are
designed to have fewer development time and quick updates to the ever
ending requirements.
 Scalability – MongoDB is horizontally scalable and thus can respond to the
increasing application requirements with less cost.
 Replication – You can setup replication of data between MongoDB instances.
When an instance goes down, other instance can handle the requests with
same data available.
 MapReduce – You can apply MapReduce algorithm on the MongoDB
Collections to pull out some useful reports.
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
DB MAP
REDUCE
Map-reduce is a data processing
paradigm for condensing large
volumes of data into useful
aggregated results. MongoDB uses
mapReduce command for map-reduce
operations. MapReduce is generally
used for processing large data sets.
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
REDUCE
Following is the syntax of the basic mapReduce
command −
The map-reduce function first queries the collection,
then maps the result documents to emit key-value
pairs, which is then reduced based on the keys that
have multiple values.
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
REDUCE
In the above syntax −
map is a javascript function that maps a value with a
key and emits a key-value pair
reduce is a javascript function that reduces or groups
all the documents having the same key
out specifies the location of the map-reduce query
result
query specifies the optional selection criteria for
selecting documents
sort specifies the optional sort criteria
limit specifies the optional maximum number of
documents to be returned
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
REDUCE
 Consider the following document structure storing user posts. The document
stores user_name of the user and the status of post.
 Now, we will use a mapReduce function on our posts collection to select all
the active posts, group them on the basis of user_name and then count the
number of posts by each user using the following code −
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
 The above mapReduce query outputs the following result −
 The result shows that a
total of 4 documents
matched the query
(status:"active"), the map
function emitted 4
documents with key-value
pairs and finally the reduce
function grouped mapped
documents having the same
keys into 2.
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
 To see the result of this mapReduce query, use the find operator −
 The above query gives the following result which indicates that both users tom
and mark have two posts in active states −
 In a similar manner, MapReduce queries can be used to construct large
complex aggregation queries. The use of custom Javascript functions make use
of MapReduce which is very flexible and powerful.
What is
MongoDB?
MongoDB-
MapReduce
MapReduce-
Command
Syntax of Mongo-
MapReduce
Using
MapReduce
SHARDING IN MONGODB
1st process
2nd process
Analytical data processing

Weitere Àhnliche Inhalte

Was ist angesagt?

Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
Shridhar Joshi
 

Was ist angesagt? (20)

MongoDB
MongoDBMongoDB
MongoDB
 
Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongo db intro.pptx
Mongo db intro.pptxMongo db intro.pptx
Mongo db intro.pptx
 
Mongodb @ vrt
Mongodb @ vrtMongodb @ vrt
Mongodb @ vrt
 
No sql
No sqlNo sql
No sql
 
Building a Directed Graph with MongoDB
Building a Directed Graph with MongoDBBuilding a Directed Graph with MongoDB
Building a Directed Graph with MongoDB
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
 
Introduction to Mongodb
Introduction to MongodbIntroduction to Mongodb
Introduction to Mongodb
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
Introduction to MongoDB (Webinar Jan 2011)
Introduction to MongoDB (Webinar Jan 2011)Introduction to MongoDB (Webinar Jan 2011)
Introduction to MongoDB (Webinar Jan 2011)
 
Using MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesUsing MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 Minutes
 
Mongo db present
Mongo db presentMongo db present
Mongo db present
 
Mongodb basics and architecture
Mongodb basics and architectureMongodb basics and architecture
Mongodb basics and architecture
 
Mongodb
MongodbMongodb
Mongodb
 
Mongodb tutorial at Easylearning Guru
Mongodb tutorial  at Easylearning GuruMongodb tutorial  at Easylearning Guru
Mongodb tutorial at Easylearning Guru
 
Redis IU
Redis IURedis IU
Redis IU
 
Mongo db transcript
Mongo db transcriptMongo db transcript
Mongo db transcript
 
Cassandra data access
Cassandra data accessCassandra data access
Cassandra data access
 
Monogo db in-action
Monogo db in-actionMonogo db in-action
Monogo db in-action
 

Ähnlich wie Analytical data processing

Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
 
MongoDB_Spark
MongoDB_SparkMongoDB_Spark
MongoDB_Spark
Mat Keep
 

Ähnlich wie Analytical data processing (20)

Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 
Which NoSQL Database to Combine with Spark for Real Time Big Data Analytics?
Which NoSQL Database to Combine with Spark for Real Time Big Data Analytics?Which NoSQL Database to Combine with Spark for Real Time Big Data Analytics?
Which NoSQL Database to Combine with Spark for Real Time Big Data Analytics?
 
What are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxWhat are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docx
 
nodejs.pptx
nodejs.pptxnodejs.pptx
nodejs.pptx
 
Mongodb
MongodbMongodb
Mongodb
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
MongoDB_Spark
MongoDB_SparkMongoDB_Spark
MongoDB_Spark
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
Mongo db halloween party
Mongo db halloween partyMongo db halloween party
Mongo db halloween party
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
A Study on Mongodb Database.pdf
A Study on Mongodb Database.pdfA Study on Mongodb Database.pdf
A Study on Mongodb Database.pdf
 
A Study on Mongodb Database
A Study on Mongodb DatabaseA Study on Mongodb Database
A Study on Mongodb Database
 
MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introduction
 
Querying Mongo Without Programming Using Funql
Querying Mongo Without Programming Using FunqlQuerying Mongo Without Programming Using Funql
Querying Mongo Without Programming Using Funql
 
MongoDB
MongoDBMongoDB
MongoDB
 
Apache Spark and MongoDB - Turning Analytics into Real-Time Action
Apache Spark and MongoDB - Turning Analytics into Real-Time ActionApache Spark and MongoDB - Turning Analytics into Real-Time Action
Apache Spark and MongoDB - Turning Analytics into Real-Time Action
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdf
 

KĂŒrzlich hochgeladen

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...
gajnagarg
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 
âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
amitlee9823
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Call Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night Stand
amitlee9823
 
Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...
gajnagarg
 
âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...
âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
amitlee9823
 

KĂŒrzlich hochgeladen (20)

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎9352988975 Two shot with one girl (...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
âž„đŸ” 7737669865 đŸ”â–» mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Call Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 đŸ„” Book Your One night Stand
 
Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎9352988975 Two shot with one girl ...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...
âž„đŸ” 7737669865 đŸ”â–» Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
âž„đŸ” 7737669865 đŸ”â–» Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 

Analytical data processing

  • 1.
  • 3. DB MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on concept of collection and document.MongoDB is written in C++.  MongoDB is a database program that is :  Free – You don’t have to pay a price to use it in your application.  Open Source – The source is open and open source community contributes to the development of MongoDB database program.  Cross Platform – MongoDB build on a platform (say Linux) works on other platforms(Windows, MacOS, etc.) as well without any modification to the code.  Document Oriented – MongoDB stores records in form of JSON like documents. There are many advantages in doing so. A notable advantage is that adding new features(columns in relational database) to the database requires no hassle.  NoSQL (Not only SQL) – MongoDB uses document based databases where each document is a key with complex value. The document value can contain multiple key-value pairs.
  • 4. DB LOOKS COMPARED TO SQL? SQL: MONGODB:
  • 5. DB LOOKS COMPARED TO SQL? SQL: MONGODB:
  • 6. DB  MongoDB packs the advantages of NoSQL. NoSQL database concepts were developed to make the applications more modern and fast. NoSQL databases overcome the disadvantages of SQL.  Structured Data – MongoDB can handle structured data(like a spread-sheet or table), semi structured data and unstructured data (data with no rules, examples are multimedia content).  Agile Development – All the NoSQL features of MongoDB makes it perfect fit for Agile methodology for developing applications. Modern applications are designed to have fewer development time and quick updates to the ever ending requirements.  Scalability – MongoDB is horizontally scalable and thus can respond to the increasing application requirements with less cost.  Replication – You can setup replication of data between MongoDB instances. When an instance goes down, other instance can handle the requests with same data available.  MapReduce – You can apply MapReduce algorithm on the MongoDB Collections to pull out some useful reports. What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 7. DB MAP REDUCE Map-reduce is a data processing paradigm for condensing large volumes of data into useful aggregated results. MongoDB uses mapReduce command for map-reduce operations. MapReduce is generally used for processing large data sets. What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 8. REDUCE Following is the syntax of the basic mapReduce command − The map-reduce function first queries the collection, then maps the result documents to emit key-value pairs, which is then reduced based on the keys that have multiple values. What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 9. REDUCE In the above syntax − map is a javascript function that maps a value with a key and emits a key-value pair reduce is a javascript function that reduces or groups all the documents having the same key out specifies the location of the map-reduce query result query specifies the optional selection criteria for selecting documents sort specifies the optional sort criteria limit specifies the optional maximum number of documents to be returned What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 10. REDUCE  Consider the following document structure storing user posts. The document stores user_name of the user and the status of post.  Now, we will use a mapReduce function on our posts collection to select all the active posts, group them on the basis of user_name and then count the number of posts by each user using the following code − What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 11.  The above mapReduce query outputs the following result −  The result shows that a total of 4 documents matched the query (status:"active"), the map function emitted 4 documents with key-value pairs and finally the reduce function grouped mapped documents having the same keys into 2. What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 12.  To see the result of this mapReduce query, use the find operator −  The above query gives the following result which indicates that both users tom and mark have two posts in active states −  In a similar manner, MapReduce queries can be used to construct large complex aggregation queries. The use of custom Javascript functions make use of MapReduce which is very flexible and powerful. What is MongoDB? MongoDB- MapReduce MapReduce- Command Syntax of Mongo- MapReduce Using MapReduce
  • 13.
  • 14. SHARDING IN MONGODB 1st process 2nd process