SlideShare a Scribd company logo
1 of 66
Download to read offline
Intro to MongoDB
         Alex Sharp


         twitter: @ajsharp
         email: ajsharp@frothlogic.com


Monday, February 22, 2010
So what is MongoDB?




Monday, February 22, 2010
First and foremost...




Monday, February 22, 2010
IT’S THE NEW HOTNESS!!!




Monday, February 22, 2010
omgomgomg
                            SHINY OBJECTS
                             omgomgomg


Monday, February 22, 2010
MongoDB (from "humongous") is a
            scalable, high-performance, open source,
                schema-free, document-oriented
                             database.
                          - mongodb.org



Monday, February 22, 2010
Philosophy


Monday, February 22, 2010
Philosophy



                            “One size fits all” approach no longer applies




Monday, February 22, 2010
Philosophy



          Non-relational DBs scale more easily, especially horizontally




Monday, February 22, 2010
Philosophy



                Focus on speed, performance, flexibility and scalability




Monday, February 22, 2010
Philosophy



                   Not concerned with transactional stuff and relational
                                       semantics




Monday, February 22, 2010
Philosophy



                 DBs should be an on-demand commodity, in a cloud-
                                    like fashion




Monday, February 22, 2010
Philosophy
               Mongo tries to achieve
               the performance of
               traditional key-value
               stores while
               maintaining
               functionality of
               traditional RDBMS




Monday, February 22, 2010
Features


Monday, February 22, 2010
Features
               Standard database stuff




Monday, February 22, 2010
Features
               Standard database stuff
                     Indexing




Monday, February 22, 2010
Features
               Standard database stuff
                     Indexing
                     replication/failover support




Monday, February 22, 2010
Features: Document Storage



               Documents are stored in BSON (binary JSON)




Monday, February 22, 2010
Features: Document Storage



               BSON is a binary serialization of JSON-like objects




Monday, February 22, 2010
Features: Document Storage



               This is extremely powerful, b/c it means mongo
               understands JSON natively




Monday, February 22, 2010
Features: Document Storage



               Any valid JSON can be easily imported and queried




Monday, February 22, 2010
Features


               Schema-less; very flexible




Monday, February 22, 2010
Features


               Schema-less; very flexible
               no more blocking ALTER TABLE




Monday, February 22, 2010
Features



               Auto-sharding (alpha)




Monday, February 22, 2010
Features



               Makes for easy horizontal scaling




Monday, February 22, 2010
Features



               Map/Reduce




Monday, February 22, 2010
Features



               Very, very fast




Monday, February 22, 2010
Features



               Super easy to install




Monday, February 22, 2010
Features



               Strong with major languages




Monday, February 22, 2010
Features



               Document-oriented = flexible




Monday, February 22, 2010
Features: Querying
               Rich, javascript-based query syntax




Monday, February 22, 2010
Features: Querying
               Rich, javascript-based query syntax
                     Allows us to deep, nested queries




Monday, February 22, 2010
Features: Querying
               Rich, javascript-based query syntax
                     Allows us to do deep, nested queries

                     db.order.find( { shipping: { carrier: "usps" } } );




Monday, February 22, 2010
Features: Querying
               Rich, javascript-based query syntax
                     Allows us to deep, nested queries

                     db.order.find( { shipping: { carrier: "usps" } } );




                    shipping is an embedded document (object)




Monday, February 22, 2010
Features: Binary Object Store
               Efficient binary large object store via GridFS




Monday, February 22, 2010
Features: Binary Object Store
               Efficient binary large object store via GridFS
                     i.e. store images, videos, anything




Monday, February 22, 2010
Concepts


Monday, February 22, 2010
Concepts: Document-oriented
               Think of “documents” as database records




Monday, February 22, 2010
Concepts: Document-oriented
               Think of “documents” as database records
               Documents are basically just JSON objects that Mongo
               stores in binary




