SlideShare a Scribd company logo
1 of 98
Download to read offline
Relational
     vs.
Non-Relational
           Josh Berkus
           PostgreSQL Experts Inc.
           SCALE 2010
2003:
        ●   MySQL
        ●   PostgreSQL
        ●   FireBird
        ●   BerkeleyDB
        ●   Derby
        ●   HSQLDB
        ●   SQLite
2003:
        ●   MySQL
        ●   PostgreSQL
        ●   FireBird
        ●   BerkeleyDB
        ●   Derby
        ●   HSQLDB
        ●   SQLite
2010
●   MySQL
●   PostgreSQL
●   FireBird
●   BerkeleyDB
●   Derby
●   HSQLDB
●   SQLite
“NoSQL
movement”
All
non-relational
 databases
Are not
the same
G ra ph                    D o c um ent
  Neo4J                      C ouchD B
  HyperGraphDB               B erkeleyD B -X M L
  Jena                       S olr

K ey-va lue                D is tributed
 M emcached                   C assandra
 Tokyo C abinet               Hypertable
 db4o                         M yS Q L ND B
 R IAK
              H iera rc hic a l
               M ongoD B
All
relational
databases
Are not
the same
E m bedded                 O LT P
 S QLite                    P ostgreS Q L
 Firebird                   M yS Q L
 HS Q L                     O racle
                            S Q L S erver
M PP
                           S trea m ing
 TeraD ata
 Greenplum                   S treambase
 Aster                       Truviso
             C -S to re
               LucidD B
               M onetD B
NoFins
“NoSQL
movement”
Mythbust #2
“revolutionary”
There
are
no
new
database
designs
There are only new
 implementations
       and
  combinations
“A database storing application-
 friendly formatted objects, each
      containing collections of
attributes which can be searched
  through a document ID, or the
  creation of ad-hoc indexes as
    needed by the application.”
CouchDB, 2007

 Pick, 1965
CouchDB, 2007
embeddable Pick
 JSON storage
   REST API
  map/reduce
“revolutionary”
“revolutionary”
“renaissance
      of
non-relational
  databases”
Mythbust #3
“non-relational
  databases
   are toys”
Google
Bigtable
Amazon
Dynamo
FaceBook
Memcached
US Vetrans'
Administration
  Pick, Caché
Mythbust #4
“Relational
 databases
will become
  obsolete”
“Three decades past, the relational
 empire conquered the hierarchical
   hegemony. Today, an upstart
 challenges the relational empire's
          dominance ...”

     XML Databases
         2001
                  --Philip Wadler, Keynote
                    VLDB, Rome, September 2001
Anyone remember
 XML databases?
No?
What happened?
established relational
 and non-relational
     databases
   hybridized XML
Oracle XML
PostgreSQL XML2
 BerkeleyDB XML
       DB2
Mythbust #5
“Relational databases
are for when you need
 ACID transactions.”
Transactions
     ≠
 Relational
Robust Transactions without
       Relationality:
       BerkeleyDB
     Amazon Dynamo

SQL Without Transactions:
        MySQL
        MyISAM
       MS Access
Mythbust #6
You
do
not
have
to choose
one
database.
Choose
the database system
   which f ts your
          i
       current
  application goals.
        or ...
Use more than one
     together
MySQL + Memcached
   PostgreSQL +
     CouchDB
       or ...
Use a Hybrid

  MySQL NDB
PostgreSQL Hstore
   HadoopDB
But what about
   relational
       vs
non-relational?
Relational OLTP
              Databases*
●   Transactions: more mature support
    –   including multi-statement
●   Constraints: enforce data rules absolutely
●   Consistency: enforce structure 100%
●   Complex reporting: keep management happy!
●   Vertical scaling (but not horizontal)
    * mature ones, anyway
SQL vs. Not SQL
SQL promotes:
● portability

● managed changes over time

● multi-application access

● many mature tools
SQL vs. Not SQL
But …
SQL is a full programming language,
and you have to learn it to use it.
SQL vs. Not SQL
No-SQL allows:
● programmers as DBAs

● no impedance

● fast interfaces

● fast development
The main reason
to use SQL-RDBMSs
“Immortal Data”
      your data has
           a life
       independent
      of this specif c
                   i
application implementation
How do I
choose?
Def ne the problem
  i
  you are trying
     to solve
