SlideShare ist ein Scribd-Unternehmen logo
1 von 65
MongoDB:
Strengths & Weaknesses



    Presented by Luke Ehresman
       http://copperegg.com
A.K.A.
“Knowing when to use
a hammer, and when to
  use a screwdriver.”
Where did we come from?
Where did we come from?
 The state of things a few years ago:
Where did we come from?
 The state of things a few years ago:

  • Relational ruled
Where did we come from?
 The state of things a few years ago:

  • Relational ruled
  • Normalize everything
Where did we come from?
 The state of things a few years ago:

  • Relational ruled
  • Normalize everything
  • Shove it into a relational database
Where did we come from?
 The state of things a few years ago:

  • Relational ruled
  • Normalize everything
  • Shove it into a relational database
  • The web grew, very large sites are common
What is relational?
      Normalized data that relates to each other
What is relational?
               Normalized data that relates to each other

 id   name        family_id         id        Family

 1     Luke           1             1        Ehresman
                                    2         Jetson
 2     Fred           4
                                    3          Smurf
 3    George          2
                                    4        Flintstone
 4    Elroy           2

 5     Papa           3
What is relational?
               Normalized data that relates to each other

 id   name        family_id         id        Family

 1     Luke           1             1         Ehresman
                                    2          Jetson
 2     Fred           4
                                    3           Smurf
 3    George          2
                                    4         Flintstone
 4    Elroy           2

 5     Papa           3         Great for:
                                • data reuse
                                • data integrity
                                • enforcing constraints
                                • enforcing schema
Example use cases
Example use cases
• Users with Accounts that have
  Transactions with Line Items
Example use cases
• Users with Accounts that have
  Transactions with Line Items


• Person with Votes and Comments
Example use cases
• Users with Accounts that have
  Transactions with Line Items


• Person with Votes and Comments
• Blog with Articles and Users who
  Vote and leave Comments
Relational DBs give you
Relational DBs give you

• Durability (guarantees that data is written)
Relational DBs give you

• Durability (guarantees that data is written)
• Consistency (enforcing constraints)
Relational DBs give you

• Durability (guarantees that data is written)
• Consistency (enforcing constraints)
• Guarantees of atomicity
Relational DBs give you

• Durability (guarantees that data is written)
• Consistency (enforcing constraints)
• Guarantees of atomicity
• Data portability (with modern SQL dbs)
Relational DBs give you

• Durability (guarantees that data is written)
• Consistency (enforcing constraints)
• Guarantees of atomicity
• Data portability (with modern SQL dbs)
• Slice and dice data, willy-nilly (SQL)
Sometimes you just
   don’t care.
Sometimes you just
   don’t care.
Sometimes you just
       don’t care.
•   Sometimes speed is more important
Sometimes you just
       don’t care.
•   Sometimes speed is more important

•   Sometimes data is highly segmented
Sometimes you just
       don’t care.
•   Sometimes speed is more important

•   Sometimes data is highly segmented

•   Sometimes you can trust your app
Sometimes you just
       don’t care.
•   Sometimes speed is more important

•   Sometimes data is highly segmented

•   Sometimes you can trust your app

•   Sometimes you know how data will be queried
Sometimes you just
       don’t care.
•   Sometimes speed is more important

•   Sometimes data is highly segmented

•   Sometimes you can trust your app

•   Sometimes you know how data will be queried

•   Sometimes you don’t need everything that
    normalization and relational DBs give you
Sometimes you just
       don’t care.
•   Sometimes speed is more important

•   Sometimes data is highly segmented

•   Sometimes you can trust your app

•   Sometimes you know how data will be queried

•   Sometimes you don’t need everything that
    normalization and relational DBs give you

•   Sometimes it’s not the end of the world if you lose
    some of your data
Example use cases
Example use cases

• Blog with Comments (?? Really??)
Example use cases

• Blog with Comments (?? Really??)
• Logging tons of data
Example use cases

• Blog with Comments (?? Really??)
• Logging tons of data
• Pre-processed data warehousing
Enter: NoSQL
Enter: NoSQL
• These use cases are exactly why NoSQL
  databases have become popular
Enter: NoSQL
• These use cases are exactly why NoSQL
  databases have become popular
• Perhaps too popular (but we’ll get to that)
Enter: NoSQL
• These use cases are exactly why NoSQL
  databases have become popular
