SlideShare une entreprise Scribd logo
1  sur  8
Télécharger pour lire hors ligne
MongoDB talk
                                             A brief introduction to MongoDB


Inhaltsverzeichnis
What´s MongoDB? .................................................................................................................................. 2
   Who’s behind MongoDB ..................................................................................................................... 2
   Licence ................................................................................................................................................. 2
   Main key features:............................................................................................................................... 3
   More cool features .............................................................................................................................. 3
How should or should it not be used? .................................................................................................... 4
   Use Cases ............................................................................................................................................. 4
       Well Suited ...................................................................................................................................... 4
       Less Well Suited ............................................................................................................................... 4
   Schema design basics .......................................................................................................................... 5
   Replication + Replica Sets + Sharding .................................................................................................. 5
       Replication ....................................................................................................................................... 5
       Master-slave .................................................................................................................................... 6
       Replica sets ...................................................................................................................................... 7
       Sharding ........................................................................................................................................... 8
What´s MongoDB?
      „MongoDB (from "humongous") is an open source document-oriented database system
      developed and supported by 10gen. It is part of the NoSQL family of database systems.
      Instead of storing data in tables as is done in a "classical" relational database, MongoDB
      stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the
      format BSON), making the integration of data in certain types of applications easier and
      faster. “

      (Wikipedia)

Who’s behind MongoDB
          o   10Gen, New York City




Licence
  -   Database:
          o Free Software Foundation's GNU AGPL v3.0.
          o Commercial licenses are also available from 10gen, including free evaluation licenses.
  -   Drivers:
          o mongodb.org supported drivers: Apache License v2.0.
          o Third parties have created drivers too; licenses will vary there.
  -   Documentation:
          o Creative Commons.
Main key features:
  -   Speed:
         o No expensive Joins thanks to documents
         o Fast small insert (Slow at writing large documents. Can be bypassed when reading
              from slaves is allowed.)
         o Fast In-Place Updates
                    Atomic modifiers for contention-free performance
  -   Out scaling:
         o Easy setup
         o Sharding distributes load to different machines
                    Auto-Sharding
                    Scale horizontally without compromising functionality
  -   Data safety
         o Replica Sets:
                    Your data isn’t lost, when a master drops out
         o Replication & High Availability



More cool features
  -   Document-oriented storage
           o JSON-style documents with dynamic schemas offer simplicity and power.
  -   Full Index Support
           o Index on any attribute, just like you're used to.
  -   Querying
           o Rich, document-based queries.
           o Map/Reduce
                    Flexible aggregation and data processing.
  -   GridFS
           o Store files of any size without complicating your stack.
  -   Commercial Support
           o Enterprise class support, training, and consulting available
  -   API
           o C
           o C++
           o C#
           o Haskell
           o Java
           o JavaScript
           o Lisp
           o Pearl
           o PHP
           o Python
           o Ruby
           o Scala
           o Some further (not official) language APIs
How should or should it not be used?

Use Cases
Well Suited
  - Archiving and event logging
          o Real-time stats/analytics

   -   Document and Content Management Systems
          o As a document-oriented (JSON) database, MongoDB's flexible schemas are a good fit
             for this.

   -   Ecommerce
          o Several sites are using MongoDB as the core of their ecommerce infrastructure
            (often in combination with an RDBMS for the final order processing and accounting).

   -   Gaming.
          o High performance small read/writes are a good fit for MongoDB. Also for certain
              games geospatial indexes can be helpful.

   -   High volume problems.
           o Problems where a traditional DBMS might be too expensive for the data in question.
               In many cases developers would traditionally write custom code to a file system
               instead using flat files or other methodologies.

   -   Mobile.
         o specifically the server-side infrastructure of mobile systems. Geospatial key here.

   -   Operational data store of a web site MongoDB is very good at real-time inserts, updates, and
       queries. Scalability and replication are provided which are necessary functions for large web
       sites' real-time data stores. Specific web use case examples:
           o content management
           o comment storage, management, voting
           o user registration, profile, session data

   -   Projects using iterative/agile development methodologies.
           o Mongo's BSON data format makes it very easy to store and retrieve data in a
               document-style / "schema less" format. Addition of new properties to existing
               objects is easy and does not generally require blocking "ALTER TABLE" style
               operations.