●   “I need a database for my blog”
●   “I need to add 1000's of objects per second on a low-
    end device.”
●   “I need my database to enforce business rules across
    several applications.”
●   “I want my application to be location-sensitive.”
●   “I need to cache data an access it 100K times per
    second.”
●   “I need to produce summary reports across 2TB of
    data.”
●   “I have a few hundred government documents I need
    to serve on the web and mine”
●   “I need to know who-knows-who-knows-who.”
●   “I need to data mine 1000's of 30K bug reports per
    minute.”
Def ne the features
  i
you actually need
   ●   many connections
   ●   multi-server scalability
   ●   complex query logic
   ●   APIs
   ●   redundancy
   ●   data integrity
   ●   schema/schemaless
   ●   data mining
i
f t the database
    to the task
“I need a database
    for my blog”
Use anything!
 ●   MySQL
 ●   PostgreSQL
 ●   MongoDB
 ●   SQLite
 ●   CouchDB
 ●   Flatf les
         i
 ●   DBaseIII
 ●   Something you wrote yourself
“I need my database
     to unify several
    applications and
keep them consistent.”
PostgreSQL
         “OLTP
 SQL-Relational Database”



“It's not just a database: it's a development
                    platform”
Postgres 9
alpha out now!
“I need my application
to be location-aware.”
PostGIS
“Geographic Relational
     Database”
PostGIS
●   Queries across “contains” “near” “closest”
●   Complex geometric map objects
        –   polygons
        –   lines (roads, etc)
●   Make your own Google Maps!
        –   Sunday, 4:30pm, Concourse A
“I need to store
1000's of event objects
    per second on
embedded hardware.”
db4object
“Embedded Key-Value
      Store”
db4object
●   German Train System
●   Insert 1000's of objects per second
●   Low-end embedded console computer
●   Simple access in native programming language
    (Java, .NET)



    ●   compromise: embedded SQL database:
        SQLite
“I need to access
 100K objects per
      second
  over 1000's of
   connections.”
memcached
“Distributed In-Memory
   Key-Value Store”
memcached
●   Use: public website
●   Used for caching 1000's of serialized objects
    per second
●   Available for 100000's of requests per second
    across 1000's of connections
●   Cache each object only once per site
●   Supplements a relational database


    Alternatives: Redis, TokyoTyrant
“I need to produce
complex summary
      reports
over 2TB of data.”
LucidDB
 “Relational
Column-Store”
LucidDB
●   For reporting and analysis
●   Large quantities of data (TB)
●   Complex OLAP & analytics queries
●   Business intelligence
●   compliments a transactional database
“I have 100's of
government documents
        I need to
   serve on the web
  and mine for data.”
CouchDB
“Document Store”
CouchDB
1.CividDB Project
2.Storing lots and lots of government documents
3.Don't know what's in them
4.Don't know how they are structured
5.Store them, f gure out structure later by data
               i
  mining.



  It's also good for web sites!
“I have a social
 application and
 I need to know
   who-knows-
   who-knows-
   who-knows-
who-knows-who.”
Neo4j
“Graph Database”
Neo4j
●   Social Network Website
●   6 degrees of separation
●   “you may also like”
●   type and degrees of relationship
“I get 1000's of
30K bug reports
    per minute
    and I need
to mine them for
     trends.”
Hadoop
“Massively Parallel Data Mine”
Hadoop
●   Massive bug report data feed
●   1000's of bug reports per minute
●   Each bug report 2-45K of data
●   Need to extract trends and correlate inexact
    data
●   Summarize in daily & weekly reports
Conclusion
●   Different database systems do better at
    different tasks.
    –   every database feature is a tradeoff
    –   no database can do all things well
●   Relational vs. non-relational doesn't matter
    –   pick the database(s) for the project or the task
Questions?
●   PostgreSQL Project                                    ●    PostgreSQL Booth
      –   www.postgresql.org                                   trade show f oor
                                                                          l
      –   josh@postgresql.org                             ●    PostgreSQL 9.0
●   PostgreSQL Experts                                         BOF, Tonight 7pm
      –   www.pgexperts.com
            ●    www.pgexperts.com/documents.html
●   Open Source Database Survey
             –    Selena Deckleman
             –    Open Source Database Survey:
                   www.ossdbsurvey.org

