SlideShare a Scribd company logo
3
Most read
10
Most read
20
Most read
An Introduction ToNoSQL & MongoDBLee TheobaldTwitter: @LeesyEmail: Lee@LTheobald.co.uk
NoSQLA form of database management system that is non-relational.Systems are often schema less, avoid joins & are easy to scale.The term NoSQL was coined in 1998 by Carlo Strozzi and then again in early 2009 with the no:sql(east) conferenceA better term would have been “NoREL” but NoSQL caught on.  Think of it more as meaning “Not Only SQL”
But Why Choose NoSQL?Amount of data stored is on the up & up.Facebook is rumoured to hold over 50TB of data in their NoSQL system for their inbox searchThe data we store is more complex than 15 years ago.Easy DistributionWith all this data is needs to be easy to be able to add/remove servers without any disruption of service.
Choose Your FlavourKey-Value StoreGraphBigTableDocument Store
Key-Value StoreData is stored in (unsurpisingly) key/value pairs.Designed to handle lots of data and heavy loadBased on a Amazon’s Dynamo PaperExample: Voldermort (http://project-voldemort.com/) - Developed by the guys at LinkedIn
GraphFocuses on modeling data & associated connectionsInspired by mathematical Graph Theory.Example: FlockDB (http://github.com/twitter/flockdb) – developed by Twitter
BigTable / Column FamiliesBased on the BigTable paper from GoogleData is grouped by columns, not rows.Example: Cassandra (http://cassandra.apache.org/) – Originally developed by Facebook, now and Apache project.
Document StoreData stored as whole documents.JSON & XML are popular formatsMaps well to an Object Orientated programming modelExample: CouchDB (http://couchdb.apache.org/) or …{ “id”: “123”, “name”: “Oliver Clothesoff”, “dob”: {   “year”: 1985,   “month”: 5,   “day”: 12  }}
MongoDB!Short for humongousOpen source with development lead by 10GenDocument BasedSchema-lessHighly ScalableMapReduceEasy Replication & Sharding
Familiar StructureA MongoDB instance is made up of a number of databases.These contain a number of collections & you can have collections nested under other collections.Compare it to MySQL which has databases and tables.
Inserts – As Easy As Pieuse cookbook;db.recipes.save({ “name”: “Cherry Pie”, “ingredients”: [“cherries”, “pie”], “cooking_time”: 30});
Searching – A Piece Of Cake!db.recipes.find({ “cooking_time”: { “$gte”: 10, “$lt”: 30 }}db.recipes.findOne()
Some More Advanced SyntaxLimiting Resultsdb.find().limit(10);Skipping resultsdb.find().skip(5);Sortingdb.find().sort({cooking_time: -1});Cursors:var cur = db.find().cursor();cur.forEach( function(x) { print(tojson(x)); });
MapReduceGreat way of doing bulk manipulation or aggregation.2 or 3 functions written in JavaScript that execute on the server.An example use could be generating a list of top queries from some search logs.
Map FunctionTakes some input of the form of key/value pairs, performs some calculations and returns 0 or more key/value pairsmap = function() {    if (!this.query) {        return;    }    emit (this.query, {count: 1});}
Reduce FunctionTakes the results from the map function, does something (normally combine the results) and produces output in key/value pairsreduce = function(key, values) {var count = 0;values.forEach(function(v) {        count += v[‘count’];    }    return {count: count;}}
Replica SetsMaster/Slave configurationIf your primary server goes down, one of the secondary ones takes overautomaticallyExtremely easy to setup
Auto Sharding – Horizontal Scaling
Other FeaturesGridFS support – Distributed file storageGeospatial indexingIt’s constantly in development so new features are being worked on all the time!
Why Not Try It YourselfDownload it at: http://www.mongodb.orgOnline tutorial at:http://www.mongodb.org/display/DOCS/TutorialSome handy MongoDB sites:MongoDB Cookbook: http://cookbook.mongodb.org/Kyle Banker’s blog: http://kylebanker.com/blog/There’salso a load of handyreferencecards, stickers and otherMongoDBfreebiesupfront!
Thanks For ListeningAny questions?

More Related Content

PDF
An introduction to MongoDB
César Trigo
 
PPT
Introduction to mongodb
neela madheswari
 
ODP
Introduction to MongoDB
Dineesha Suraweera
 
PPTX
Mongodb basics and architecture
Bishal Khanal
 
PDF
An introduction to MongoDB
Universidade de São Paulo
 
PPTX
Basics of MongoDB
HabileLabs
 
PPTX
Mongo db intro.pptx
JWORKS powered by Ordina
 
An introduction to MongoDB
César Trigo
 
Introduction to mongodb
neela madheswari
 
Introduction to MongoDB
Dineesha Suraweera
 
Mongodb basics and architecture
Bishal Khanal
 
An introduction to MongoDB
Universidade de São Paulo
 
Basics of MongoDB
HabileLabs
 
Mongo db intro.pptx
JWORKS powered by Ordina
 

What's hot (20)

PPT
Introduction to MongoDB
Ravi Teja
 
PPTX
MongoDB
nikhil2807
 
PPTX
MongoDB presentation
Hyphen Call
 
PPTX
NOSQL and MongoDB Database
Tariqul islam
 
PPTX
The Basics of MongoDB
valuebound
 
PDF
Introduction to MongoDB
Mike Dirolf
 
PDF
NOSQL- Presentation on NoSQL
Ramakant Soni
 
PDF
MongoDB Fundamentals
MongoDB
 
ZIP
NoSQL databases
Harri Kauhanen
 
PPTX
Mongodb - NoSql Database
Prashant Gupta
 
PPTX
Indexing with MongoDB
MongoDB
 
PPTX
Introduction to MongoDB.pptx
Surya937648
 
PPTX
Introduction to MongoDB
NodeXperts
 
PDF
MongoDB Sharding Fundamentals
Antonios Giannopoulos
 
PPTX
NoSQL databases - An introduction
Pooyan Mehrparvar
 
PPTX
Document Database
Heman Hosainpana
 
PPTX
Introduction to MongoDB
MongoDB
 
PPTX
Introduction to MongoDB and CRUD operations
Anand Kumar
 
PDF
Mongo db dhruba
Dhrubaji Mandal ♛
 
Introduction to MongoDB
Ravi Teja
 
MongoDB
nikhil2807
 
MongoDB presentation
Hyphen Call
 
NOSQL and MongoDB Database
Tariqul islam
 
The Basics of MongoDB
valuebound
 
Introduction to MongoDB
Mike Dirolf
 
NOSQL- Presentation on NoSQL
Ramakant Soni
 
MongoDB Fundamentals
MongoDB
 
NoSQL databases
Harri Kauhanen
 
Mongodb - NoSql Database
Prashant Gupta
 
Indexing with MongoDB
MongoDB
 
Introduction to MongoDB.pptx
Surya937648
 
Introduction to MongoDB
NodeXperts
 
MongoDB Sharding Fundamentals
Antonios Giannopoulos
 
NoSQL databases - An introduction
Pooyan Mehrparvar
 
Document Database
Heman Hosainpana
 
Introduction to MongoDB
MongoDB
 
Introduction to MongoDB and CRUD operations
Anand Kumar
 
Mongo db dhruba
Dhrubaji Mandal ♛
 
Ad

Viewers also liked (20)

PDF
Intro To MongoDB
Alex Sharp
 
PDF
Mongo DB
Edureka!
 
PDF
Intro to NoSQL and MongoDB
DATAVERSITY
 
PDF
Query mechanisms for NoSQL databases
ArangoDB Database
 
PPTX
Webinar: Transitioning from SQL to MongoDB
MongoDB
 
PPTX
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
PPTX
Introduction to NoSQL Databases
Derek Stainer
 
PPTX
Back to Basics Webinar 1: Introduction to NoSQL
MongoDB
 
PDF
MongoDB World 2016: Poster Sessions eBook
MongoDB
 
PPTX
How Auto Trader enables the UK's largest digital automotive marketplace
MongoDB
 
PDF
Creating a Modern Data Architecture for Digital Transformation
MongoDB
 
PDF
A Beginners Guide to noSQL
Mike Crabb
 
PPTX
Agg framework selectgroup feb2015 v2
MongoDB
 
PDF
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB
 
PPTX
MongoDB Days Silicon Valley: Implementing Graph Databases with MongoDB
MongoDB
 
PPTX
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
MongoDB
 
PPTX
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
PDF
Using MongoDB as a high performance graph database
Chris Clarke
 
KEY
PHP, Lithium and MongoDB
Mitch Pirtle
 
KEY
MongoDB Java Development - MongoBoston 2010
Eliot Horowitz
 
Intro To MongoDB
Alex Sharp
 
Mongo DB
Edureka!
 
Intro to NoSQL and MongoDB
DATAVERSITY
 
Query mechanisms for NoSQL databases
ArangoDB Database
 
Webinar: Transitioning from SQL to MongoDB
MongoDB
 
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Introduction to NoSQL Databases
Derek Stainer
 
Back to Basics Webinar 1: Introduction to NoSQL
MongoDB
 
MongoDB World 2016: Poster Sessions eBook
MongoDB
 
How Auto Trader enables the UK's largest digital automotive marketplace
MongoDB
 
Creating a Modern Data Architecture for Digital Transformation
MongoDB
 
A Beginners Guide to noSQL
Mike Crabb
 
Agg framework selectgroup feb2015 v2
MongoDB
 
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB
 
MongoDB Days Silicon Valley: Implementing Graph Databases with MongoDB
MongoDB
 
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
MongoDB
 
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
Using MongoDB as a high performance graph database
Chris Clarke
 
PHP, Lithium and MongoDB
Mitch Pirtle
 
MongoDB Java Development - MongoBoston 2010
Eliot Horowitz
 
Ad

Similar to An Introduction To NoSQL & MongoDB (20)

PPTX
Introduction To MongoDB
Lee Theobald
 
PDF
Mongo db transcript
foliba
 
PPT
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
PPTX
Introduction tomongodb
Lee Theobald
 
PPTX
Back to Basics Webinar 1 - Introduction to NoSQL
Joe Drumgoole
 
KEY
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
PPTX
introtomongodb
saikiran
 
KEY
MongoDB
Steven Francia
 
PDF
MongoDB Basics
Sarang Shravagi
 
PDF
SQL vs NoSQL, an experiment with MongoDB
Marco Segato
 
PDF
Beginner's guide to Mongodb and NoSQL
Maulin Shah
 
PPTX
Einführung in MongoDB
NETUserGroupBern
 
PPTX
MongoDB by Emroz sardar.
Emroz Sardar
 
PPTX
MongoDB Knowledge share
Mr Kyaing
 
PDF
Nosql part1 8th December
Ruru Chowdhury
 
PPTX
MongoDB
Rony Gregory
 
ODP
MongoDB - A Document NoSQL Database
Ruben Inoto Soto
 
PPTX
Mongo db
Gyanendra Yadav
 
PPTX
Mongodb
ASEEMSRIVASTAVA22
 
PPT
MongoDB Pros and Cons
johnrjenson
 
Introduction To MongoDB
Lee Theobald
 
Mongo db transcript
foliba
 
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
Introduction tomongodb
Lee Theobald
 
Back to Basics Webinar 1 - Introduction to NoSQL
Joe Drumgoole
 
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
introtomongodb
saikiran
 
MongoDB Basics
Sarang Shravagi
 
SQL vs NoSQL, an experiment with MongoDB
Marco Segato
 
Beginner's guide to Mongodb and NoSQL
Maulin Shah
 
Einführung in MongoDB
NETUserGroupBern
 
MongoDB by Emroz sardar.
Emroz Sardar
 
MongoDB Knowledge share
Mr Kyaing
 
Nosql part1 8th December
Ruru Chowdhury
 
MongoDB
Rony Gregory
 
MongoDB - A Document NoSQL Database
Ruben Inoto Soto
 
Mongo db
Gyanendra Yadav
 
MongoDB Pros and Cons
johnrjenson
 

Recently uploaded (20)

DOCX
UNIT 2 BC.docx- cv - RESOLUTION -MINUTES-NOTICE - BUSINESS LETTER DRAFTING
MANJU N
 
PPTX
Nagarajan Seyyadurai – Visionary Leadership at WS Industries.pptx
nagarajansd9
 
PPTX
Communications Recruiter Melbourne.pptx
ReithGordon
 
PPT
How to Protect Your New York Business from the Unexpected
Sam Vohra
 
PDF
Withum Webinar - OBBBA: Tax Insights for Food and Consumer Brands
Withum
 
PDF
The Digital Culture Challenge; Bridging the Employee-Leadership Disconnect
Brian Solis
 
PDF
WAKUZOOM DIGITAL ORIGINAL COMPANY PROFILE.pdf
emmedia319
 
PDF
Followers to Fees - Social media for Speakers
Corey Perlman, Social Media Speaker and Consultant
 
PDF
Unveiling the Latest Threat Intelligence Practical Strategies for Strengtheni...
Auxis Consulting & Outsourcing
 
PPTX
Creating the Ultimate SOP Manual: Streamline, Standardize, and Scale
RUPAL AGARWAL
 
PDF
2025 07 29 The Future, Backwards Agile 2025.pdf
Daniel Walsh
 
PPTX
How to best Address your professional Training Program - August 2025.pptx
PaulYoung221210
 
PDF
Danielle Oliveira New Jersey - A Seasoned Lieutenant
Danielle Oliveira New Jersey
 
PDF
Minnesota’s New Lane-Sharing Law for Motorcycles.pdf
Knowyourright
 
PDF
Dr. Enrique Segura Ense Group - A Self-Made Entrepreneur And Executive
Dr. Enrique Segura Ense Group
 
PDF
Why Is MCP Server Development Trending Now.pdf
SoluLab1231
 
PDF
TriStar Gold Corporate Presentation August 2025
Adnet Communications
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Rodolfo Belcastro su All Around The Worlds Magazine - Febbraio 2025
Rodolfo Belcastro
 
PPTX
New Microsoft PowerPoint Presentation (2).pptx
AjayKumar458889
 
UNIT 2 BC.docx- cv - RESOLUTION -MINUTES-NOTICE - BUSINESS LETTER DRAFTING
MANJU N
 
Nagarajan Seyyadurai – Visionary Leadership at WS Industries.pptx
nagarajansd9
 
Communications Recruiter Melbourne.pptx
ReithGordon
 
How to Protect Your New York Business from the Unexpected
Sam Vohra
 
Withum Webinar - OBBBA: Tax Insights for Food and Consumer Brands
Withum
 
The Digital Culture Challenge; Bridging the Employee-Leadership Disconnect
Brian Solis
 
WAKUZOOM DIGITAL ORIGINAL COMPANY PROFILE.pdf
emmedia319
 
Followers to Fees - Social media for Speakers
Corey Perlman, Social Media Speaker and Consultant
 
Unveiling the Latest Threat Intelligence Practical Strategies for Strengtheni...
Auxis Consulting & Outsourcing
 
Creating the Ultimate SOP Manual: Streamline, Standardize, and Scale
RUPAL AGARWAL
 
2025 07 29 The Future, Backwards Agile 2025.pdf
Daniel Walsh
 
How to best Address your professional Training Program - August 2025.pptx
PaulYoung221210
 
Danielle Oliveira New Jersey - A Seasoned Lieutenant
Danielle Oliveira New Jersey
 
Minnesota’s New Lane-Sharing Law for Motorcycles.pdf
Knowyourright
 
Dr. Enrique Segura Ense Group - A Self-Made Entrepreneur And Executive
Dr. Enrique Segura Ense Group
 
Why Is MCP Server Development Trending Now.pdf
SoluLab1231
 
TriStar Gold Corporate Presentation August 2025
Adnet Communications
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Rodolfo Belcastro su All Around The Worlds Magazine - Febbraio 2025
Rodolfo Belcastro
 
New Microsoft PowerPoint Presentation (2).pptx
AjayKumar458889
 

An Introduction To NoSQL & MongoDB

  • 1. An Introduction ToNoSQL & MongoDBLee TheobaldTwitter: @LeesyEmail: [email protected]
  • 2. NoSQLA form of database management system that is non-relational.Systems are often schema less, avoid joins & are easy to scale.The term NoSQL was coined in 1998 by Carlo Strozzi and then again in early 2009 with the no:sql(east) conferenceA better term would have been “NoREL” but NoSQL caught on. Think of it more as meaning “Not Only SQL”
  • 3. But Why Choose NoSQL?Amount of data stored is on the up & up.Facebook is rumoured to hold over 50TB of data in their NoSQL system for their inbox searchThe data we store is more complex than 15 years ago.Easy DistributionWith all this data is needs to be easy to be able to add/remove servers without any disruption of service.
  • 4. Choose Your FlavourKey-Value StoreGraphBigTableDocument Store
  • 5. Key-Value StoreData is stored in (unsurpisingly) key/value pairs.Designed to handle lots of data and heavy loadBased on a Amazon’s Dynamo PaperExample: Voldermort (http://project-voldemort.com/) - Developed by the guys at LinkedIn
  • 6. GraphFocuses on modeling data & associated connectionsInspired by mathematical Graph Theory.Example: FlockDB (http://github.com/twitter/flockdb) – developed by Twitter
  • 7. BigTable / Column FamiliesBased on the BigTable paper from GoogleData is grouped by columns, not rows.Example: Cassandra (http://cassandra.apache.org/) – Originally developed by Facebook, now and Apache project.
  • 8. Document StoreData stored as whole documents.JSON & XML are popular formatsMaps well to an Object Orientated programming modelExample: CouchDB (http://couchdb.apache.org/) or …{ “id”: “123”, “name”: “Oliver Clothesoff”, “dob”: { “year”: 1985, “month”: 5, “day”: 12 }}
  • 9. MongoDB!Short for humongousOpen source with development lead by 10GenDocument BasedSchema-lessHighly ScalableMapReduceEasy Replication & Sharding
  • 10. Familiar StructureA MongoDB instance is made up of a number of databases.These contain a number of collections & you can have collections nested under other collections.Compare it to MySQL which has databases and tables.
  • 11. Inserts – As Easy As Pieuse cookbook;db.recipes.save({ “name”: “Cherry Pie”, “ingredients”: [“cherries”, “pie”], “cooking_time”: 30});
  • 12. Searching – A Piece Of Cake!db.recipes.find({ “cooking_time”: { “$gte”: 10, “$lt”: 30 }}db.recipes.findOne()
  • 13. Some More Advanced SyntaxLimiting Resultsdb.find().limit(10);Skipping resultsdb.find().skip(5);Sortingdb.find().sort({cooking_time: -1});Cursors:var cur = db.find().cursor();cur.forEach( function(x) { print(tojson(x)); });
  • 14. MapReduceGreat way of doing bulk manipulation or aggregation.2 or 3 functions written in JavaScript that execute on the server.An example use could be generating a list of top queries from some search logs.
  • 15. Map FunctionTakes some input of the form of key/value pairs, performs some calculations and returns 0 or more key/value pairsmap = function() { if (!this.query) { return; } emit (this.query, {count: 1});}
  • 16. Reduce FunctionTakes the results from the map function, does something (normally combine the results) and produces output in key/value pairsreduce = function(key, values) {var count = 0;values.forEach(function(v) { count += v[‘count’]; } return {count: count;}}
  • 17. Replica SetsMaster/Slave configurationIf your primary server goes down, one of the secondary ones takes overautomaticallyExtremely easy to setup
  • 18. Auto Sharding – Horizontal Scaling
  • 19. Other FeaturesGridFS support – Distributed file storageGeospatial indexingIt’s constantly in development so new features are being worked on all the time!
  • 20. Why Not Try It YourselfDownload it at: http://www.mongodb.orgOnline tutorial at:http://www.mongodb.org/display/DOCS/TutorialSome handy MongoDB sites:MongoDB Cookbook: http://cookbook.mongodb.org/Kyle Banker’s blog: http://kylebanker.com/blog/There’salso a load of handyreferencecards, stickers and otherMongoDBfreebiesupfront!