• Perhaps too popular (but we’ll get to that)
• Store MASSIVE amounts of data
Enter: NoSQL
• These use cases are exactly why NoSQL
  databases have become popular
• Perhaps too popular (but we’ll get to that)
• Store MASSIVE amounts of data
• Very (VERY) fast retrieval
Enter: NoSQL
• These use cases are exactly why NoSQL
  databases have become popular
• Perhaps too popular (but we’ll get to that)
• Store MASSIVE amounts of data
• Very (VERY) fast retrieval
• Usually better scalability than RDBMS
Know Thyself
   (and thy data)
Know Thyself
   (and thy data)
Know Thyself
              (and thy data)




• Why are you considering MongoDB?
Know Thyself
              (and thy data)




• Why are you considering MongoDB?
• How will your data be queried?
Know Thyself
              (and thy data)




• Why are you considering MongoDB?
• How will your data be queried?
• How big do you need to scale?
Know Thyself
               (and thy data)




• Why are you considering MongoDB?
• How will your data be queried?
• How big do you need to scale?
• Are you read-heavy, or write-heavy?
Know Thyself
   (and thy data)
Know Thyself
           (and thy data)


• Read-heavy data
Know Thyself
           (and thy data)


• Read-heavy data
 • Slave reads?
Know Thyself
                (and thy data)


• Read-heavy data
 • Slave reads?
 • Size of data? Store it all in RAM?
Know Thyself
               (and thy data)


• Read-heavy data
 • Slave reads?
 • Size of data? Store it all in RAM?
 • Covered indexes for subset queries?
Know Thyself
               (and thy data)


• Read-heavy data
 • Slave reads?
 • Size of data? Store it all in RAM?
 • Covered indexes for subset queries?
 • How will you be querying?
Know Thyself
   (and thy data)
Know Thyself
            (and thy data)


• Write-heavy data
Know Thyself
                (and thy data)


• Write-heavy data
 • Insert vs. update/upsert?
Know Thyself
                (and thy data)


• Write-heavy data
 • Insert vs. update/upsert?
 • Number of indexes?
Know Thyself
               (and thy data)


• Write-heavy data
 • Insert vs. update/upsert?
 • Number of indexes?
 • Cluster design (many small shards)?
Know Thyself
                (and thy data)


• Write-heavy data
 • Insert vs. update/upsert?
 • Number of indexes?
 • Cluster design (many small shards)?
 • Durability? Safe writes, or not? Journaling?
Not all created equal
Not all created equal

• SQL (MySQL, Postgres, SQL Server, Oracle)
Not all created equal

• SQL (MySQL, Postgres, SQL Server, Oracle)
• MongoDB, Riak, Cassandra, ...
Not all created equal

• SQL (MySQL, Postgres, SQL Server, Oracle)
• MongoDB, Riak, Cassandra, ...
• Key/Value (Redis, Tokyo Tyrant)
SQL IS DEAD!
far
  from
SQL IS DEAD!

Weitere ähnliche Inhalte

Was ist angesagt?

Migrating to MongoDB: Best Practices
Migrating to MongoDB: Best PracticesMigrating to MongoDB: Best Practices
Migrating to MongoDB: Best PracticesMongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBJustin Smestad
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
Conceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónConceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónMongoDB
 
Scaling MongoDB
Scaling MongoDBScaling MongoDB
Scaling MongoDBMongoDB
 
Webinar: Performance Tuning + Optimization
Webinar: Performance Tuning + OptimizationWebinar: Performance Tuning + Optimization
Webinar: Performance Tuning + OptimizationMongoDB
 
Choosing the right NOSQL database
Choosing the right NOSQL databaseChoosing the right NOSQL database
Choosing the right NOSQL databaseTobias Lindaaker
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo dbRohit Bishnoi
 
Introducción a NoSQL
Introducción a NoSQLIntroducción a NoSQL
Introducción a NoSQLMongoDB
 
3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!Edureka!
 
MongoDB Deployment Checklist
MongoDB Deployment ChecklistMongoDB Deployment Checklist
MongoDB Deployment ChecklistMongoDB
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBLee Theobald
 
Back to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to ShardingBack to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to ShardingMongoDB
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)Uwe Printz
 

Was ist angesagt? (20)

Mongo DB
Mongo DBMongo DB
Mongo DB
 
NOSQL Overview
NOSQL OverviewNOSQL Overview
NOSQL Overview
 