Copyright 2010 Josh Berkus, distributable under the creative commons attribution license,
except for 3rd-party images which are property of their respective owners.
Special thanks to Selena Deckelman for the bunnies image and for
the Open Source Database survey.

More Related Content

What's hot

What's hot (20)

NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big data
 
RDBMS vs NoSQL
RDBMS vs NoSQLRDBMS vs NoSQL
RDBMS vs NoSQL
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
NOSQL vs SQL
NOSQL vs SQLNOSQL vs SQL
NOSQL vs SQL
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQL
 
Schemaless Databases
Schemaless DatabasesSchemaless Databases
Schemaless Databases
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
NoSQL Slideshare Presentation
NoSQL Slideshare Presentation NoSQL Slideshare Presentation
NoSQL Slideshare Presentation
 
Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
NoSQL Data Architecture Patterns
NoSQL Data ArchitecturePatternsNoSQL Data ArchitecturePatterns
NoSQL Data Architecture Patterns
 
Rdbms vs. no sql
Rdbms vs. no sqlRdbms vs. no sql
Rdbms vs. no sql
 
NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduce
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Big Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI ProsBig Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI Pros
 
NoSQL and The Big Data Hullabaloo
NoSQL and The Big Data HullabalooNoSQL and The Big Data Hullabaloo
NoSQL and The Big Data Hullabaloo
 

Viewers also liked

An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
InfiniteGraph
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDays
Neo4j
 

Viewers also liked (16)

Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
Graph databases
Graph databasesGraph databases
Graph databases
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendations
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
 
Lju Lazarevic
Lju LazarevicLju Lazarevic
Lju Lazarevic
 
Converting Relational to Graph Databases
Converting Relational to Graph DatabasesConverting Relational to Graph Databases
Converting Relational to Graph Databases
 
Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...
 
Graph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayGraph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBay
 
Graph Database, a little connected tour - Castano
Graph Database, a little connected tour - CastanoGraph Database, a little connected tour - Castano
Graph Database, a little connected tour - Castano
 
Relational to Graph - Import
Relational to Graph - ImportRelational to Graph - Import
Relational to Graph - Import
 
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
 
An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4j
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDays
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 

Similar to Relational vs. Non-Relational

Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)
Ontico
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At Craigslist
MySQLConference
 
NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?
Martin Scholl
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 

Similar to Relational vs. Non-Relational (20)

Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At Craigslist
 
No sq lv1_0
No sq lv1_0No sq lv1_0
No sq lv1_0
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 
Architecting Your First Big Data Implementation
Architecting Your First Big Data ImplementationArchitecting Your First Big Data Implementation
Architecting Your First Big Data Implementation
 
Development without Constraint
Development without ConstraintDevelopment without Constraint
Development without Constraint
 
A peek into the future
A peek into the futureA peek into the future
A peek into the future
 
NoSql Databases
NoSql DatabasesNoSql Databases
NoSql Databases
 
NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
 
NOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the CloudNOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the Cloud
 
ElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseElasticSearch - index server used as a document database
ElasticSearch - index server used as a document database
 
Big data nyu
Big data nyuBig data nyu
Big data nyu
 
Spark
SparkSpark
Spark
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and Cassasdra
 
Augmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure DataAugmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure Data
 
Augmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure dataAugmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure data
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology Landscape
 

More from PostgreSQL Experts, Inc.

Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and Variants
PostgreSQL Experts, Inc.
 

More from PostgreSQL Experts, Inc. (20)

Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
Shootout at the AWS Corral
Shootout at the AWS CorralShootout at the AWS Corral
Shootout at the AWS Corral
 
Fail over fail_back
Fail over fail_backFail over fail_back
Fail over fail_back
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
HowTo DR
HowTo DRHowTo DR
HowTo DR
 
Give A Great Tech Talk 2013
Give A Great Tech Talk 2013Give A Great Tech Talk 2013
Give A Great Tech Talk 2013
 
Pg py-and-squid-pypgday
Pg py-and-squid-pypgdayPg py-and-squid-pypgday
Pg py-and-squid-pypgday
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
 
Five steps perform_2013
Five steps perform_2013Five steps perform_2013
Five steps perform_2013
 
7 Ways To Crash Postgres
7 Ways To Crash Postgres7 Ways To Crash Postgres
7 Ways To Crash Postgres
 