Less Well Suited
   - Systems with a heavy emphasis on complex transactions such as banking systems and
      accounting. These systems typically require multi-object transactions, which MongoDB
      doesn't support. It's worth noting that, unlike many "NoSQL" solutions, MongoDB does
      support atomic operations on single documents. As documents can be rich entities; for many
      use cases, this is sufficient.
   - Traditional Non-Realtime Data Warehousing. Traditional relational data warehouses and
      variants (columnar relational) are well suited for certain business intelligence problems –
      especially if you need SQL to use client tools (e.g. MicroStrategy) with the database. For
      cases where the analytics are realtime, the data very complicated to model in relational, or
      where the data volume is huge, MongoDB may be a fit.
   - Problems requiring SQL.
Schema design basics


Traditional RDBMS store their data normalized.

    -   Pro:
            o No data redundancy
            o Joins and data aggregation from different sources
    -   Contra:
            o Hard to read
            o Data have to be gathered from different sources


Document stored data

In a document riven database, all the data are stored in so called documents.

Example: all data for a recipe are stored in one document. Using a normalized storage, we would
have to split the data in different tables:

    -   Recipe
    -   Ingredients
    -   …


    -   Pro:
            o Human readable
            o Easy and fast accessible data
    -   Contra:
            o Redundant data
            o No join --> you have to get used to map/reduce or similar frameworks

Replication + Replica Sets + Sharding


Replication
Master-slave




   -   MongoDB supports master-slave replication. A master can perform reads and writes. A slave
       copies data from the master and can only be used for reads or backup (not writes).
   -   MongoDB allows developers to guarantee that an operation has been replicated to at least N
       servers on a per-operation basis.
   -   As operations are performed on the master, the slave will replicate any changes to the data.
Replica sets




Replica sets are similar to master-slave, but they incorporate the ability for the slaves to elect a new
master if the current one goes down.
Sharding




MongoDB scales horizontally using a system called sharding which is very similar to the BigTable and
PNUTS scaling model. The developer chooses a shard key, which determines how the data in a
collection will be distributed. The data is split into ranges (based on the shard key) and distributed
across multiple shards.

The developer's application must know that it is talking to a sharded cluster when performing some
operations. For example, a "findAndModify" query must contain the shard key if the queried
collection is sharded. The application talks to a special routing process called `mongos` that looks
identical to a single MongoDB server. This `mongos` process knows what data is on each shard and
routes the client's requests appropriately. All requests flow through this process: it not only forwards
requests and responses but also performs any necessary final data merges or sorts. Any number of
`mongos` processes can be run: usually one per application server is recommended.

Contenu connexe

Tendances

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
Monogo db in-action
Monogo db in-actionMonogo db in-action
Monogo db in-actionChi Lee
 
MongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBookMongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBookMongoDB
 
Common MongoDB Use Cases
Common MongoDB Use CasesCommon MongoDB Use Cases
Common MongoDB Use CasesDATAVERSITY
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011Chris Westin
 
Using MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesUsing MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesAndrás Fehér
 
Why MongoDB over other Databases - Habilelabs
Why MongoDB over other Databases - HabilelabsWhy MongoDB over other Databases - Habilelabs
Why MongoDB over other Databases - HabilelabsHabilelabs
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersRick Hightower
 
Mongodb intro
Mongodb introMongodb intro
Mongodb introchristkv
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Consjohnrjenson
 
Webinar: What's new in the .NET Driver
Webinar: What's new in the .NET DriverWebinar: What's new in the .NET Driver
Webinar: What's new in the .NET DriverMongoDB
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo dbRohit Bishnoi
 

Tendances (20)

Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
Introduction to mongoDB
Introduction to mongoDBIntroduction to mongoDB
Introduction to mongoDB
 
10 mongo db
10 mongo db10 mongo db
10 mongo db
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Monogo db in-action
Monogo db in-actionMonogo db in-action
Monogo db in-action
 
MongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBookMongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBook
 
MongoDB
MongoDBMongoDB
MongoDB
 
mongodb_Introduction
mongodb_Introductionmongodb_Introduction
mongodb_Introduction
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Common MongoDB Use Cases
Common MongoDB Use CasesCommon MongoDB Use Cases
Common MongoDB Use Cases
 
Mongo db
Mongo dbMongo db
Mongo db
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
Using MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesUsing MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 Minutes
 
Why MongoDB over other Databases - Habilelabs
Why MongoDB over other Databases - HabilelabsWhy MongoDB over other Databases - Habilelabs
Why MongoDB over other Databases - Habilelabs
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP Developers
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
Webinar: What's new in the .NET Driver
Webinar: What's new in the .NET DriverWebinar: What's new in the .NET Driver
Webinar: What's new in the .NET Driver
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
MongoDB
MongoDBMongoDB
MongoDB
 

En vedette

You say you want this
You say you want thisYou say you want this
You say you want thisbowerjj
 