Monday, February 22, 2010
Concepts: Document-oriented
               Think of “collections” as database tables




Monday, February 22, 2010
Concept Mapping
             RDBMS (mysql, postgres)   MongoDB


                            Tables     Collections




Monday, February 22, 2010
Concept Mapping
             RDBMS (mysql, postgres)           MongoDB


                               Tables         Collections


                            Records/rows   Documents/objects




Monday, February 22, 2010
Concept Mapping
             RDBMS (mysql, postgres)             MongoDB


                               Tables            Collections


                            Records/rows    Documents/objects


                Queries return record(s)   Queries return a cursor



Monday, February 22, 2010
Concept Mapping
             RDBMS (mysql, postgres)              MongoDB


                               Tables            Collections


                            Records/rows      Documents/objects


            Queries return record(s)       Queries return a cursor



Monday, February 22, 2010
                                        ???
Concepts: Cursors
               Queries return “cursors” instead of collections




Monday, February 22, 2010
Concepts: Cursors
               Queries return “cursors” instead of collections
                     A cursor allows you to iterate through the result set




Monday, February 22, 2010
Concepts: Cursors
               Queries return “cursors” instead of collections
                     A cursor allows you to iterate through the result set
                     A big reason for this is performance




Monday, February 22, 2010
Concepts: Cursors
               Queries return “cursors” instead of collections
                     A cursor allows you to iterate through the result set
                     A big reason for this is performance
                     Much more efficient than loading all objects into
                     memory




Monday, February 22, 2010
Concepts: Cursors
               The find() function returns a cursor object




Monday, February 22, 2010
Concepts: Cursors
               The find() function returns a cursor object

                  var cursor = db.logged_requests.find({ 'status_code' : 200 })

                  cursor.hasNext() // "true"

                  cursor.forEach(
                     function(item) {
                       print(tojson(item))
                     }
                  );

                  cursor.hasNext() // "false"




Monday, February 22, 2010
Cool Features


Monday, February 22, 2010
Cool Features
               Capped collections




Monday, February 22, 2010
Cool Features
               Capped collections
                     Fixed-sized, limited operation, auto-LRU age-out
                     collections




Monday, February 22, 2010
Cool Features
               Capped collections
                     Fixed-sized, limited operation, auto-LRU age-out
                     collections
                     Fixed insertion order




Monday, February 22, 2010
Cool Features
               Capped collections
                     Fixed-sized, limited operation, auto-LRU age-out
                     collections
                     Fixed insertion order
                     Super fast




Monday, February 22, 2010
Cool Features
               Capped collections
                     Fixed-sized, limited operation, auto-LRU age-out
                     collections
                     Fixed insertion order
                     Super fast
                     Ideal for logging and caching




Monday, February 22, 2010
Cool Uses
               Data Warehouse
                     Mongo understands JSON natively




Monday, February 22, 2010
Cool Uses
               Data Warehouse
                     Mongo understands JSON natively
                     Very powerful for analysis




Monday, February 22, 2010
Cool Uses
               Data Warehouse
                     Mongo understands JSON natively
                     Very powerful for analysis
                     Query a bunch of data from some web service




Monday, February 22, 2010
Cool Uses
               Data Warehouse
                     Mongo understands JSON natively
                     Very powerful for analysis
                     Query a bunch of data from some web service
                     Import into mongo (mongoimport -f filename.json)




Monday, February 22, 2010
Cool Uses
               Data Warehouse
                     Mongo understands JSON natively
                     Very powerful for analysis
                     Query a bunch of data from some web service
                     Import into mongo (mongoimport -f filename.json)
                     Analyze to your heart’s content




Monday, February 22, 2010
Cool Uses
               Harmonyapp.com
                     Large rails app for building websites (kind of a CMS)




Monday, February 22, 2010
Cool Uses
               Hardcore debugging
                     Spit out large amounts of data




