SlideShare uma empresa Scribd logo
1 de 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!

Mais conteúdo relacionado

Destaque (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
 

Semelhante a 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
 

Semelhante a 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...
 

Último

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
[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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
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...
 
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...
 
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
 

Beyond SQL

Notas do Editor

  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.