Migrating to MongoDB: Best Practices
Migrating to MongoDB: Best PracticesMigrating to MongoDB: Best Practices
Migrating to MongoDB: Best Practices
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Mongo db
Mongo dbMongo db
Mongo db
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Conceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónConceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producción
 
Scaling MongoDB
Scaling MongoDBScaling MongoDB
Scaling MongoDB
 
Webinar: Performance Tuning + Optimization
Webinar: Performance Tuning + OptimizationWebinar: Performance Tuning + Optimization
Webinar: Performance Tuning + Optimization
 
Choosing the right NOSQL database
Choosing the right NOSQL databaseChoosing the right NOSQL database
Choosing the right NOSQL database
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Introducción a NoSQL
Introducción a NoSQLIntroducción a NoSQL
Introducción a NoSQL
 
3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!
 
MongoDB and Schema Design
MongoDB and Schema DesignMongoDB and Schema Design
MongoDB and Schema Design
 
MongoDB Deployment Checklist
MongoDB Deployment ChecklistMongoDB Deployment Checklist
MongoDB Deployment Checklist
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
Back to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to ShardingBack to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to Sharding
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 

Ähnlich wie Strengths and Weaknesses of MongoDB

Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06jimbojsb
 
Cassandra Summit 2014: Fuzzy Entity Matching at Scale
Cassandra Summit 2014: Fuzzy Entity Matching at ScaleCassandra Summit 2014: Fuzzy Entity Matching at Scale
Cassandra Summit 2014: Fuzzy Entity Matching at ScaleDataStax Academy
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training IntroductionMax De Marzi
 
Blazing Data With Redis (and LEGOS!)
Blazing Data With Redis (and LEGOS!)Blazing Data With Redis (and LEGOS!)
Blazing Data With Redis (and LEGOS!)Justin Carmony
 
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsKorea Sdec
 
Creating an Open Source Genealogical Search Engine with Apache Solr
Creating an Open Source Genealogical Search Engine with Apache SolrCreating an Open Source Genealogical Search Engine with Apache Solr
Creating an Open Source Genealogical Search Engine with Apache SolrBrooke Ganz
 
The Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceThe Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceAbdelmonaim Remani
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLYan Cui
 
Stig: Social Graphs & Discovery at Scale
Stig: Social Graphs & Discovery at ScaleStig: Social Graphs & Discovery at Scale
Stig: Social Graphs & Discovery at ScaleDATAVERSITY
 
MongoDB and Ecommerce : A perfect combination
MongoDB and Ecommerce : A perfect combinationMongoDB and Ecommerce : A perfect combination
MongoDB and Ecommerce : A perfect combinationSteven Francia
 
MARC and BIBFRAME; Linking libraries and archives
MARC and BIBFRAME; Linking libraries and archivesMARC and BIBFRAME; Linking libraries and archives
MARC and BIBFRAME; Linking libraries and archivesDorothea Salo
 
Semantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational DatabasesSemantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational DatabasesCambridge Semantics
 
Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Jesse Warden
 
Lightning Talk: What You Need to Know Before You Shard in 20 Minutes
Lightning Talk: What You Need to Know Before You Shard in 20 MinutesLightning Talk: What You Need to Know Before You Shard in 20 Minutes
Lightning Talk: What You Need to Know Before You Shard in 20 MinutesMongoDB
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Don Demcsak
 
Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability. Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability. Orchestrate
 

Ähnlich wie Strengths and Weaknesses of MongoDB (20)

Library Linked Data
Library Linked DataLibrary Linked Data
Library Linked Data
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06
 
Cassandra Summit 2014: Fuzzy Entity Matching at Scale
Cassandra Summit 2014: Fuzzy Entity Matching at ScaleCassandra Summit 2014: Fuzzy Entity Matching at Scale
Cassandra Summit 2014: Fuzzy Entity Matching at Scale
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training Introduction
 
Blazing Data With Redis (and LEGOS!)
Blazing Data With Redis (and LEGOS!)Blazing Data With Redis (and LEGOS!)
Blazing Data With Redis (and LEGOS!)
 
Forget The ORM!
Forget The ORM!Forget The ORM!
Forget The ORM!
 
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and models
 
Metadata
MetadataMetadata
Metadata
 