Monday, February 22, 2010
Limitations
               Transaction support




Monday, February 22, 2010
Limitations
               Transaction support
               Relational integrity




Monday, February 22, 2010
Resources

               http://mongodb.org
                     http://www.mongodb.org/display/DOCS/Tutorial
                     http://www.mongodb.org/display/DOCS/Use+Cases
               http://blog.mongodb.org/post/172254834/mongodb-
               is-fantastic-for-logging
               http://github.com/ajsharp/mongo-conf



Monday, February 22, 2010

More Related Content

What's hot

Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB Habilelabs
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Dbchriskite
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentationHyphen Call
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBNodeXperts
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger InternalsNorberto Leite
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDBMongoDB
 
MongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMike Friedman
 
MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at ScaleMongoDB
 
Sharding Methods for MongoDB
Sharding Methods for MongoDBSharding Methods for MongoDB
Sharding Methods for MongoDBMongoDB
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLChristian Antognini
 
Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)Kai Zhao
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema DesignMongoDB
 

What's hot (20)

Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
MongoDB
MongoDBMongoDB
MongoDB
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
MongoDB
MongoDBMongoDB
MongoDB
 
Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB
 
MongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World Examples
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at Scale
 
Sharding Methods for MongoDB
Sharding Methods for MongoDBSharding Methods for MongoDB
Sharding Methods for MongoDB
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQL
 
Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema Design
 

Similar to Intro To MongoDB

Nuxeo World Session: Semantic Technologies - Update on Recent Research
Nuxeo World Session: Semantic Technologies - Update on Recent ResearchNuxeo World Session: Semantic Technologies - Update on Recent Research
Nuxeo World Session: Semantic Technologies - Update on Recent ResearchNuxeo
 
Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012
Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012
Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012MongoDB
 
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP GroupDeveloping Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Groupminddog
 
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010Guillaume Laforge
 
No SQL - BarCamp Nürnberg 2010
No SQL - BarCamp Nürnberg 2010No SQL - BarCamp Nürnberg 2010
No SQL - BarCamp Nürnberg 2010Jonathan Weiss
 
Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)jan_mindmatters
 
Persisting dynamic data with mongodb and mongomapper
Persisting dynamic data with mongodb and mongomapperPersisting dynamic data with mongodb and mongomapper
Persisting dynamic data with mongodb and mongomapperwonko
 
3. cloudcamp lt
3. cloudcamp lt3. cloudcamp lt
3. cloudcamp ltOpsCamp
 
Operations as Code
Operations as CodeOperations as Code
Operations as CodeOpsCamp
 
06 View Controllers
06 View Controllers06 View Controllers
06 View ControllersMahmoud
 
MongoDB is the new MySQL
MongoDB is the new MySQLMongoDB is the new MySQL
MongoDB is the new MySQLradamanthus
 
Data Loading for Ext GWT
Data Loading for Ext GWTData Loading for Ext GWT
Data Loading for Ext GWTSencha
 
Jquery Introduction
Jquery IntroductionJquery Introduction
Jquery Introductioncabbiepete
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDBJohn Wood
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusioncolinbdclark
 

Similar to Intro To MongoDB (20)

Nuxeo World Session: Semantic Technologies - Update on Recent Research
Nuxeo World Session: Semantic Technologies - Update on Recent ResearchNuxeo World Session: Semantic Technologies - Update on Recent Research
Nuxeo World Session: Semantic Technologies - Update on Recent Research
 
Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012
Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012
Weotta Presentation at SF Bay Area MongoDB User Group Feb 21 2012
 
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP GroupDeveloping Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
 
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
 
No SQL - BarCamp Nürnberg 2010
No SQL - BarCamp Nürnberg 2010No SQL - BarCamp Nürnberg 2010
No SQL - BarCamp Nürnberg 2010
 
Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)
 
