SlideShare a Scribd company logo
MongoDB : NoSQL
- Bhagwat Kumar
Agenda
1. Introduction to NoSQLand
MongoDB
2. Installation
3. Queries
4. Indexing
5. Schema modeling
6. Aggregation
Introduction to NoSQL
• Not onlySQL
• Stores and retrieves data with less constrained consistency
model than RDBMS
• More scalable and have finer control over availability.
• Handle large volumes of structured/unstructured data.
• Efficient scale-out architecture.
• Highly optimized key-valuestores
NoSQL data models
• Document model
• Uses embedded data thus no joins
• MongoDB and couchDB
• Graphmodel
• Used where relationships are core to app.
• Neo4j and HyperGraphDB
• Key-value and wide column model
• Redis, Riak :Key-value
• Cassandra, BigTable :wide column model
• Popular NoSQLdatabases : http://nosql-database.org
MongoDB
• Open source
• Document data model
• Rich querymodel
• Full Index Support
• High performance with highavailability
• Horizontal scalability
• Map/Reduce
• Geospatial support
• Professional Support ByMongoDB
MongoDB Data Model
• Stores dataas documents in BSON representation
• BJON extends JSON to include additional types :
-Int, long, floating point, arrays, binary data,sub-documents
MongoDB data model continued :
Collection
Collection
Collection
Document
Document
Document
Field
Field
Field
Database
NongoDB Data
Structure
Compare RDBMS terms with MongoDB
RDBMS MongoDB
Database Database
Tables Collections
Rows Documents
Columns Key
MongoDB is schema-less. Each document can have different
number of keys(fields) and and store different types of data.
{name :‘Rajeev’, age :45, hobby :[“Cricket”, “Movies”]}
{name :42, age :45, profession : “Software engineer”}
Both the above documents can reside in same collection.
Getting Started: MongoDB
• Installing MongoDB
• sudo apt-get installmongodb
• Default directory formongodb data is /data/db
• StartMongoDB server
• mongod
• mongod--dbpath /var/mongo/backup
• mongod--port 12345 # default is27017
• mongod --fork –logpath /var/log/mongodb.log
• Startmongo shell
• mongo
Getting Started Cont...
• Getting listof existing databases
• show dbs
• Getting listof tables
• show collections
•Usingdatabase
•use dbName
• Insertingdocument
•db.collectionName.insert(document)
• Gettinghelp
• anycommand.help()
• See implementationof a function
• call functionwithout ()
Add documents
• Simple Object
db.products.insert( { item: "card", qty: 15 } )
{
"_id" : ObjectId("5298c9e02646f5705c34cd34"),
"item" : "card", "qty" : 15
}
• Embedded Object
db.user.insert( {name: {first: "Bhagwat”, last:"Kumar"} } )
{
"_id" : ObjectId("5298cbb42646f5705c34cd35"),
"name" : { "first" : "Bhagwat", "last" : "Kumar" }
}
Insert document Cont...
• Document withsimple arrays
db.user.insert( {
name: “John”, ”hobbies":[“Cricket”, “Footbal”,“Reading”]
})
• Document withArraysof sub documents
db.users.insert({
name :‘Graeme Rocher’,
books :[
{name :‘Grails’, pages :300},
{name :‘Groovy’, pages :200}
]
})
Querying collections
• Selecting all documents
db.inventory.find( {})
db.inventory.find( {})
• Findby example
db.inventory.find( {type: "snacks" })
db.inventory.find( {type: 'food', price: {$lt: 9.95 }})
• UseOR Condition
db.inventory.find( {$or:[{type : ‘food’}, {price :{$lte : 9.95}
}])
•Use AND Condition
db.inventory.find( {$and: [{type :‘food’}, {price :{$lte :
9.95}}])
MongoDB Update Query
• Update query
db.collection.update(
<query>,<update>,{upsert:boolean,multi:true})
• query - selection criteria
db.users.update(
{name:”himanshu”},
{$set:{age:32}},
multi:true)
Removing documents
• Remove all documents
db.inventory.remove()
• Remove all documents matching specific condition
db.inventory.remove( {type :"food" })
• Removing single document matching condition
db.inventory.remove( {type :"food" },1)
Aggregation framework
• Aggregation operations processes data records and returns
computed results
• It group values from multiple documents together and can
perform a variety of operations on the grouped data to return
a single result
Aggregation samples
SELECTCOUNT(*)AScount FROM orders
db. orders.aggregate([{$group :{_id:null,total:{$sum:1}}}]);
SELECTSUM(price) AStotal FROMorders
db. orders.aggregate([{$group :{_id:null, total :{$sum:”$price”}}}]);
SELECTcust_id, SUM(price) AStotal FROMorders GROUPBYcust_id
db. orders.aggregate([{$group :{_id:“$cust_id”, total :{$sum:”$price”}}}]);
SELECTcust_id,SUM(price) AStFROMorders GROUPBYcust_id ORDERBYt
db. orders.aggregate([{
$group :{_id:“$cust_id”, t:{$sum: ”$price”}}},
{ $sort :{t:1}}]);
Speed up search and sorting : Index
• Without index MongoDB must scan every document in a collection
• No additional sort phase is executed if there exist corresponding index
• Results will be returned directly if projection includes only the index fields
• Affects the aggregation framework as well
• Supports variety of index types :geolocation, arrays etc.
Types of index
• Default by mongoDB_id
• Single field
db.friends.ensureIndex({“name” :1})
• Compound field
db.events.ensureIndex({“username” :1, date :-1
db.events.find().sort({username:1, date: -1}) #usesindx
db.events.find().sort({username: -1, date: 1})#uses index
db.event.find().sort({username: 1, date:1}) #index not used
Compound indexes support queries on any prefix of the index fields
• Multikey index
• For arrays by default
• Geospatial indexes
• Used by geospatial queries e.g. $near, $centerSphere, $within etc.
Schema design factors
• Rich documents
• Pre-join / Embed data
• No Mongo joins
• No constraints
• Atomic operations
• No declared schema
References
http://www.mongodb.com/learn/nosql
http://docs.mongodb.org/manual/core/introduction/
http://en.wikipedia.org/wiki/NoSQL
http://blog.nahurst.com/visual-guide-to-nosql-systems
http://www.slideshare.net/quipo/nosql-databases-why-what-and-when
http://www.slideshare.net/mongodb/webinar-data-processing-and-
aggregation-options
http://www.slideshare.net/mongodb/building-your-first-app-with-mongo-db-
28536013
Contact us
As the Advanced Consulting
Partners of MongoDB we
have delivered some
amazing MongoDB
development projects,
Know more:
Click Here To Know More!
Have more queries
related to MongoDB?
Talk To Our Experts!
Our Office
Client
Location

More Related Content

What's hot

Back to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQLBack to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQL
MongoDB
 
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
SpringPeople
 
MongoDB
MongoDBMongoDB
Mongodb
MongodbMongodb
Mongodb
Manav Prasad
 
Mongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg SolutionsMongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg Solutions
Metatagg Solutions
 
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
Horacio Gonzalez
 
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQLENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
Horacio Gonzalez
 
PhpstudyTokyo MongoDB PHP CakePHP
PhpstudyTokyo MongoDB PHP CakePHPPhpstudyTokyo MongoDB PHP CakePHP
PhpstudyTokyo MongoDB PHP CakePHP
ichikaway
 
Mongo DB 102
Mongo DB 102Mongo DB 102
Mongo DB 102
Abhijeet Vaikar
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
Rohit Bishnoi
 
Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
Jaya Naresh Kovela
 
MongoDB
MongoDBMongoDB
Webinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB AppWebinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB App
MongoDB
 
Mongo db nosql (1)
Mongo db nosql (1)Mongo db nosql (1)
Mongo db nosql (1)
Bhavesh Sarvaiya
 
MongoDB : The Definitive Guide
MongoDB : The Definitive GuideMongoDB : The Definitive Guide
MongoDB : The Definitive GuideWildan Maulana
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
Universidade de São Paulo
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
Abhijeet Vaikar
 
2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB
antoinegirbal
 
Python and MongoDB
Python and MongoDB Python and MongoDB
Python and MongoDB
Norberto Leite
 

What's hot (20)

Back to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQLBack to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQL
 
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
 
MongoDB at GUL
MongoDB at GULMongoDB at GUL
MongoDB at GUL
 
MongoDB
MongoDBMongoDB
MongoDB
 
Mongodb
MongodbMongodb
Mongodb
 
Mongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg SolutionsMongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg Solutions
 
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
 
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQLENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
 
PhpstudyTokyo MongoDB PHP CakePHP
PhpstudyTokyo MongoDB PHP CakePHPPhpstudyTokyo MongoDB PHP CakePHP
PhpstudyTokyo MongoDB PHP CakePHP
 
Mongo DB 102
Mongo DB 102Mongo DB 102
Mongo DB 102
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
 
MongoDB
MongoDBMongoDB
MongoDB
 
Webinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB AppWebinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB App
 
Mongo db nosql (1)
Mongo db nosql (1)Mongo db nosql (1)
Mongo db nosql (1)
 
MongoDB : The Definitive Guide
MongoDB : The Definitive GuideMongoDB : The Definitive Guide
MongoDB : The Definitive Guide
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB
 
Python and MongoDB
Python and MongoDB Python and MongoDB
Python and MongoDB
 

Viewers also liked

Getting Started with MongoDB
Getting Started with MongoDBGetting Started with MongoDB
Getting Started with MongoDB
Pankaj Bajaj
 
An Evening with MongoDB - Orlando: Welcome and Keynote
An Evening with MongoDB - Orlando: Welcome and KeynoteAn Evening with MongoDB - Orlando: Welcome and Keynote
An Evening with MongoDB - Orlando: Welcome and Keynote
MongoDB
 
MongoDB Devops Madrid February 2012
MongoDB Devops Madrid February 2012MongoDB Devops Madrid February 2012
MongoDB Devops Madrid February 2012
Juan Vicente Herrera Ruiz de Alejo
 
Intro to NoSQL and MongoDB
 Intro to NoSQL and MongoDB Intro to NoSQL and MongoDB
Intro to NoSQL and MongoDB
MongoDB
 
Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)MongoSF
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellScott Hernandez
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Knoldus Inc.
 
mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012
Chris Westin
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Sean Laurent
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
christkv
 
Seth Edwards on MongoDB
Seth Edwards on MongoDBSeth Edwards on MongoDB
Seth Edwards on MongoDB
Skills Matter
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Dineesha Suraweera
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
Victoria Malaya
 
Plan de entrenamiento Maratón de Madrid Mes 3
Plan de entrenamiento Maratón de Madrid Mes 3Plan de entrenamiento Maratón de Madrid Mes 3
Plan de entrenamiento Maratón de Madrid Mes 3
Juan Vicente Herrera Ruiz de Alejo
 
Zero to Mongo in 60 Hours
Zero to Mongo in 60 HoursZero to Mongo in 60 Hours
Zero to Mongo in 60 HoursMongoSF
 
MongoDB 3.2 Feature Preview
MongoDB 3.2 Feature PreviewMongoDB 3.2 Feature Preview
MongoDB 3.2 Feature Preview
Norberto Leite
 
Mongodb
MongodbMongodb
Mongodb
Scott Motte
 
Mongodb
MongodbMongodb

Viewers also liked (20)

Getting Started with MongoDB
Getting Started with MongoDBGetting Started with MongoDB
Getting Started with MongoDB
 
An Evening with MongoDB - Orlando: Welcome and Keynote
An Evening with MongoDB - Orlando: Welcome and KeynoteAn Evening with MongoDB - Orlando: Welcome and Keynote
An Evening with MongoDB - Orlando: Welcome and Keynote
 
MongoDB Devops Madrid February 2012
MongoDB Devops Madrid February 2012MongoDB Devops Madrid February 2012
MongoDB Devops Madrid February 2012
 
Intro to NoSQL and MongoDB
 Intro to NoSQL and MongoDB Intro to NoSQL and MongoDB
Intro to NoSQL and MongoDB
 
Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
MongoDB
MongoDBMongoDB
MongoDB
 
Seth Edwards on MongoDB
Seth Edwards on MongoDBSeth Edwards on MongoDB
Seth Edwards on MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
 
Plan de entrenamiento Maratón de Madrid Mes 3
Plan de entrenamiento Maratón de Madrid Mes 3Plan de entrenamiento Maratón de Madrid Mes 3
Plan de entrenamiento Maratón de Madrid Mes 3
 
Mongo db intro new
Mongo db intro newMongo db intro new
Mongo db intro new
 
Zero to Mongo in 60 Hours
Zero to Mongo in 60 HoursZero to Mongo in 60 Hours
Zero to Mongo in 60 Hours
 
MongoDB 3.2 Feature Preview
MongoDB 3.2 Feature PreviewMongoDB 3.2 Feature Preview
MongoDB 3.2 Feature Preview
 
Mongodb
MongodbMongodb
Mongodb
 
Mongodb
MongodbMongodb
Mongodb
 

Similar to MongoDb and NoSQL

MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behl
TO THE NEW | Technology
 
MongoDB_ppt.pptx
MongoDB_ppt.pptxMongoDB_ppt.pptx
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
Indexing Strategies to Help You Scale
Indexing Strategies to Help You ScaleIndexing Strategies to Help You Scale
Indexing Strategies to Help You Scale
MongoDB
 
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
sukrithlal008
 
Webinar: General Technical Overview of MongoDB for Dev Teams
Webinar: General Technical Overview of MongoDB for Dev TeamsWebinar: General Technical Overview of MongoDB for Dev Teams
Webinar: General Technical Overview of MongoDB for Dev Teams
MongoDB
 
Using MongoDB and Python
Using MongoDB and PythonUsing MongoDB and Python
Using MongoDB and Python
Mike Bright
 
2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo
Michael Bright
 
Mongo DB
Mongo DB Mongo DB
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
Gianfranco Palumbo
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
Dhaval Mistry
 
fard car.pptx
fard car.pptxfard car.pptx
fard car.pptx
tarungupta276841
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
ElieHannouch
 
Full metal mongo
Full metal mongoFull metal mongo
Full metal mongo
Israel Gutiérrez
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
Antonio Pintus
 
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial IndexesBack to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
MongoDB
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
MongoDB
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDB
MongoDB
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
1403 app dev series - session 5 - analytics
1403   app dev series - session 5 - analytics1403   app dev series - session 5 - analytics
1403 app dev series - session 5 - analyticsMongoDB
 
London MongoDB User Group April 2011
London MongoDB User Group April 2011London MongoDB User Group April 2011
London MongoDB User Group April 2011
Rainforest QA
 

Similar to MongoDb and NoSQL (20)

MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behl
 
MongoDB_ppt.pptx
MongoDB_ppt.pptxMongoDB_ppt.pptx
MongoDB_ppt.pptx
 
Indexing Strategies to Help You Scale
Indexing Strategies to Help You ScaleIndexing Strategies to Help You Scale
Indexing Strategies to Help You Scale
 
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
 
Webinar: General Technical Overview of MongoDB for Dev Teams
Webinar: General Technical Overview of MongoDB for Dev TeamsWebinar: General Technical Overview of MongoDB for Dev Teams
Webinar: General Technical Overview of MongoDB for Dev Teams
 
Using MongoDB and Python
Using MongoDB and PythonUsing MongoDB and Python
Using MongoDB and Python
 
2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
fard car.pptx
fard car.pptxfard car.pptx
fard car.pptx
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
Full metal mongo
Full metal mongoFull metal mongo
Full metal mongo
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
 
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial IndexesBack to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDB
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
 
1403 app dev series - session 5 - analytics
1403   app dev series - session 5 - analytics1403   app dev series - session 5 - analytics
1403 app dev series - session 5 - analytics
 
London MongoDB User Group April 2011
London MongoDB User Group April 2011London MongoDB User Group April 2011
London MongoDB User Group April 2011
 

More from TO THE NEW | Technology

10 Best Node.js Practices you Need to Know!
10 Best Node.js Practices you Need to Know!10 Best Node.js Practices you Need to Know!
10 Best Node.js Practices you Need to Know!
TO THE NEW | Technology
 
10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:
TO THE NEW | Technology
 
12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C
TO THE NEW | Technology
 
Gulp - The Streaming Build System
Gulp - The Streaming Build SystemGulp - The Streaming Build System
Gulp - The Streaming Build System
TO THE NEW | Technology
 
Grails Spring Boot
Grails Spring BootGrails Spring Boot
Grails Spring Boot
TO THE NEW | Technology
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
TO THE NEW | Technology
 
Content migration to AEM
Content migration to AEMContent migration to AEM
Content migration to AEM
TO THE NEW | Technology
 
AWS CodeDeploy
AWS CodeDeployAWS CodeDeploy
AWS CodeDeploy
TO THE NEW | Technology
 
Big Data Expertise
Big Data ExpertiseBig Data Expertise
Big Data Expertise
TO THE NEW | Technology
 
An introduction to Object Oriented JavaScript
An introduction to Object Oriented JavaScriptAn introduction to Object Oriented JavaScript
An introduction to Object Oriented JavaScript
TO THE NEW | Technology
 
Object Oriented JavaScript - II
Object Oriented JavaScript - IIObject Oriented JavaScript - II
Object Oriented JavaScript - II
TO THE NEW | Technology
 
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
TO THE NEW | Technology
 
Cloud Formation
Cloud FormationCloud Formation
Cloud Formation
TO THE NEW | Technology
 
BigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearchBigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearch
TO THE NEW | Technology
 
JULY IN GRAILS
JULY IN GRAILSJULY IN GRAILS
JULY IN GRAILS
TO THE NEW | Technology
 
Grails Spock Testing
Grails Spock TestingGrails Spock Testing
Grails Spock Testing
TO THE NEW | Technology
 
Getting groovier-with-vertx
Getting groovier-with-vertxGetting groovier-with-vertx
Getting groovier-with-vertx
TO THE NEW | Technology
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
TO THE NEW | Technology
 
Introduction to Heroku
Introduction to HerokuIntroduction to Heroku
Introduction to Heroku
TO THE NEW | Technology
 
Node JS
Node JSNode JS

More from TO THE NEW | Technology (20)

10 Best Node.js Practices you Need to Know!
10 Best Node.js Practices you Need to Know!10 Best Node.js Practices you Need to Know!
10 Best Node.js Practices you Need to Know!
 
10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:
 
12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C
 
Gulp - The Streaming Build System
Gulp - The Streaming Build SystemGulp - The Streaming Build System
Gulp - The Streaming Build System
 
Grails Spring Boot
Grails Spring BootGrails Spring Boot
Grails Spring Boot
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
 
Content migration to AEM
Content migration to AEMContent migration to AEM
Content migration to AEM
 
AWS CodeDeploy
AWS CodeDeployAWS CodeDeploy
AWS CodeDeploy
 
Big Data Expertise
Big Data ExpertiseBig Data Expertise
Big Data Expertise
 
An introduction to Object Oriented JavaScript
An introduction to Object Oriented JavaScriptAn introduction to Object Oriented JavaScript
An introduction to Object Oriented JavaScript
 
Object Oriented JavaScript - II
Object Oriented JavaScript - IIObject Oriented JavaScript - II
Object Oriented JavaScript - II
 
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
 
Cloud Formation
Cloud FormationCloud Formation
Cloud Formation
 
BigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearchBigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearch
 
JULY IN GRAILS
JULY IN GRAILSJULY IN GRAILS
JULY IN GRAILS
 
Grails Spock Testing
Grails Spock TestingGrails Spock Testing
Grails Spock Testing
 
Getting groovier-with-vertx
Getting groovier-with-vertxGetting groovier-with-vertx
Getting groovier-with-vertx
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
 
Introduction to Heroku
Introduction to HerokuIntroduction to Heroku
Introduction to Heroku
 
Node JS
Node JSNode JS
Node JS
 

Recently uploaded

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 

MongoDb and NoSQL

  • 1.
  • 2. MongoDB : NoSQL - Bhagwat Kumar
  • 3. Agenda 1. Introduction to NoSQLand MongoDB 2. Installation 3. Queries 4. Indexing 5. Schema modeling 6. Aggregation
  • 4. Introduction to NoSQL • Not onlySQL • Stores and retrieves data with less constrained consistency model than RDBMS • More scalable and have finer control over availability. • Handle large volumes of structured/unstructured data. • Efficient scale-out architecture. • Highly optimized key-valuestores
  • 5. NoSQL data models • Document model • Uses embedded data thus no joins • MongoDB and couchDB • Graphmodel • Used where relationships are core to app. • Neo4j and HyperGraphDB • Key-value and wide column model • Redis, Riak :Key-value • Cassandra, BigTable :wide column model • Popular NoSQLdatabases : http://nosql-database.org
  • 6. MongoDB • Open source • Document data model • Rich querymodel • Full Index Support • High performance with highavailability • Horizontal scalability • Map/Reduce • Geospatial support • Professional Support ByMongoDB
  • 7. MongoDB Data Model • Stores dataas documents in BSON representation • BJON extends JSON to include additional types : -Int, long, floating point, arrays, binary data,sub-documents
  • 8. MongoDB data model continued : Collection Collection Collection Document Document Document Field Field Field Database NongoDB Data Structure
  • 9. Compare RDBMS terms with MongoDB RDBMS MongoDB Database Database Tables Collections Rows Documents Columns Key MongoDB is schema-less. Each document can have different number of keys(fields) and and store different types of data. {name :‘Rajeev’, age :45, hobby :[“Cricket”, “Movies”]} {name :42, age :45, profession : “Software engineer”} Both the above documents can reside in same collection.
  • 10. Getting Started: MongoDB • Installing MongoDB • sudo apt-get installmongodb • Default directory formongodb data is /data/db • StartMongoDB server • mongod • mongod--dbpath /var/mongo/backup • mongod--port 12345 # default is27017 • mongod --fork –logpath /var/log/mongodb.log • Startmongo shell • mongo
  • 11. Getting Started Cont... • Getting listof existing databases • show dbs • Getting listof tables • show collections •Usingdatabase •use dbName • Insertingdocument •db.collectionName.insert(document) • Gettinghelp • anycommand.help() • See implementationof a function • call functionwithout ()
  • 12. Add documents • Simple Object db.products.insert( { item: "card", qty: 15 } ) { "_id" : ObjectId("5298c9e02646f5705c34cd34"), "item" : "card", "qty" : 15 } • Embedded Object db.user.insert( {name: {first: "Bhagwat”, last:"Kumar"} } ) { "_id" : ObjectId("5298cbb42646f5705c34cd35"), "name" : { "first" : "Bhagwat", "last" : "Kumar" } }
  • 13. Insert document Cont... • Document withsimple arrays db.user.insert( { name: “John”, ”hobbies":[“Cricket”, “Footbal”,“Reading”] }) • Document withArraysof sub documents db.users.insert({ name :‘Graeme Rocher’, books :[ {name :‘Grails’, pages :300}, {name :‘Groovy’, pages :200} ] })
  • 14. Querying collections • Selecting all documents db.inventory.find( {}) db.inventory.find( {}) • Findby example db.inventory.find( {type: "snacks" }) db.inventory.find( {type: 'food', price: {$lt: 9.95 }}) • UseOR Condition db.inventory.find( {$or:[{type : ‘food’}, {price :{$lte : 9.95} }]) •Use AND Condition db.inventory.find( {$and: [{type :‘food’}, {price :{$lte : 9.95}}])
  • 15. MongoDB Update Query • Update query db.collection.update( <query>,<update>,{upsert:boolean,multi:true}) • query - selection criteria db.users.update( {name:”himanshu”}, {$set:{age:32}}, multi:true)
  • 16. Removing documents • Remove all documents db.inventory.remove() • Remove all documents matching specific condition db.inventory.remove( {type :"food" }) • Removing single document matching condition db.inventory.remove( {type :"food" },1)
  • 17. Aggregation framework • Aggregation operations processes data records and returns computed results • It group values from multiple documents together and can perform a variety of operations on the grouped data to return a single result
  • 18. Aggregation samples SELECTCOUNT(*)AScount FROM orders db. orders.aggregate([{$group :{_id:null,total:{$sum:1}}}]); SELECTSUM(price) AStotal FROMorders db. orders.aggregate([{$group :{_id:null, total :{$sum:”$price”}}}]); SELECTcust_id, SUM(price) AStotal FROMorders GROUPBYcust_id db. orders.aggregate([{$group :{_id:“$cust_id”, total :{$sum:”$price”}}}]); SELECTcust_id,SUM(price) AStFROMorders GROUPBYcust_id ORDERBYt db. orders.aggregate([{ $group :{_id:“$cust_id”, t:{$sum: ”$price”}}}, { $sort :{t:1}}]);
  • 19. Speed up search and sorting : Index • Without index MongoDB must scan every document in a collection • No additional sort phase is executed if there exist corresponding index • Results will be returned directly if projection includes only the index fields • Affects the aggregation framework as well • Supports variety of index types :geolocation, arrays etc.
  • 20. Types of index • Default by mongoDB_id • Single field db.friends.ensureIndex({“name” :1}) • Compound field db.events.ensureIndex({“username” :1, date :-1 db.events.find().sort({username:1, date: -1}) #usesindx db.events.find().sort({username: -1, date: 1})#uses index db.event.find().sort({username: 1, date:1}) #index not used Compound indexes support queries on any prefix of the index fields • Multikey index • For arrays by default • Geospatial indexes • Used by geospatial queries e.g. $near, $centerSphere, $within etc.
  • 21. Schema design factors • Rich documents • Pre-join / Embed data • No Mongo joins • No constraints • Atomic operations • No declared schema
  • 23. Contact us As the Advanced Consulting Partners of MongoDB we have delivered some amazing MongoDB development projects, Know more: Click Here To Know More! Have more queries related to MongoDB? Talk To Our Experts! Our Office Client Location