PWNage: Producing a newsletter with Perl
PWNage: Producing a newsletter with PerlPWNage: Producing a newsletter with Perl
PWNage: Producing a newsletter with Perl
 
10 Ways to Destroy Your Community
10 Ways to Destroy Your Community10 Ways to Destroy Your Community
10 Ways to Destroy Your Community
 
Open Source Press Relations
Open Source Press RelationsOpen Source Press Relations
Open Source Press Relations
 
5 (more) Ways To Destroy Your Community
5 (more) Ways To Destroy Your Community5 (more) Ways To Destroy Your Community
5 (more) Ways To Destroy Your Community
 
Preventing Community (from Linux Collab)
Preventing Community (from Linux Collab)Preventing Community (from Linux Collab)
Preventing Community (from Linux Collab)
 
Development of 8.3 In India
Development of 8.3 In IndiaDevelopment of 8.3 In India
Development of 8.3 In India
 
PostgreSQL and MySQL
PostgreSQL and MySQLPostgreSQL and MySQL
PostgreSQL and MySQL
 
50 Ways To Love Your Project
50 Ways To Love Your Project50 Ways To Love Your Project
50 Ways To Love Your Project
 
8.4 Upcoming Features
8.4 Upcoming Features 8.4 Upcoming Features
8.4 Upcoming Features
 
Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and Variants
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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
 
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
 
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...
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
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
 
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 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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Relational vs. Non-Relational

  • 1. Relational vs. Non-Relational Josh Berkus PostgreSQL Experts Inc. SCALE 2010
  • 2. 2003: ● MySQL ● PostgreSQL ● FireBird ● BerkeleyDB ● Derby ● HSQLDB ● SQLite
  • 3. 2003: ● MySQL ● PostgreSQL ● FireBird ● BerkeleyDB ● Derby ● HSQLDB ● SQLite
  • 4. 2010 ● MySQL ● PostgreSQL ● FireBird ● BerkeleyDB ● Derby ● HSQLDB ● SQLite
  • 8. G ra ph D o c um ent Neo4J C ouchD B HyperGraphDB B erkeleyD B -X M L Jena S olr K ey-va lue D is tributed M emcached C assandra Tokyo C abinet Hypertable db4o M yS Q L ND B R IAK H iera rc hic a l M ongoD B
  • 11. E m bedded O LT P S QLite P ostgreS Q L Firebird M yS Q L HS Q L O racle S Q L S erver M PP S trea m ing TeraD ata Greenplum S treambase Aster Truviso C -S to re LucidD B M onetD B
  • 13.
  • 17. There
  • 18. are
  • 19. no
  • 20. new
  • 23. There are only new implementations and combinations
  • 24. “A database storing application- friendly formatted objects, each containing collections of attributes which can be searched through a document ID, or the creation of ad-hoc indexes as needed by the application.”
  • 26. CouchDB, 2007 embeddable Pick JSON storage REST API map/reduce
  • 29. “renaissance of non-relational databases”
  • 38. “Three decades past, the relational empire conquered the hierarchical hegemony. Today, an upstart challenges the relational empire's dominance ...” XML Databases 2001 --Philip Wadler, Keynote VLDB, Rome, September 2001
  • 39. Anyone remember XML databases?
  • 40. No?
  • 42. established relational and non-relational databases hybridized XML
  • 43. Oracle XML PostgreSQL XML2 BerkeleyDB XML DB2
  • 45. “Relational databases are for when you need ACID transactions.”
  • 46. Transactions ≠ Relational
  • 47. Robust Transactions without Relationality: BerkeleyDB Amazon Dynamo SQL Without Transactions: MySQL MyISAM MS Access
  • 49.
  • 50. You
  • 51. do
  • 52. not
  • 53. have
  • 56. Choose the database system which f ts your i current application goals. or ...
  • 57. Use more than one together MySQL + Memcached PostgreSQL + CouchDB or ...
  • 58. Use a Hybrid MySQL NDB PostgreSQL Hstore HadoopDB
  • 59. But what about relational vs non-relational?
  • 60. Relational OLTP Databases* ● Transactions: more mature support – including multi-statement ● Constraints: enforce data rules absolutely ● Consistency: enforce structure 100% ● Complex reporting: keep management happy! ● Vertical scaling (but not horizontal) * mature ones, anyway
  • 61. SQL vs. Not SQL SQL promotes: ● portability ● managed changes over time ● multi-application access ● many mature tools
  • 62. SQL vs. Not SQL But … SQL is a full programming language, and you have to learn it to use it.
  • 63. SQL vs. Not SQL No-SQL allows: ● programmers as DBAs ● no impedance ● fast interfaces ● fast development
  • 64. The main reason to use SQL-RDBMSs
  • 65. “Immortal Data” your data has a life independent of this specif c i application implementation
  • 67. Def ne the problem i you are trying to solve
  • 68. “I need a database for my blog” ● “I need to add 1000's of objects per second on a low- end device.” ● “I need my database to enforce business rules across several applications.” ● “I want my application to be location-sensitive.” ● “I need to cache data an access it 100K times per second.” ● “I need to produce summary reports across 2TB of data.” ● “I have a few hundred government documents I need to serve on the web and mine” ● “I need to know who-knows-who-knows-who.” ● “I need to data mine 1000's of 30K bug reports per minute.”
  • 69. Def ne the features i you actually need ● many connections ● multi-server scalability ● complex query logic ● APIs ● redundancy ● data integrity ● schema/schemaless ● data mining
  • 70. i f t the database to the task
  • 71. “I need a database for my blog”
  • 72. Use anything! ● MySQL ● PostgreSQL ● MongoDB ● SQLite ● CouchDB ● Flatf les i ● DBaseIII ● Something you wrote yourself
  • 73. “I need my database to unify several applications and keep them consistent.”
  • 74. PostgreSQL “OLTP SQL-Relational Database” “It's not just a database: it's a development platform”
  • 76. “I need my application to be location-aware.”
  • 78. PostGIS ● Queries across “contains” “near” “closest” ● Complex geometric map objects – polygons – lines (roads, etc) ● Make your own Google Maps! – Sunday, 4:30pm, Concourse A
  • 79. “I need to store 1000's of event objects per second on embedded hardware.”
  • 81. db4object ● German Train System ● Insert 1000's of objects per second ● Low-end embedded console computer ● Simple access in native programming language (Java, .NET) ● compromise: embedded SQL database: SQLite
  • 82. “I need to access 100K objects per second over 1000's of connections.”
  • 84. memcached ● Use: public website ● Used for caching 1000's of serialized objects per second ● Available for 100000's of requests per second across 1000's of connections ● Cache each object only once per site ● Supplements a relational database Alternatives: Redis, TokyoTyrant
  • 85. “I need to produce complex summary reports over 2TB of data.”
  • 87. LucidDB ● For reporting and analysis ● Large quantities of data (TB) ● Complex OLAP & analytics queries ● Business intelligence ● compliments a transactional database
  • 88. “I have 100's of government documents I need to serve on the web and mine for data.”
  • 90. CouchDB 1.CividDB Project 2.Storing lots and lots of government documents 3.Don't know what's in them 4.Don't know how they are structured 5.Store them, f gure out structure later by data i mining. It's also good for web sites!
  • 91. “I have a social application and I need to know who-knows- who-knows- who-knows- who-knows-who.”
  • 93. Neo4j ● Social Network Website ● 6 degrees of separation ● “you may also like” ● type and degrees of relationship
  • 94. “I get 1000's of 30K bug reports per minute and I need to mine them for trends.”
  • 96. Hadoop ● Massive bug report data feed ● 1000's of bug reports per minute ● Each bug report 2-45K of data ● Need to extract trends and correlate inexact data ● Summarize in daily & weekly reports
  • 97. Conclusion ● Different database systems do better at different tasks. – every database feature is a tradeoff – no database can do all things well ● Relational vs. non-relational doesn't matter – pick the database(s) for the project or the task
  • 98. Questions? ● PostgreSQL Project ● PostgreSQL Booth – www.postgresql.org trade show f oor l – josh@postgresql.org ● PostgreSQL 9.0 ● PostgreSQL Experts BOF, Tonight 7pm – www.pgexperts.com ● www.pgexperts.com/documents.html ● Open Source Database Survey – Selena Deckleman – Open Source Database Survey: www.ossdbsurvey.org Copyright 2010 Josh Berkus, distributable under the creative commons attribution license, except for 3rd-party images which are property of their respective owners. Special thanks to Selena Deckelman for the bunnies image and for the Open Source Database survey.