Persisting dynamic data with mongodb and mongomapper
Persisting dynamic data with mongodb and mongomapperPersisting dynamic data with mongodb and mongomapper
Persisting dynamic data with mongodb and mongomapper
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
 
Symfony in the Cloud
Symfony in the CloudSymfony in the Cloud
Symfony in the Cloud
 
3. cloudcamp lt
3. cloudcamp lt3. cloudcamp lt
3. cloudcamp lt
 
Operations as Code
Operations as CodeOperations as Code
Operations as Code
 
06 View Controllers
06 View Controllers06 View Controllers
06 View Controllers
 
MongoDB is the new MySQL
MongoDB is the new MySQLMongoDB is the new MySQL
MongoDB is the new MySQL
 
No sql findings
No sql findingsNo sql findings
No sql findings
 
Data Loading for Ext GWT
Data Loading for Ext GWTData Loading for Ext GWT
Data Loading for Ext GWT
 
Persistence Smoothie
Persistence SmoothiePersistence Smoothie
Persistence Smoothie
 
Jquery Introduction
Jquery IntroductionJquery Introduction
Jquery Introduction
 
ActiveRecord 2.3
ActiveRecord 2.3ActiveRecord 2.3
ActiveRecord 2.3
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDB
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusion
 

More from Alex Sharp

Bldr: A Minimalist JSON Templating DSL
Bldr: A Minimalist JSON Templating DSLBldr: A Minimalist JSON Templating DSL
Bldr: A Minimalist JSON Templating DSLAlex Sharp
 
Bldr - Rubyconf 2011 Lightning Talk
Bldr - Rubyconf 2011 Lightning TalkBldr - Rubyconf 2011 Lightning Talk
Bldr - Rubyconf 2011 Lightning TalkAlex Sharp
 
Mysql to mongo
Mysql to mongoMysql to mongo
Mysql to mongoAlex Sharp
 
Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010Alex Sharp
 
Refactoring in Practice - Ruby Hoedown 2010
Refactoring in Practice - Ruby Hoedown 2010Refactoring in Practice - Ruby Hoedown 2010
Refactoring in Practice - Ruby Hoedown 2010Alex Sharp
 
Practical Ruby Projects with MongoDB - Ruby Kaigi 2010
Practical Ruby Projects with MongoDB - Ruby Kaigi 2010Practical Ruby Projects with MongoDB - Ruby Kaigi 2010
Practical Ruby Projects with MongoDB - Ruby Kaigi 2010Alex Sharp
 
Practical Ruby Projects with MongoDB - Ruby Midwest
Practical Ruby Projects with MongoDB - Ruby MidwestPractical Ruby Projects with MongoDB - Ruby Midwest
Practical Ruby Projects with MongoDB - Ruby MidwestAlex Sharp
 
Practical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSFPractical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSFAlex Sharp
 
Practical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo DbPractical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo DbAlex Sharp
 
Getting Comfortable with BDD
Getting Comfortable with BDDGetting Comfortable with BDD
Getting Comfortable with BDDAlex Sharp
 
Testing Has Many Purposes
Testing Has Many PurposesTesting Has Many Purposes
Testing Has Many PurposesAlex Sharp
 

More from Alex Sharp (11)

Bldr: A Minimalist JSON Templating DSL
Bldr: A Minimalist JSON Templating DSLBldr: A Minimalist JSON Templating DSL
Bldr: A Minimalist JSON Templating DSL
 
Bldr - Rubyconf 2011 Lightning Talk
Bldr - Rubyconf 2011 Lightning TalkBldr - Rubyconf 2011 Lightning Talk
Bldr - Rubyconf 2011 Lightning Talk
 
Mysql to mongo
Mysql to mongoMysql to mongo
Mysql to mongo
 
Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010
 
Refactoring in Practice - Ruby Hoedown 2010
Refactoring in Practice - Ruby Hoedown 2010Refactoring in Practice - Ruby Hoedown 2010
Refactoring in Practice - Ruby Hoedown 2010
 
