SlideShare une entreprise Scribd logo
1  sur  98
Télécharger pour lire hors ligne
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.

Contenu connexe

Tendances

NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big dataSteven Francia
 
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 StorageBethmi Gunasekara
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQLRTigger
 
Schemaless Databases
Schemaless DatabasesSchemaless Databases
Schemaless DatabasesDan Gunter
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Managementsameerfaizan
 
NoSQL Slideshare Presentation
NoSQL Slideshare Presentation NoSQL Slideshare Presentation
NoSQL Slideshare Presentation Ericsson Labs
 
NoSQL Data Architecture Patterns
NoSQL Data ArchitecturePatternsNoSQL Data ArchitecturePatterns
NoSQL Data Architecture PatternsMaynooth University
 
NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduceJ Singh
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL DatabasesBADR
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
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 ProsAndrew Brust
 
NoSQL and The Big Data Hullabaloo
NoSQL and The Big Data HullabalooNoSQL and The Big Data Hullabaloo
NoSQL and The Big Data HullabalooAndrew Brust
 

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

En vedette

Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databasesJames Serra
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendationsproksik
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph DatabasesInfiniteGraph
 
Converting Relational to Graph Databases
Converting Relational to Graph DatabasesConverting Relational to Graph Databases
Converting Relational to Graph DatabasesAntonio Maccioni
 
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, ...Neo4j
 
Graph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayGraph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayDataStax Academy
 
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 - CastanoCodemotion
 
Relational to Graph - Import
Relational to Graph - ImportRelational to Graph - Import
Relational to Graph - ImportNeo4j
 
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
 
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 Neo4jDebanjan Mahata
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDaysNeo4j
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4jNeo4j
 
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 analysisDataminingTools Inc
 

En vedette (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
 

Similaire à Relational vs. Non-Relational

Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Ontico
 
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]Huy Do
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At CraigslistMySQLConference
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionBrian Enochson
 
Development without Constraint
Development without ConstraintDevelopment without Constraint
Development without ConstraintChad Davis
 
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
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLbalwinders
 
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 MongoDBWilliam LaForest
 
NOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the CloudNOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the Cloudboorad
 
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 databaseRobert Lujo
 
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 CassasdraBrian Enochson
 
Augmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure DataAugmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure DataTreasure Data, Inc.
 
Augmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure dataAugmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure dataTreasure Data, Inc.
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology LandscapeShivanandaVSeeri
 

Similaire à 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
 

Plus de PostgreSQL Experts, Inc.

PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsPostgreSQL Experts, Inc.
 

Plus de 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
 

Dernier

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 

Dernier (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 

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.