SlideShare a Scribd company logo
SQL vs NOSQL
friends or foes



                  Pedro Gomes & Miguel Araújo
                    8 February - Braga Geek Nights
SQL
“select maturity, experience, consistency from real_world where age > 40;”



• Relational Model born in 1970, defined by Codd

• Data model with simple interface for the common user

• Efficient storage of data

• Dozens of mature solutions (most popular commercial and open
  source databases currently in use are based on the relational
  model)

• Standard/Unified model
NOSQL
“select fun, profit from real_world where relational=false;”



• Movement constituted by several types of database engines that
  break a 40 year monopoly

• With origins that can be tracked into the 60s, this movement gained
  visibility after 2000.

• Defined by a controversial term this movement gained traction thanks
  to the web giants Google, Amazon, Yahoo and others

• Between closed and open source solutions, we can such names as
  Google BigTable, Facebook Cassandra or LinkedIn Voldemort
SQL
Pros


• ACID transactions for OLTP

• Maturity and stability

• Years of expertise and developing

• SQL language

• Ad-hoc queries. If you need to answer real-time questions about your
  data that you can’t predict in advance

• Data integrity. NOSQL systems rely on applications to enforce data
  integrity where SQL uses a declarative approach
SQL
Cons


• Expensive and/or unnatural scalability

• Used as a solution to all problems it cans lead to low performance
  (10x slower)

• Static schemes not natural in a more and more dynamical world

• The strict consistency can be unnatural under failure, on high latency
  communications (e.g. between Data centers) and on disconnected
  devices.
NOSQL
Pros


• Dynamic schemas

• Adaptable consistency models

• Architectures built for scale and availability

• Friendly web APIs

• Easier maintainability and administration
NOSQL
Cons


• Beta, alpha, 0.X version...

• No SQL

• User coded consistence, and simple operations can sometimes be
  verbose

• They sometimes lack monitoring and integration tools

• Difficult to master
SQL
Used where


• Stack Overflow

• Google

• Facebook

• Twitter

• Amazon

• eBay
NOSQL
Used where


• Facebook

• Twitter

• Google

• Amazon

• Mozilla

• Netflix
Forget SQL vs NOSQL!
What should I use?
For your personal website or small project



‣ Doesn’t matter!


      Use MongoDB or other document store if you don’t like SQL

     Use MySQL or PostgreSQL if you are more familiar with such
    RDBMS

      Try something new
What should I use?
For electronic commerce or another OLTP scenarios



‣ Use a classic RDBMS of your choice:

     When you need to scale use sharding, replication or
    memcache

     Other valid options offer ACID transactions

       In memory VoltDB

       Non relational options: Berkeley DB, Infinispan

       Object oriented: ZODB, Db40
What should I use?
For data mining and data warehousing



‣ Use a column oriented database


     It can lead to a performance gain of 10X

     Zynga currently uses Vertica

     Other options include MonetDB and LucidDB
What should I use?
For large scale data with a strong consistency model



‣ Use HBase


      The main contributors to the project include Yahoo, Facebook,
    Stubleupon and Cloudera

      Great for HDFS/Hadoop integration
What should I use?
For large scale real time analytics



‣ Use a Dynamo style database



     With a Key/Value model: Riak

     With a BigTable model: Cassandra
Different problems...
Different solutions - Wide your horizons




      Graph databases

        FlockBD

        FlockDB

     Hacker’s database: Redis
Questions?


  •
References
• http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html


• http://databasecolumn.vertica.com/database-innovation/mapreduce-a-major-step-backwards/


• http://blog.mozilla.com/data/2010/05/18/riak-and-cassandra-and-hbase-oh-my/


• http://shouldibeworriedaboutscaling.info/


• https://docs.google.com/present/view?id=0Acbfb57m7svVZGRicDd2ZjJfMTFocG10andmeA&hl=en


• http://lwn.net/Articles/376626/


• http://techblog.netflix.com/2011/01/nosql-at-netflix.html


• http://nosql.mypopescu.com/


• http://nosql-databases.org/


