SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Beyond SQL
Rise of the noSQL rebellion



                        Matt Kern
                        @lightcap
                matt@codebenders.com
               codes: github.com/lightcap
                github.com/codebenders
                    codebenders.com
What’s wrong with
 SQL, anyhow?
Nothing!
Nothing!
 Okay, a lot…
SQL monoliths
Too Big To FAIL
scale up
scale up vs.
scale up vs. scale out
scaling vs optimization
It’s a web world
in-memory database

                          key-value store


column-oriented


                     document-oriented
Lotus Notes?!?!
noSQL armys
No Joins!
SELECT
    Program,
    Month,
    ThisYearTotalRevenue,
    PriorYearTotalRevenue
FROM (
    SELECT
        ISNULL(ThisYear.Program, PriorYear.Program) as Program,
        ISNULL(ThisYear.Month, PriorYear.Month),
        ISNULL(ThisYear.TotalRevenue, 0) as ThisYearTotalRevenue,
        ISNULL(PriorYear.TotalRevenue, 0) as PriorYearTotalRevenue
    FROM (
        SELECT Program, Month, SUM(TotalRevenue) as TotalRevenue
        FROM PVMonthlyStatusReport
        WHERE Year = @FinancialYear
        GROUP BY Program, Month
    ) as ThisYear
    FULL OUTER JOIN (
        SELECT Program, Month, SUM(TotalRevenue) as TotalRevenue
        FROM PVMonthlyStatusReport
        WHERE Year = (@FinancialYear - 1)
        GROUP BY Program, Month
    ) as PriorYear ON
        ThisYear.Program = PriorYear.Program
        AND ThisYear.Month = PriorYear.Month
) as Revenue
WHERE
    Program = 'Bikes'
ORDER BY
    Month
SELECT
    Program,
    Month,
    ThisYearTotalRevenue,
    PriorYearTotalRevenue
FROM (
    SELECT
        ISNULL(ThisYear.Program, PriorYear.Program) as Program,
        ISNULL(ThisYear.Month, PriorYear.Month),
        ISNULL(ThisYear.TotalRevenue, 0) as ThisYearTotalRevenue,
        ISNULL(PriorYear.TotalRevenue, 0) as PriorYearTotalRevenue
    FROM (
        SELECT Program, Month, SUM(TotalRevenue) as TotalRevenue
        FROM PVMonthlyStatusReport
        WHERE Year = @FinancialYear
        GROUP BY Program, Month
    ) as ThisYear
    FULL OUTER JOIN (
        SELECT Program, Month, SUM(TotalRevenue) as TotalRevenue
        FROM PVMonthlyStatusReport
        WHERE Year = (@FinancialYear - 1)
        GROUP BY Program, Month
    ) as PriorYear ON
        ThisYear.Program = PriorYear.Program
        AND ThisYear.Month = PriorYear.Month
) as Revenue
WHERE
    Program = 'Bikes'
ORDER BY
    Month
Well, if you really
    want…
Proprietary noSQL


• Google BigTable
• Amazon Dynamo

                    AKA:
Open Source noSQL
•   MongoDB                 •   Cassandra Project
                                (Facebook)
•   Hadoop: HBase
    (Apache)                •   Dynamite

•   Tokyo Cabinet           •   HBase

•   CouchDB (Apache)        •   Hypertable

•   Voldermort (LinkedIn)

•   SimpleDB
MongoDB Hawtness
Auto Sharding
Failover and
reduncancy
Query Optimization AI
Dynamic Querys
Relax? No.
Bad ass write
performance
Upserts
Capped Collections
Multikeys
Lockless updates
Schema-free
Schema-free?
BSON = Binary JSON
MapReduce

• Massively Parallel
• Huge datasets
• Loves sharded data
• Good enough for Google.
64-bit vs 32-bit
Libraries
Good Fits
Mashups!
Session data
Volatile Data
New uses every day
Thanks!

Weitere ähnliche Inhalte

Andere mochten auch (8)

2 - Altic - Data Tuesday 26 fev 2013
2 - Altic - Data Tuesday 26 fev 20132 - Altic - Data Tuesday 26 fev 2013
2 - Altic - Data Tuesday 26 fev 2013
 
Calculo difefencial
Calculo difefencialCalculo difefencial
Calculo difefencial
 
PremierOne
PremierOnePremierOne
PremierOne
 
Wickey Set Focus .Net Portfolio
Wickey Set Focus .Net PortfolioWickey Set Focus .Net Portfolio
Wickey Set Focus .Net Portfolio
 
LTDD 02 一発ネタ
LTDD 02 一発ネタLTDD 02 一発ネタ
LTDD 02 一発ネタ
 
NET RIA Services - Building Data-Driven Applications with Microsoft Silverlig...
NET RIA Services - Building Data-Driven Applications with Microsoft Silverlig...NET RIA Services - Building Data-Driven Applications with Microsoft Silverlig...
NET RIA Services - Building Data-Driven Applications with Microsoft Silverlig...
 
Wiki Tao
Wiki TaoWiki Tao
Wiki Tao
 
Bankerbayslideshareteaser 130419011053-phpapp01
Bankerbayslideshareteaser 130419011053-phpapp01Bankerbayslideshareteaser 130419011053-phpapp01
Bankerbayslideshareteaser 130419011053-phpapp01
 