Why Participatory Media Now
Why Participatory Media NowWhy Participatory Media Now
Why Participatory Media Nownancyhigh
 
Barcelona
BarcelonaBarcelona
Barcelonabowerjj
 
Evaluation question 1
Evaluation question 1Evaluation question 1
Evaluation question 1kittykatmagic
 
Debut Style Meets Substance
Debut   Style Meets SubstanceDebut   Style Meets Substance
Debut Style Meets SubstanceGuyParkinson1
 
You say you want this minnesota
You say you want this minnesotaYou say you want this minnesota
You say you want this minnesotabowerjj
 
Using Technology to Plan Family Reunions
Using Technology to Plan Family ReunionsUsing Technology to Plan Family Reunions
Using Technology to Plan Family ReunionsErica Sterling-Bush
 

En vedette (10)

You say you want this
You say you want thisYou say you want this
You say you want this
 
Why Participatory Media Now
Why Participatory Media NowWhy Participatory Media Now
Why Participatory Media Now
 
Barcelona
BarcelonaBarcelona
Barcelona
 
Bower
BowerBower
Bower
 
Evaluation question 1
Evaluation question 1Evaluation question 1
Evaluation question 1
 
AS Media Presentation
AS Media PresentationAS Media Presentation
AS Media Presentation
 
Debut Style Meets Substance
Debut   Style Meets SubstanceDebut   Style Meets Substance
Debut Style Meets Substance
 
You say you want this minnesota
You say you want this minnesotaYou say you want this minnesota
You say you want this minnesota
 
Using Technology to Plan Family Reunions
Using Technology to Plan Family ReunionsUsing Technology to Plan Family Reunions
Using Technology to Plan Family Reunions
 
Finland
FinlandFinland
Finland
 

Similaire à Mongo db transcript

Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialPHP Support
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCLaura Ventura
 
Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx75waytechnologies
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answersjeetendra mandal
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring dataJimmy Ray
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBAhmed Farag
 
how_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptxhow_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptxsarah david
 
Pros and Cons of MongoDB in Web Development
Pros and Cons of MongoDB in Web DevelopmentPros and Cons of MongoDB in Web Development
Pros and Cons of MongoDB in Web DevelopmentNirvana Canada
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfsarah david
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesronwarshawsky
 
What are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxWhat are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxTechnogeeks
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseSudhir Patil
 
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBSilicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBManish Pandit
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBMarco Segato
 

Similaire à Mongo db transcript (20)

Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
 
Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx
 
Mongodb
MongodbMongodb
Mongodb
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answers
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
Mongo db
Mongo dbMongo db
Mongo db
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDB
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 
how_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptxhow_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptx
 
MongoDb - Details on the POC
MongoDb - Details on the POCMongoDb - Details on the POC
MongoDb - Details on the POC
 
Pros and Cons of MongoDB in Web Development
Pros and Cons of MongoDB in Web DevelopmentPros and Cons of MongoDB in Web Development
Pros and Cons of MongoDB in Web Development
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdf
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategies
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 
What are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxWhat are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docx
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
 
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBSilicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDB
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDB
 