•   One Size Fits All? – Part 2: Benchmarking Results (Stonebraker, Çetintemel, et all

More Related Content

PDF
SLQ vs NOSQL - friends or foes
Miguel Araújo
 
PDF
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
DataPad Inc.
 
PDF
No sql databases
Vamshi Vangapally
 
PPT
SQL vs NoSQL
Skills Matter
 
PPTX
Deven s presentation
dshastri001
 
PPTX
SSIS Monitoring Deep Dive
Davide Mauri
 
PDF
Java enterprise development framework
Pavel Suvorov
 
PDF
Proud to be polyglot
Tugdual Grall
 
SLQ vs NOSQL - friends or foes
Miguel Araújo
 
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
DataPad Inc.
 
No sql databases
Vamshi Vangapally
 
SQL vs NoSQL
Skills Matter
 
Deven s presentation
dshastri001
 
SSIS Monitoring Deep Dive
Davide Mauri
 
Java enterprise development framework
Pavel Suvorov
 
Proud to be polyglot
Tugdual Grall
 

What's hot (20)

PDF
Ds03 data analysis
DotNetCampus
 
PDF
MongoDB introduction at Google Cloud next Algiers
Sylia Baraka
 
PPTX
Relational Database and mysql insight
mentallog
 
ODP
Nosql
mentallog
 
PDF
CSS Frameworks for Rapid Site Designs
Ben MacNeill
 
PDF
Иван Глушков (Echo)
Ontico
 
PDF
Data migration services
Nitai Partners Inc
 
PPTX
Dazzing Data Depiction with D3.JS
Eric Carlisle
 
PPTX
05 entity framework
Bat Programmer
 
PPTX
ДмитрийРадченко, "Brief introduction to dundas"
EPAM Systems
 
PDF
Datascience lab 2017 odessa kappa architecture 2.0
Juantomás García Molina
 
PDF
H2O World - Solving Customer Churn with Machine Learning - Julian Bharadwaj
Sri Ambati
 
PPTX
noSQL choices
lugiamaster4
 
PDF
Codemotion madrid 2017 Arquitectura kappa 2.0
Juantomás García Molina
 
PDF
Word Press at Scale - WordCamp Minneapolis
Drew Gorton
 
PPTX
Azure dboptions maniacs_nerdzao2802
Marcelo Adade
 
PDF
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
DEVCON
 
KEY
Sitecore at the University of Alberta
Tim Schneider
 
PPTX
A peek into the future
Prateek Chauhan
 
PDF
Relational is the new Big Data by Miguel Ángel Fajardo and Daniel Dominguez a...
Big Data Spain
 
Ds03 data analysis
DotNetCampus
 
MongoDB introduction at Google Cloud next Algiers
Sylia Baraka
 
Relational Database and mysql insight
mentallog
 
Nosql
mentallog
 
CSS Frameworks for Rapid Site Designs
Ben MacNeill
 
Иван Глушков (Echo)
Ontico
 
Data migration services
Nitai Partners Inc
 
Dazzing Data Depiction with D3.JS
Eric Carlisle
 
05 entity framework
Bat Programmer
 
ДмитрийРадченко, "Brief introduction to dundas"
EPAM Systems
 
Datascience lab 2017 odessa kappa architecture 2.0
Juantomás García Molina
 
H2O World - Solving Customer Churn with Machine Learning - Julian Bharadwaj
Sri Ambati
 
noSQL choices
lugiamaster4
 
Codemotion madrid 2017 Arquitectura kappa 2.0
Juantomás García Molina
 
Word Press at Scale - WordCamp Minneapolis
Drew Gorton
 
Azure dboptions maniacs_nerdzao2802
Marcelo Adade
 
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
DEVCON
 
Sitecore at the University of Alberta
Tim Schneider
 
A peek into the future
Prateek Chauhan
 
Relational is the new Big Data by Miguel Ángel Fajardo and Daniel Dominguez a...
Big Data Spain
 
Ad

Viewers also liked (8)

PPTX
Proxysql use case scenarios plam 2016
Alkin Tezuysal
 
PPTX
Ansible MySQL MHA
Alkin Tezuysal
 
PDF
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Pedro Gomes
 
PDF
Performance schema and sys schema
Mark Leith
 
PDF
MySQL sys schema deep dive
Mark Leith
 
PDF
Instrumenting plugins for Performance Schema
Mark Leith
 
PPTX
Proxysql use case scenarios fosdem17
Alkin Tezuysal
 
PDF
Using Optimizer Hints to Improve MySQL Query Performance
oysteing
 
Proxysql use case scenarios plam 2016
Alkin Tezuysal
 
Ansible MySQL MHA
Alkin Tezuysal
 
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Pedro Gomes
 
Performance schema and sys schema
Mark Leith
 
MySQL sys schema deep dive
Mark Leith
 
Instrumenting plugins for Performance Schema
Mark Leith
 
Proxysql use case scenarios fosdem17
Alkin Tezuysal
 
Using Optimizer Hints to Improve MySQL Query Performance
oysteing
 
Ad

Similar to SLQ vs NOSQL - friends or foes (20)

PDF
50 Shades of SQL
DataWorks Summit
 
PDF
Hadoop and SQL: Delivery Analytics Across the Organization
Seeling Cheung
 
PDF
New World Hadoop Architectures (& What Problems They Really Solve) for Oracle...
Rittman Analytics
 
PPTX
NoSQLDatabases
Adi Challa
 
PPTX
Architecting Your First Big Data Implementation
Adaryl "Bob" Wakefield, MBA
 
PPTX
No SQL- The Future Of Data Storage
Bethmi Gunasekara
 
PPT
SQL, NoSQL, BigData in Data Architecture
Venu Anuganti
 
PDF
Big Data! Great! Now What? #SymfonyCon 2014
Ricard Clau
 
PDF
Intro to Big Data
Zohar Elkayam
 
PDF
NoSQL-Overview
Ranjeet Jha - OCM-JEA
 
PPTX
Big Data Technologies and Why They Matter To R Users
Adaryl "Bob" Wakefield, MBA
 
PPTX
Relational databases vs Non-relational databases
James Serra
 
PDF
Big Data technology Landscape
ShivanandaVSeeri
 
PPTX
Introduction to NoSQL
balwinders
 
PDF
Say Yes To No SQL
Digital Vidya
 
PDF
Transform from database professional to a Big Data architect
Saurabh K. Gupta
 
PPTX
Apache drill
MapR Technologies
 
PPT
SQL/NoSQL How to choose ?
Venu Anuganti
 
PPTX
Big Data Strategy for the Relational World
Andrew Brust
 
PPTX
Introduction to no sql database
Heman Hosainpana
 
50 Shades of SQL
DataWorks Summit
 
Hadoop and SQL: Delivery Analytics Across the Organization
Seeling Cheung
 
New World Hadoop Architectures (& What Problems They Really Solve) for Oracle...
Rittman Analytics
 
NoSQLDatabases
Adi Challa
 
Architecting Your First Big Data Implementation
Adaryl "Bob" Wakefield, MBA
 
No SQL- The Future Of Data Storage
Bethmi Gunasekara
 
SQL, NoSQL, BigData in Data Architecture
Venu Anuganti
 
Big Data! Great! Now What? #SymfonyCon 2014
Ricard Clau
 
Intro to Big Data
Zohar Elkayam
 
NoSQL-Overview
Ranjeet Jha - OCM-JEA
 
Big Data Technologies and Why They Matter To R Users
Adaryl "Bob" Wakefield, MBA
 
Relational databases vs Non-relational databases
James Serra
 
Big Data technology Landscape
ShivanandaVSeeri
 
Introduction to NoSQL
balwinders
 
Say Yes To No SQL
Digital Vidya
 
Transform from database professional to a Big Data architect
Saurabh K. Gupta
 
Apache drill
MapR Technologies
 
SQL/NoSQL How to choose ?
Venu Anuganti
 
Big Data Strategy for the Relational World
Andrew Brust
 
Introduction to no sql database
Heman Hosainpana
 

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Software Development Methodologies in 2025
KodekX
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Doc9.....................................
SofiaCollazos
 
The Future of Artificial Intelligence (AI)
Mukul
 

SLQ vs NOSQL - friends or foes

  • 1. SQL vs NOSQL friends or foes Pedro Gomes & Miguel Araújo 8 February - Braga Geek Nights
  • 2. SQL “select maturity, experience, consistency from real_world where age > 40;” • Relational Model born in 1970, defined by Codd • Data model with simple interface for the common user • Efficient storage of data • Dozens of mature solutions (most popular commercial and open source databases currently in use are based on the relational model) • Standard/Unified model
  • 3. NOSQL “select fun, profit from real_world where relational=false;” • Movement constituted by several types of database engines that break a 40 year monopoly • With origins that can be tracked into the 60s, this movement gained visibility after 2000. • Defined by a controversial term this movement gained traction thanks to the web giants Google, Amazon, Yahoo and others • Between closed and open source solutions, we can such names as Google BigTable, Facebook Cassandra or LinkedIn Voldemort
  • 4. SQL Pros • ACID transactions for OLTP • Maturity and stability • Years of expertise and developing • SQL language • Ad-hoc queries. If you need to answer real-time questions about your data that you can’t predict in advance • Data integrity. NOSQL systems rely on applications to enforce data integrity where SQL uses a declarative approach
  • 5. SQL Cons • Expensive and/or unnatural scalability • Used as a solution to all problems it cans lead to low performance (10x slower) • Static schemes not natural in a more and more dynamical world • The strict consistency can be unnatural under failure, on high latency communications (e.g. between Data centers) and on disconnected devices.
  • 6. NOSQL Pros • Dynamic schemas • Adaptable consistency models • Architectures built for scale and availability • Friendly web APIs • Easier maintainability and administration
  • 7. NOSQL Cons • Beta, alpha, 0.X version... • No SQL • User coded consistence, and simple operations can sometimes be verbose • They sometimes lack monitoring and integration tools • Difficult to master
  • 8. SQL Used where • Stack Overflow • Google • Facebook • Twitter • Amazon • eBay
  • 9. NOSQL Used where • Facebook • Twitter • Google • Amazon • Mozilla • Netflix
  • 10. Forget SQL vs NOSQL!
  • 11. What should I use? For your personal website or small project ‣ Doesn’t matter! Use MongoDB or other document store if you don’t like SQL Use MySQL or PostgreSQL if you are more familiar with such RDBMS Try something new
  • 12. What should I use? For electronic commerce or another OLTP scenarios ‣ Use a classic RDBMS of your choice: When you need to scale use sharding, replication or memcache Other valid options offer ACID transactions In memory VoltDB Non relational options: Berkeley DB, Infinispan Object oriented: ZODB, Db40
  • 13. What should I use? For data mining and data warehousing ‣ Use a column oriented database It can lead to a performance gain of 10X Zynga currently uses Vertica Other options include MonetDB and LucidDB
  • 14. What should I use? For large scale data with a strong consistency model ‣ Use HBase The main contributors to the project include Yahoo, Facebook, Stubleupon and Cloudera Great for HDFS/Hadoop integration
  • 15. What should I use? For large scale real time analytics ‣ Use a Dynamo style database With a Key/Value model: Riak With a BigTable model: Cassandra
  • 16. Different problems... Different solutions - Wide your horizons Graph databases FlockBD FlockDB Hacker’s database: Redis
  • 18. References • http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html • http://databasecolumn.vertica.com/database-innovation/mapreduce-a-major-step-backwards/ • http://blog.mozilla.com/data/2010/05/18/riak-and-cassandra-and-hbase-oh-my/ • http://shouldibeworriedaboutscaling.info/ • https://docs.google.com/present/view?id=0Acbfb57m7svVZGRicDd2ZjJfMTFocG10andmeA&hl=en • http://lwn.net/Articles/376626/ • http://techblog.netflix.com/2011/01/nosql-at-netflix.html • http://nosql.mypopescu.com/ • http://nosql-databases.org/ • One Size Fits All? – Part 2: Benchmarking Results (Stonebraker, Çetintemel, et all

Editor's Notes