Creating an Open Source Genealogical Search Engine with Apache Solr
Creating an Open Source Genealogical Search Engine with Apache SolrCreating an Open Source Genealogical Search Engine with Apache Solr
Creating an Open Source Genealogical Search Engine with Apache Solr
 
The Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceThe Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot Persistence
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Betabit - syrwag 2018-03-28
Betabit - syrwag 2018-03-28Betabit - syrwag 2018-03-28
Betabit - syrwag 2018-03-28
 
Stig: Social Graphs & Discovery at Scale
Stig: Social Graphs & Discovery at ScaleStig: Social Graphs & Discovery at Scale
Stig: Social Graphs & Discovery at Scale
 
MongoDB and Ecommerce : A perfect combination
MongoDB and Ecommerce : A perfect combinationMongoDB and Ecommerce : A perfect combination
MongoDB and Ecommerce : A perfect combination
 
MARC and BIBFRAME; Linking libraries and archives
MARC and BIBFRAME; Linking libraries and archivesMARC and BIBFRAME; Linking libraries and archives
MARC and BIBFRAME; Linking libraries and archives
 
Semantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational DatabasesSemantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational Databases
 
Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011
 
Lightning Talk: What You Need to Know Before You Shard in 20 Minutes
Lightning Talk: What You Need to Know Before You Shard in 20 MinutesLightning Talk: What You Need to Know Before You Shard in 20 Minutes
Lightning Talk: What You Need to Know Before You Shard in 20 Minutes
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)
 
Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability. Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability.
 