No sql - { If and Else }
No sql - { If and Else }No sql - { If and Else }
No sql - { If and Else }
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Mongo db transcript

  • 1. MongoDB talk A brief introduction to MongoDB Inhaltsverzeichnis What´s MongoDB? .................................................................................................................................. 2 Who’s behind MongoDB ..................................................................................................................... 2 Licence ................................................................................................................................................. 2 Main key features:............................................................................................................................... 3 More cool features .............................................................................................................................. 3 How should or should it not be used? .................................................................................................... 4 Use Cases ............................................................................................................................................. 4 Well Suited ...................................................................................................................................... 4 Less Well Suited ............................................................................................................................... 4 Schema design basics .......................................................................................................................... 5 Replication + Replica Sets + Sharding .................................................................................................. 5 Replication ....................................................................................................................................... 5 Master-slave .................................................................................................................................... 6 Replica sets ...................................................................................................................................... 7 Sharding ........................................................................................................................................... 8
  • 2. What´s MongoDB? „MongoDB (from "humongous") is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems. Instead of storing data in tables as is done in a "classical" relational database, MongoDB stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster. “ (Wikipedia) Who’s behind MongoDB o 10Gen, New York City Licence - Database: o Free Software Foundation's GNU AGPL v3.0. o Commercial licenses are also available from 10gen, including free evaluation licenses. - Drivers: o mongodb.org supported drivers: Apache License v2.0. o Third parties have created drivers too; licenses will vary there. - Documentation: o Creative Commons.
  • 3. Main key features: - Speed: o No expensive Joins thanks to documents o Fast small insert (Slow at writing large documents. Can be bypassed when reading from slaves is allowed.) o Fast In-Place Updates  Atomic modifiers for contention-free performance - Out scaling: o Easy setup o Sharding distributes load to different machines  Auto-Sharding  Scale horizontally without compromising functionality - Data safety o Replica Sets:  Your data isn’t lost, when a master drops out o Replication & High Availability More cool features - Document-oriented storage o JSON-style documents with dynamic schemas offer simplicity and power. - Full Index Support o Index on any attribute, just like you're used to. - Querying o Rich, document-based queries. o Map/Reduce  Flexible aggregation and data processing. - GridFS o Store files of any size without complicating your stack. - Commercial Support o Enterprise class support, training, and consulting available - API o C o C++ o C# o Haskell o Java o JavaScript o Lisp o Pearl o PHP o Python o Ruby o Scala o Some further (not official) language APIs
  • 4. How should or should it not be used? Use Cases Well Suited - Archiving and event logging o Real-time stats/analytics - Document and Content Management Systems o As a document-oriented (JSON) database, MongoDB's flexible schemas are a good fit for this. - Ecommerce o Several sites are using MongoDB as the core of their ecommerce infrastructure (often in combination with an RDBMS for the final order processing and accounting). - Gaming. o High performance small read/writes are a good fit for MongoDB. Also for certain games geospatial indexes can be helpful. - High volume problems. o Problems where a traditional DBMS might be too expensive for the data in question. In many cases developers would traditionally write custom code to a file system instead using flat files or other methodologies. - Mobile. o specifically the server-side infrastructure of mobile systems. Geospatial key here. - Operational data store of a web site MongoDB is very good at real-time inserts, updates, and queries. Scalability and replication are provided which are necessary functions for large web sites' real-time data stores. Specific web use case examples: o content management o comment storage, management, voting o user registration, profile, session data - Projects using iterative/agile development methodologies. o Mongo's BSON data format makes it very easy to store and retrieve data in a document-style / "schema less" format. Addition of new properties to existing objects is easy and does not generally require blocking "ALTER TABLE" style operations. Less Well Suited - Systems with a heavy emphasis on complex transactions such as banking systems and accounting. These systems typically require multi-object transactions, which MongoDB doesn't support. It's worth noting that, unlike many "NoSQL" solutions, MongoDB does support atomic operations on single documents. As documents can be rich entities; for many use cases, this is sufficient. - Traditional Non-Realtime Data Warehousing. Traditional relational data warehouses and variants (columnar relational) are well suited for certain business intelligence problems – especially if you need SQL to use client tools (e.g. MicroStrategy) with the database. For cases where the analytics are realtime, the data very complicated to model in relational, or where the data volume is huge, MongoDB may be a fit. - Problems requiring SQL.
  • 5. Schema design basics Traditional RDBMS store their data normalized. - Pro: o No data redundancy o Joins and data aggregation from different sources - Contra: o Hard to read o Data have to be gathered from different sources Document stored data In a document riven database, all the data are stored in so called documents. Example: all data for a recipe are stored in one document. Using a normalized storage, we would have to split the data in different tables: - Recipe - Ingredients - … - Pro: o Human readable o Easy and fast accessible data - Contra: o Redundant data o No join --> you have to get used to map/reduce or similar frameworks Replication + Replica Sets + Sharding Replication
  • 6. Master-slave - MongoDB supports master-slave replication. A master can perform reads and writes. A slave copies data from the master and can only be used for reads or backup (not writes). - MongoDB allows developers to guarantee that an operation has been replicated to at least N servers on a per-operation basis. - As operations are performed on the master, the slave will replicate any changes to the data.
  • 7. Replica sets Replica sets are similar to master-slave, but they incorporate the ability for the slaves to elect a new master if the current one goes down.
  • 8. Sharding MongoDB scales horizontally using a system called sharding which is very similar to the BigTable and PNUTS scaling model. The developer chooses a shard key, which determines how the data in a collection will be distributed. The data is split into ranges (based on the shard key) and distributed across multiple shards. The developer's application must know that it is talking to a sharded cluster when performing some operations. For example, a "findAndModify" query must contain the shard key if the queried collection is sharded. The application talks to a special routing process called `mongos` that looks identical to a single MongoDB server. This `mongos` process knows what data is on each shard and routes the client's requests appropriately. All requests flow through this process: it not only forwards requests and responses but also performs any necessary final data merges or sorts. Any number of `mongos` processes can be run: usually one per application server is recommended.