Ähnlich wie Beyond SQL

Sample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docxSample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docx
todd331
 

Ähnlich wie Beyond SQL (20)

Hadoop and the Relational Database: The Best of Both Worlds
Hadoop and the Relational Database: The Best of Both WorldsHadoop and the Relational Database: The Best of Both Worlds
Hadoop and the Relational Database: The Best of Both Worlds
 
Preparing Applications For Dynamic Scaling
Preparing Applications For Dynamic ScalingPreparing Applications For Dynamic Scaling
Preparing Applications For Dynamic Scaling
 
Maintainable Machine Learning Products
Maintainable Machine Learning ProductsMaintainable Machine Learning Products
Maintainable Machine Learning Products
 
Self-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Self-serve analytics journey at Celtra: Snowflake, Spark, and DatabricksSelf-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Self-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
 
Cb15 presentation-yingyi
Cb15 presentation-yingyiCb15 presentation-yingyi
Cb15 presentation-yingyi
 
Fall 2018 Release Webinar Presenter PPT
Fall 2018 Release Webinar Presenter PPTFall 2018 Release Webinar Presenter PPT
Fall 2018 Release Webinar Presenter PPT
 
Sample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docxSample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docx
 
Apache Kylin @ Big Data Europe 2015
Apache Kylin @ Big Data Europe 2015Apache Kylin @ Big Data Europe 2015
Apache Kylin @ Big Data Europe 2015
 
Gentle App Engine Intro
Gentle App Engine IntroGentle App Engine Intro
Gentle App Engine Intro
 
Apache Kylin Extreme OLAP Engine for Big Data
Apache Kylin Extreme OLAP Engine for Big DataApache Kylin Extreme OLAP Engine for Big Data
Apache Kylin Extreme OLAP Engine for Big Data
 
AWS Partner Webcast - Analyze Big Data for Consumer Applications with Looker ...
AWS Partner Webcast - Analyze Big Data for Consumer Applications with Looker ...AWS Partner Webcast - Analyze Big Data for Consumer Applications with Looker ...
AWS Partner Webcast - Analyze Big Data for Consumer Applications with Looker ...
 
DWO -Pertemuan 1
DWO -Pertemuan 1DWO -Pertemuan 1
DWO -Pertemuan 1
 
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data PlatformsCassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
 
Data-Driven Development Era and Its Technologies
Data-Driven Development Era and Its TechnologiesData-Driven Development Era and Its Technologies
Data-Driven Development Era and Its Technologies
 
Apache Kylin - Balance between space and time - Hadoop Summit 2015
Apache Kylin -  Balance between space and time - Hadoop Summit 2015Apache Kylin -  Balance between space and time - Hadoop Summit 2015
Apache Kylin - Balance between space and time - Hadoop Summit 2015
 
Role of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, WarehousingRole of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, Warehousing
 
The Internet as a Single Database
The Internet as a Single DatabaseThe Internet as a Single Database
The Internet as a Single Database
 
A Data Culture with Embedded Analytics in Action
A Data Culture with Embedded Analytics in ActionA Data Culture with Embedded Analytics in Action
A Data Culture with Embedded Analytics in Action
 
Building a Graph-based Analytics Platform
Building a Graph-based Analytics PlatformBuilding a Graph-based Analytics Platform
Building a Graph-based Analytics Platform
 
OMG! My metadata is as fresh as the Backstreet Boys: How Google Refine can up...
OMG! My metadata is as fresh as the Backstreet Boys: How Google Refine can up...OMG! My metadata is as fresh as the Backstreet Boys: How Google Refine can up...
OMG! My metadata is as fresh as the Backstreet Boys: How Google Refine can up...
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
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
Enterprise Knowledge
 
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
vu2urc
 

Kürzlich hochgeladen (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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 convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Beyond SQL

Hinweis der Redaktion

  1. Intro
  2. Be clear, scaling is about getting bigger, not getting faster.
  3. The web is high read, low write. High volume.
  4. Shoehorning objects into relational models. Serves us well, but options exist.
  5. Couch pros: good at being disconnected for long time, good replication. Cons: REST only, replication as scaling Tokyo Cabinet: great replacement for BDB
  6. replica pairs and master-slave configurations. MVCC (Multiversion concurrency control) of couch vs update in place of mongo. MVCC very good at master-master, often offline, problems requiring versioning. Update in place offers killer write speeds and updates. Mongo replication really geared toward failover and updates.
  7. SQL plans usually go into production untested since they can change with new data. That can mean production down. Statistical query optimizers change when the table statistics change. That means UNPREDICTABLITY. Wicked plans. Mongo runs multiple plans and learns from them. First one to the finish wins.
  8. Latency is bad. CouchDB is cool and all, REST and HTTP is awesome. But the point of using nosql is usually speed. Why give that up for something as simple as connections?
  9. Canonical example: Website Analytics.
  10. LRU’ed out caching logfiles history/activity/streams
  11. Modifier Operations Update if Current
  12. Nice mapping to dynamically typed languages. Makes migrations and updates to the database smooth. (Think mysql locking tables to add column).
  13. If code isn’t solid, you can get into trouble.
  14. Preserves datatypes unlike straight JSON. Binary data like videos, images can be stored directly in BSON, unlike as attachments in CouchDB. Still have to deal with form strings in many cases.
  15. RDBMS still great for most apps.