Practical Ruby Projects with MongoDB - Ruby Kaigi 2010
Practical Ruby Projects with MongoDB - Ruby Kaigi 2010Practical Ruby Projects with MongoDB - Ruby Kaigi 2010
Practical Ruby Projects with MongoDB - Ruby Kaigi 2010
 
Practical Ruby Projects with MongoDB - Ruby Midwest
Practical Ruby Projects with MongoDB - Ruby MidwestPractical Ruby Projects with MongoDB - Ruby Midwest
Practical Ruby Projects with MongoDB - Ruby Midwest
 
Practical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSFPractical Ruby Projects with MongoDB - MongoSF
Practical Ruby Projects with MongoDB - MongoSF
 
Practical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo DbPractical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo Db
 
Getting Comfortable with BDD
Getting Comfortable with BDDGetting Comfortable with BDD
Getting Comfortable with BDD
 
Testing Has Many Purposes
Testing Has Many PurposesTesting Has Many Purposes
Testing Has Many Purposes
 

Recently uploaded

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Intro To MongoDB

  • 1. Intro to MongoDB Alex Sharp twitter: @ajsharp email: ajsharp@frothlogic.com Monday, February 22, 2010
  • 2. So what is MongoDB? Monday, February 22, 2010
  • 3. First and foremost... Monday, February 22, 2010
  • 4. IT’S THE NEW HOTNESS!!! Monday, February 22, 2010
  • 5. omgomgomg SHINY OBJECTS omgomgomg Monday, February 22, 2010
  • 6. MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database. - mongodb.org Monday, February 22, 2010
  • 8. Philosophy “One size fits all” approach no longer applies Monday, February 22, 2010
  • 9. Philosophy Non-relational DBs scale more easily, especially horizontally Monday, February 22, 2010
  • 10. Philosophy Focus on speed, performance, flexibility and scalability Monday, February 22, 2010
  • 11. Philosophy Not concerned with transactional stuff and relational semantics Monday, February 22, 2010
  • 12. Philosophy DBs should be an on-demand commodity, in a cloud- like fashion Monday, February 22, 2010
  • 13. Philosophy Mongo tries to achieve the performance of traditional key-value stores while maintaining functionality of traditional RDBMS Monday, February 22, 2010
  • 15. Features Standard database stuff Monday, February 22, 2010
  • 16. Features Standard database stuff Indexing Monday, February 22, 2010
  • 17. Features Standard database stuff Indexing replication/failover support Monday, February 22, 2010
  • 18. Features: Document Storage Documents are stored in BSON (binary JSON) Monday, February 22, 2010
  • 19. Features: Document Storage BSON is a binary serialization of JSON-like objects Monday, February 22, 2010
  • 20. Features: Document Storage This is extremely powerful, b/c it means mongo understands JSON natively Monday, February 22, 2010
  • 21. Features: Document Storage Any valid JSON can be easily imported and queried Monday, February 22, 2010
  • 22. Features Schema-less; very flexible Monday, February 22, 2010
  • 23. Features Schema-less; very flexible no more blocking ALTER TABLE Monday, February 22, 2010
  • 24. Features Auto-sharding (alpha) Monday, February 22, 2010
  • 25. Features Makes for easy horizontal scaling Monday, February 22, 2010
  • 26. Features Map/Reduce Monday, February 22, 2010
  • 27. Features Very, very fast Monday, February 22, 2010
  • 28. Features Super easy to install Monday, February 22, 2010
  • 29. Features Strong with major languages Monday, February 22, 2010
  • 30. Features Document-oriented = flexible Monday, February 22, 2010
  • 31. Features: Querying Rich, javascript-based query syntax Monday, February 22, 2010
  • 32. Features: Querying Rich, javascript-based query syntax Allows us to deep, nested queries Monday, February 22, 2010
  • 33. Features: Querying Rich, javascript-based query syntax Allows us to do deep, nested queries db.order.find( { shipping: { carrier: "usps" } } ); Monday, February 22, 2010
  • 34. Features: Querying Rich, javascript-based query syntax Allows us to deep, nested queries db.order.find( { shipping: { carrier: "usps" } } ); shipping is an embedded document (object) Monday, February 22, 2010
  • 35. Features: Binary Object Store Efficient binary large object store via GridFS Monday, February 22, 2010
  • 36. Features: Binary Object Store Efficient binary large object store via GridFS i.e. store images, videos, anything Monday, February 22, 2010
  • 38. Concepts: Document-oriented Think of “documents” as database records Monday, February 22, 2010
  • 39. Concepts: Document-oriented Think of “documents” as database records Documents are basically just JSON objects that Mongo stores in binary Monday, February 22, 2010
  • 40. Concepts: Document-oriented Think of “collections” as database tables Monday, February 22, 2010
  • 41. Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Monday, February 22, 2010
  • 42. Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Records/rows Documents/objects Monday, February 22, 2010
  • 43. Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Records/rows Documents/objects Queries return record(s) Queries return a cursor Monday, February 22, 2010
  • 44. Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Records/rows Documents/objects Queries return record(s) Queries return a cursor Monday, February 22, 2010 ???
  • 45. Concepts: Cursors Queries return “cursors” instead of collections Monday, February 22, 2010
  • 46. Concepts: Cursors Queries return “cursors” instead of collections A cursor allows you to iterate through the result set Monday, February 22, 2010
  • 47. Concepts: Cursors Queries return “cursors” instead of collections A cursor allows you to iterate through the result set A big reason for this is performance Monday, February 22, 2010
  • 48. Concepts: Cursors Queries return “cursors” instead of collections A cursor allows you to iterate through the result set A big reason for this is performance Much more efficient than loading all objects into memory Monday, February 22, 2010
  • 49. Concepts: Cursors The find() function returns a cursor object Monday, February 22, 2010
  • 50. Concepts: Cursors The find() function returns a cursor object var cursor = db.logged_requests.find({ 'status_code' : 200 }) cursor.hasNext() // "true" cursor.forEach( function(item) { print(tojson(item)) } ); cursor.hasNext() // "false" Monday, February 22, 2010
  • 52. Cool Features Capped collections Monday, February 22, 2010
  • 53. Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Monday, February 22, 2010
  • 54. Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Fixed insertion order Monday, February 22, 2010
  • 55. Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Fixed insertion order Super fast Monday, February 22, 2010
  • 56. Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Fixed insertion order Super fast Ideal for logging and caching Monday, February 22, 2010
  • 57. Cool Uses Data Warehouse Mongo understands JSON natively Monday, February 22, 2010
  • 58. Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Monday, February 22, 2010
  • 59. Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Query a bunch of data from some web service Monday, February 22, 2010
  • 60. Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Query a bunch of data from some web service Import into mongo (mongoimport -f filename.json) Monday, February 22, 2010
  • 61. Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Query a bunch of data from some web service Import into mongo (mongoimport -f filename.json) Analyze to your heart’s content Monday, February 22, 2010
  • 62. Cool Uses Harmonyapp.com Large rails app for building websites (kind of a CMS) Monday, February 22, 2010
  • 63. Cool Uses Hardcore debugging Spit out large amounts of data Monday, February 22, 2010
  • 64. Limitations Transaction support Monday, February 22, 2010
  • 65. Limitations Transaction support Relational integrity Monday, February 22, 2010
  • 66. Resources http://mongodb.org http://www.mongodb.org/display/DOCS/Tutorial http://www.mongodb.org/display/DOCS/Use+Cases http://blog.mongodb.org/post/172254834/mongodb- is-fantastic-for-logging http://github.com/ajsharp/mongo-conf Monday, February 22, 2010