Kürzlich hochgeladen

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced 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...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Strengths and Weaknesses of MongoDB

  • 1. MongoDB: Strengths & Weaknesses Presented by Luke Ehresman http://copperegg.com
  • 2. A.K.A. “Knowing when to use a hammer, and when to use a screwdriver.”
  • 3. Where did we come from?
  • 4. Where did we come from? The state of things a few years ago:
  • 5. Where did we come from? The state of things a few years ago: • Relational ruled
  • 6. Where did we come from? The state of things a few years ago: • Relational ruled • Normalize everything
  • 7. Where did we come from? The state of things a few years ago: • Relational ruled • Normalize everything • Shove it into a relational database
  • 8. Where did we come from? The state of things a few years ago: • Relational ruled • Normalize everything • Shove it into a relational database • The web grew, very large sites are common
  • 9. What is relational? Normalized data that relates to each other
  • 10. What is relational? Normalized data that relates to each other id name family_id id Family 1 Luke 1 1 Ehresman 2 Jetson 2 Fred 4 3 Smurf 3 George 2 4 Flintstone 4 Elroy 2 5 Papa 3
  • 11. What is relational? Normalized data that relates to each other id name family_id id Family 1 Luke 1 1 Ehresman 2 Jetson 2 Fred 4 3 Smurf 3 George 2 4 Flintstone 4 Elroy 2 5 Papa 3 Great for: • data reuse • data integrity • enforcing constraints • enforcing schema
  • 13. Example use cases • Users with Accounts that have Transactions with Line Items
  • 14. Example use cases • Users with Accounts that have Transactions with Line Items • Person with Votes and Comments
  • 15. Example use cases • Users with Accounts that have Transactions with Line Items • Person with Votes and Comments • Blog with Articles and Users who Vote and leave Comments
  • 17. Relational DBs give you • Durability (guarantees that data is written)
  • 18. Relational DBs give you • Durability (guarantees that data is written) • Consistency (enforcing constraints)
  • 19. Relational DBs give you • Durability (guarantees that data is written) • Consistency (enforcing constraints) • Guarantees of atomicity
  • 20. Relational DBs give you • Durability (guarantees that data is written) • Consistency (enforcing constraints) • Guarantees of atomicity • Data portability (with modern SQL dbs)
  • 21. Relational DBs give you • Durability (guarantees that data is written) • Consistency (enforcing constraints) • Guarantees of atomicity • Data portability (with modern SQL dbs) • Slice and dice data, willy-nilly (SQL)
  • 22.
  • 23. Sometimes you just don’t care.
  • 24. Sometimes you just don’t care.
  • 25. Sometimes you just don’t care. • Sometimes speed is more important
  • 26. Sometimes you just don’t care. • Sometimes speed is more important • Sometimes data is highly segmented
  • 27. Sometimes you just don’t care. • Sometimes speed is more important • Sometimes data is highly segmented • Sometimes you can trust your app
  • 28. Sometimes you just don’t care. • Sometimes speed is more important • Sometimes data is highly segmented • Sometimes you can trust your app • Sometimes you know how data will be queried
  • 29. Sometimes you just don’t care. • Sometimes speed is more important • Sometimes data is highly segmented • Sometimes you can trust your app • Sometimes you know how data will be queried • Sometimes you don’t need everything that normalization and relational DBs give you
  • 30. Sometimes you just don’t care. • Sometimes speed is more important • Sometimes data is highly segmented • Sometimes you can trust your app • Sometimes you know how data will be queried • Sometimes you don’t need everything that normalization and relational DBs give you • Sometimes it’s not the end of the world if you lose some of your data
  • 32. Example use cases • Blog with Comments (?? Really??)
  • 33. Example use cases • Blog with Comments (?? Really??) • Logging tons of data
  • 34. Example use cases • Blog with Comments (?? Really??) • Logging tons of data • Pre-processed data warehousing
  • 36. Enter: NoSQL • These use cases are exactly why NoSQL databases have become popular
  • 37. Enter: NoSQL • These use cases are exactly why NoSQL databases have become popular • Perhaps too popular (but we’ll get to that)
  • 38. Enter: NoSQL • These use cases are exactly why NoSQL databases have become popular • Perhaps too popular (but we’ll get to that) • Store MASSIVE amounts of data
  • 39. Enter: NoSQL • These use cases are exactly why NoSQL databases have become popular • Perhaps too popular (but we’ll get to that) • Store MASSIVE amounts of data • Very (VERY) fast retrieval
  • 40. Enter: NoSQL • These use cases are exactly why NoSQL databases have become popular • Perhaps too popular (but we’ll get to that) • Store MASSIVE amounts of data • Very (VERY) fast retrieval • Usually better scalability than RDBMS
  • 41. Know Thyself (and thy data)
  • 42. Know Thyself (and thy data)
  • 43. Know Thyself (and thy data) • Why are you considering MongoDB?
  • 44. Know Thyself (and thy data) • Why are you considering MongoDB? • How will your data be queried?
  • 45. Know Thyself (and thy data) • Why are you considering MongoDB? • How will your data be queried? • How big do you need to scale?
  • 46. Know Thyself (and thy data) • Why are you considering MongoDB? • How will your data be queried? • How big do you need to scale? • Are you read-heavy, or write-heavy?
  • 47. Know Thyself (and thy data)
  • 48. Know Thyself (and thy data) • Read-heavy data
  • 49. Know Thyself (and thy data) • Read-heavy data • Slave reads?
  • 50. Know Thyself (and thy data) • Read-heavy data • Slave reads? • Size of data? Store it all in RAM?
  • 51. Know Thyself (and thy data) • Read-heavy data • Slave reads? • Size of data? Store it all in RAM? • Covered indexes for subset queries?
  • 52. Know Thyself (and thy data) • Read-heavy data • Slave reads? • Size of data? Store it all in RAM? • Covered indexes for subset queries? • How will you be querying?
  • 53. Know Thyself (and thy data)
  • 54. Know Thyself (and thy data) • Write-heavy data
  • 55. Know Thyself (and thy data) • Write-heavy data • Insert vs. update/upsert?
  • 56. Know Thyself (and thy data) • Write-heavy data • Insert vs. update/upsert? • Number of indexes?
  • 57. Know Thyself (and thy data) • Write-heavy data • Insert vs. update/upsert? • Number of indexes? • Cluster design (many small shards)?
  • 58. Know Thyself (and thy data) • Write-heavy data • Insert vs. update/upsert? • Number of indexes? • Cluster design (many small shards)? • Durability? Safe writes, or not? Journaling?
  • 60. Not all created equal • SQL (MySQL, Postgres, SQL Server, Oracle)
  • 61. Not all created equal • SQL (MySQL, Postgres, SQL Server, Oracle) • MongoDB, Riak, Cassandra, ...
  • 62. Not all created equal • SQL (MySQL, Postgres, SQL Server, Oracle) • MongoDB, Riak, Cassandra, ... • Key/Value (Redis, Tokyo Tyrant)
  • 64. far
  • 65.   from SQL IS DEAD!
  • 66. far
  • 67.   from SQL IS DEAD! NoSQL and MongoDB are great additions to your toolbox. Use as needed.

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n