SlideShare a Scribd company logo
1 of 46
Download to read offline
NoSQL
An Introduction
Internet Briefing Developer Konferenz, 7/4/2010



Michael Marth
@michaelmarth | www.marth.ch

marth.software.services
“NoSQL” ???



Product?   Technology?
“NoSQL” ???



  Product?              Technology?
      persistence


Bunch of proje cts w ih share d interes t
relational     non-relational


    your requirements



Not only SQL
NoSQL Focus

data models     scalability
NoSQL Focus
                  ly?
                         shard
                al
                                 ing
              Re
                        read-
                               slave
                        vertic       s
                              al sc
                                   aling
data models      scalability
NoSQL Focus
                            what is
                                    scaling
                            1. Horizontal
                                          scale:
scalability
                              more ser
                                       vers crea
                              capacity           tes more

                           2. Trans
                                    parent t
                              applicati      o the
                                        on:
                              the busin
                                        ess logic
                             app shou              of the
                                       ld be se
                             from con           parated
                                      cerns of
                            server re            scaling
                                      sources
                        3. No sin
                                  gle point
                           no one s          of failur
                                    erver wh           e:
                          lost, cau           ich, if
                                    ses down
                          the appl            time of
                                   ication



              http://adam.blog.heroku.com/past/2009/7/6/sql_databases_dont_scale/
reme mber the
  ambrian E xplosion?
C
according to http://nosql-database.org:




                Column stores
                   Key Value / Tuple Store
                Document stores
                     Eventually Consistent
                     Key Value Store
                 Graph Databases
                  XML Databases
Column stores               Key Value / Tuple Store
                            Chordless
 Hadoop / HBase                                      Berkeley DB
                            Redis!
 Cassandra                                           MemcacheDB
                            Scalaris
 Hypertable                                          Mnesia
                            Tokyo Cabinet / Tyrant
                                                     LightCloud
                            GT.M
                                                     HamsterDB
Document stores             Scalien


Jackrabbit     Riak         Eventually Consistent
CouchDB        Terrastore
MongoDB        ThruDB       Key Value Store
Terrastore     CloudKit
                            Voldemort
                            Dynomite                           a lm
                                                                    o
                            KAI                                ope s t a l l
                                                                   n s o a re
                                                                        u rc
                                                                             e
Graph Databases               XML Databases
Neo4J                          Mark Logic Server
InfoGrid                                               Sedna
                               EMC Documentum xDB !
Sones                                                  Xindice
                               Tamino
HyperGraphDB                                           Berkeley DB XML
                               eXist
Background check
 large contributions by web
 content management system
     vendor Day (Basel)
Data Model
 stuc
     ture           mandatory fields
          d         field types

    schem
                    allowed parents
         a
                    etc.


   unst
             ruct
                    ured
                    look Ma, no schema!

              s
     schemales
1 Data First

2 Structure    Structure First
  later
     (maybe)
Data Model


                 title:

      granular   nosql
                 date:
                 20/3/2010



      binary
Data Model
                granular
                  binary

 1
     ordere d
 2
Data Model
                granular
                  binary

                 ordered

  node-level access
      control
Data Model
                granular
                  binary

                 ordered

        node-level access
            control


   versioning
The Sweet Spot
    web content




           http://www.flickr.com/photos/blentley/2951836266/
Background check
       ideas and 1st
implementations by ex-Notes
         developer
Data Model

Documents
 {                       schemaless
     “_id”: “abc”,
     “title”: “NoSQL”,   JSON
     “tags”:
     [                   binary attachments
        “data model”,
        “scalability”
     ],
     “_rev”: 1234
 }
Interface

  ODBC?
  JDBC?
  HTTP! + JSON
Interface
read
GET /somedatabase/some_doc_id?rev=946B7D1C HTTP/1.0

write
POST /somedatabase/ HTTP/1.0
Content-Length: 245
Content-Type: application/json

{
    "Subject":"I like Plankton",
    "Author":"Rusty"
}

delete
DELETE /somedatabase/some_doc?rev=1582603387 HTTP/1.0
quer y



    “No SQL”,
   remember?
meet “map-reduce”
all documents           results of map

  1             map()                    reduce()
      2                      result 1
          3
                             result 2               result of reduce

                             result 3




              parallel
example: map-reduce
                                                    {
{                                                       "total_rows":2,
    id: “abc”,                                          "offset":0,
    title: “nosql”,                                     "rows":
    type: “talk”                                        [
}                     function(doc) {                     {
                        if (doc.type == "talk") {            "id":"abc",
                          emit(doc.title, doc);              "key":"nosql",
                        }                                    "value": {id: “abc”,
{                                                              title: “nosql”, type: “talk”}
    id: “xyz”,        }
                                                          },
    title: “ajax”,                                        {
    type: “talk”                                             "id":"xyz",
}                                                            "key":"ajax",
                               map                           "value": {id: “xyz”,
                                                               title: “ajax”, type: “talk”}
                                                          }
                                                        ]
                                                    }
example: map-reduce
{
    "total_rows":2,
    "offset":0,
    "rows":
    [
      {
         "id":"abc",
         "key":"nosql",                    function (key, values, rereduce) {
         "value": {id: “abc”,                  return sum(values);
           title: “nosql”, type: “talk”}   }
      },
      {
         "id":"xyz",
         "key":"ajax",
                                                  re duce
         "value": {id: “xyz”,
           title: “ajax”, type: “talk”}
      }
    ]
}
Designed for Replication
                            t io n
            e not the excep
co nflicts ar




                 master                    master


                                              (incremental)
                                         replication on demand


                                master
Distributed Address Book




server                      desktop




                mobile
         (partial replication)
The Sweet Spot
 distributed databases with
     schemaless data




                 http://www.flickr.com/photos/blentley/2951836266/
Eric Brewer:

       CAP Theorem

Consistency            choose any 2
    Availability              application
                               trade-off
        Partition tolerance
client 1                client 2
      write                        reads consistent value




              db   replicate     db


1 transaction


                1 Partition
                2 Consistency
client 1                 client 2
write                         reads inconsistent data
                                 until replication

                                                      een
                                           time betw
        db   replicate     db                  clicks?
                                    DNS


         1 Partition
         2 Availability
Background check
first developed by Facebook
      for inbox search


  now also used by Twitter,
          Digg, ...
Data Model


k        v
     on s tero id s
Data Model
keyspace Twitter

 column family Statuses

  key   columns
  123   user_id: “abc”    text: “i can haz cheesburger”

  456   user_id: “abc”    reply-to: “123” text: “nom nom”

                                                  plus super-co lumns

 column family Users
High Lights

        datacenter aware

•   High availability

•   Eventually consistent

•   Tunable tradeoffs between consistency and latency

•   No Single Point of Failure
                   no no de in the clus ter is spec
                                                   ial
The Sweet Spot
 really large data sets,
 really high availability




                http://www.flickr.com/photos/blentley/2951836266/
I’ve seen this
    before
reme mber the
  ambrian E xplosion?
C



extinct
“Polyglot Programming”
                           Neal Ford, 2006



“Polyglot Persistence”
             Scott Leberknight , 2009
questions




      ?
@michaelmarth | www.marth.ch

More Related Content

What's hot

Why Spark Is the Next Top (Compute) Model
Why Spark Is the Next Top (Compute) ModelWhy Spark Is the Next Top (Compute) Model
Why Spark Is the Next Top (Compute) ModelDean Wampler
 
A unified data modeler in the world of big data
A unified data modeler in the world of big dataA unified data modeler in the world of big data
A unified data modeler in the world of big dataWilliam Luk
 
Scaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter ExperienceScaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter ExperienceDataWorks Summit
 
Federated HDFS
Federated HDFSFederated HDFS
Federated HDFShuguk
 
Mongony aug10
Mongony aug10Mongony aug10
Mongony aug10bwmcadams
 

What's hot (6)

Migrate
MigrateMigrate
Migrate
 
Why Spark Is the Next Top (Compute) Model
Why Spark Is the Next Top (Compute) ModelWhy Spark Is the Next Top (Compute) Model
Why Spark Is the Next Top (Compute) Model
 
A unified data modeler in the world of big data
A unified data modeler in the world of big dataA unified data modeler in the world of big data
A unified data modeler in the world of big data
 
Scaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter ExperienceScaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter Experience
 
Federated HDFS
Federated HDFSFederated HDFS
Federated HDFS
 
Mongony aug10
Mongony aug10Mongony aug10
Mongony aug10
 

Viewers also liked

Unlikeliest World Series participants since 2000
Unlikeliest World Series participants since 2000Unlikeliest World Series participants since 2000
Unlikeliest World Series participants since 2000Amos Luis
 
Bonus-1-GuidetoRelaxationTherapy
Bonus-1-GuidetoRelaxationTherapyBonus-1-GuidetoRelaxationTherapy
Bonus-1-GuidetoRelaxationTherapySamantha Hembling
 
V-Kid Knowledge Boost (VKKB) Program Highlights
V-Kid Knowledge Boost (VKKB) Program HighlightsV-Kid Knowledge Boost (VKKB) Program Highlights
V-Kid Knowledge Boost (VKKB) Program HighlightsBV Swami
 
World Micro Portal Training Presentation
World Micro Portal Training PresentationWorld Micro Portal Training Presentation
World Micro Portal Training PresentationDaniel McMillen
 
Studio 3D Portfolio
Studio 3D PortfolioStudio 3D Portfolio
Studio 3D PortfolioEricCamper
 
Secuencia didactica (2)
Secuencia didactica (2)Secuencia didactica (2)
Secuencia didactica (2)inezflorez51
 
The script
The scriptThe script
The scriptmopish
 
D13.1 ARIADNE Service Design
D13.1 ARIADNE Service DesignD13.1 ARIADNE Service Design
D13.1 ARIADNE Service Designariadnenetwork
 
Cicle urbà de l’aigua (Grup 8)
Cicle urbà de l’aigua (Grup 8)Cicle urbà de l’aigua (Grup 8)
Cicle urbà de l’aigua (Grup 8)Jon Izquierdo Pujol
 
On a Deterministic Property of the Category of k-almost Primes: A Determinist...
On a Deterministic Property of the Category of k-almost Primes: A Determinist...On a Deterministic Property of the Category of k-almost Primes: A Determinist...
On a Deterministic Property of the Category of k-almost Primes: A Determinist...Ramin (A.) Zahedi
 

Viewers also liked (20)

Polyglot Persistence
Polyglot PersistencePolyglot Persistence
Polyglot Persistence
 
DeArGe Mitteilungen 3/2003
DeArGe Mitteilungen 3/2003DeArGe Mitteilungen 3/2003
DeArGe Mitteilungen 3/2003
 
Unlikeliest World Series participants since 2000
Unlikeliest World Series participants since 2000Unlikeliest World Series participants since 2000
Unlikeliest World Series participants since 2000
 
25. tvc renamevasc
25. tvc renamevasc25. tvc renamevasc
25. tvc renamevasc
 
Bonus-1-GuidetoRelaxationTherapy
Bonus-1-GuidetoRelaxationTherapyBonus-1-GuidetoRelaxationTherapy
Bonus-1-GuidetoRelaxationTherapy
 
V-Kid Knowledge Boost (VKKB) Program Highlights
V-Kid Knowledge Boost (VKKB) Program HighlightsV-Kid Knowledge Boost (VKKB) Program Highlights
V-Kid Knowledge Boost (VKKB) Program Highlights
 
Pfplace presentacion
Pfplace presentacionPfplace presentacion
Pfplace presentacion
 
World Micro Portal Training Presentation
World Micro Portal Training PresentationWorld Micro Portal Training Presentation
World Micro Portal Training Presentation
 
Guia sexual 16
Guia sexual 16Guia sexual 16
Guia sexual 16
 
Studio 3D Portfolio
Studio 3D PortfolioStudio 3D Portfolio
Studio 3D Portfolio
 
Versao 33895
Versao 33895Versao 33895
Versao 33895
 
Secuencia didactica (2)
Secuencia didactica (2)Secuencia didactica (2)
Secuencia didactica (2)
 
The script
The scriptThe script
The script
 
5
55
5
 
D13.1 ARIADNE Service Design
D13.1 ARIADNE Service DesignD13.1 ARIADNE Service Design
D13.1 ARIADNE Service Design
 
Librolactancia1
Librolactancia1Librolactancia1
Librolactancia1
 
Cicle urbà de l’aigua (Grup 8)
Cicle urbà de l’aigua (Grup 8)Cicle urbà de l’aigua (Grup 8)
Cicle urbà de l’aigua (Grup 8)
 
On a Deterministic Property of the Category of k-almost Primes: A Determinist...
On a Deterministic Property of the Category of k-almost Primes: A Determinist...On a Deterministic Property of the Category of k-almost Primes: A Determinist...
On a Deterministic Property of the Category of k-almost Primes: A Determinist...
 
Zdrowie 2.0 definicja i szanse rozwoju w Polsce i Europie - Marcin Zawisza
Zdrowie 2.0 definicja i szanse rozwoju w Polsce i Europie - Marcin ZawiszaZdrowie 2.0 definicja i szanse rozwoju w Polsce i Europie - Marcin Zawisza
Zdrowie 2.0 definicja i szanse rozwoju w Polsce i Europie - Marcin Zawisza
 
Mughal smith email
Mughal smith emailMughal smith email
Mughal smith email
 

Similar to No Sql

Navigating NoSQL in cloudy skies
Navigating NoSQL in cloudy skiesNavigating NoSQL in cloudy skies
Navigating NoSQL in cloudy skiesshnkr_rmchndrn
 
Big data vahidamiri-tabriz-13960226-datastack.ir
Big data vahidamiri-tabriz-13960226-datastack.irBig data vahidamiri-tabriz-13960226-datastack.ir
Big data vahidamiri-tabriz-13960226-datastack.irdatastack
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerMichael Rys
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataRoger Xia
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and HowBigBlueHat
 
Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Ontico
 
Microsoft Openness Mongo DB
Microsoft Openness Mongo DBMicrosoft Openness Mongo DB
Microsoft Openness Mongo DBHeriyadi Janwar
 
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)Emil Eifrem
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)Emil Eifrem
 
Above the cloud: Big Data and BI
Above the cloud: Big Data and BIAbove the cloud: Big Data and BI
Above the cloud: Big Data and BIDenny Lee
 
NO SQL: What, Why, How
NO SQL: What, Why, HowNO SQL: What, Why, How
NO SQL: What, Why, HowIgor Moochnick
 
If NoSQL is your answer, you are probably asking the wrong question.
If NoSQL is your answer, you are probably asking the wrong question.If NoSQL is your answer, you are probably asking the wrong question.
If NoSQL is your answer, you are probably asking the wrong question.Lukas Smith
 
A walk down NOSQL Lane in the cloud
A walk down NOSQL Lane in the cloudA walk down NOSQL Lane in the cloud
A walk down NOSQL Lane in the cloudsiculars
 
NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...
NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...
NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...Felix Gessert
 
Vote NO for MySQL
Vote NO for MySQLVote NO for MySQL
Vote NO for MySQLUlf Wendel
 

Similar to No Sql (20)

Navigating NoSQL in cloudy skies
Navigating NoSQL in cloudy skiesNavigating NoSQL in cloudy skies
Navigating NoSQL in cloudy skies
 
Big data vahidamiri-tabriz-13960226-datastack.ir
Big data vahidamiri-tabriz-13960226-datastack.irBig data vahidamiri-tabriz-13960226-datastack.ir
Big data vahidamiri-tabriz-13960226-datastack.ir
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_data
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)Реляционные или нереляционные (Josh Berkus)
Реляционные или нереляционные (Josh Berkus)
 
Microsoft Openness Mongo DB
Microsoft Openness Mongo DBMicrosoft Openness Mongo DB
Microsoft Openness Mongo DB
 
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
 
NoSQL Basics and MongDB
NoSQL Basics and  MongDBNoSQL Basics and  MongDB
NoSQL Basics and MongDB
 
Above the cloud: Big Data and BI
Above the cloud: Big Data and BIAbove the cloud: Big Data and BI
Above the cloud: Big Data and BI
 
NO SQL: What, Why, How
NO SQL: What, Why, HowNO SQL: What, Why, How
NO SQL: What, Why, How
 
If NoSQL is your answer, you are probably asking the wrong question.
If NoSQL is your answer, you are probably asking the wrong question.If NoSQL is your answer, you are probably asking the wrong question.
If NoSQL is your answer, you are probably asking the wrong question.
 
Eifrem neo4j
Eifrem neo4jEifrem neo4j
Eifrem neo4j
 
A walk down NOSQL Lane in the cloud
A walk down NOSQL Lane in the cloudA walk down NOSQL Lane in the cloud
A walk down NOSQL Lane in the cloud
 
NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...
NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...
NoSQL Data Stores in Research and Practice - ICDE 2016 Tutorial - Extended Ve...
 
NoSql Databases
NoSql DatabasesNoSql Databases
NoSql Databases
 
Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
Mongodb lab
Mongodb labMongodb lab
Mongodb lab
 
Vote NO for MySQL
Vote NO for MySQLVote NO for MySQL
Vote NO for MySQL
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

No Sql

  • 1. NoSQL An Introduction Internet Briefing Developer Konferenz, 7/4/2010 Michael Marth @michaelmarth | www.marth.ch marth.software.services
  • 3. “NoSQL” ??? Product? Technology? persistence Bunch of proje cts w ih share d interes t
  • 4. relational non-relational your requirements Not only SQL
  • 6. NoSQL Focus ly? shard al ing Re read- slave vertic s al sc aling data models scalability
  • 7. NoSQL Focus what is scaling 1. Horizontal scale: scalability more ser vers crea capacity tes more 2. Trans parent t applicati o the on: the busin ess logic app shou of the ld be se from con parated cerns of server re scaling sources 3. No sin gle point no one s of failur erver wh e: lost, cau ich, if ses down the appl time of ication http://adam.blog.heroku.com/past/2009/7/6/sql_databases_dont_scale/
  • 8. reme mber the ambrian E xplosion? C
  • 9. according to http://nosql-database.org: Column stores Key Value / Tuple Store Document stores Eventually Consistent Key Value Store Graph Databases XML Databases
  • 10. Column stores Key Value / Tuple Store Chordless Hadoop / HBase Berkeley DB Redis! Cassandra MemcacheDB Scalaris Hypertable Mnesia Tokyo Cabinet / Tyrant LightCloud GT.M HamsterDB Document stores Scalien Jackrabbit Riak Eventually Consistent CouchDB Terrastore MongoDB ThruDB Key Value Store Terrastore CloudKit Voldemort Dynomite a lm o KAI ope s t a l l n s o a re u rc e Graph Databases XML Databases Neo4J Mark Logic Server InfoGrid Sedna EMC Documentum xDB ! Sones Xindice Tamino HyperGraphDB Berkeley DB XML eXist
  • 11.
  • 12.
  • 13. Background check large contributions by web content management system vendor Day (Basel)
  • 14. Data Model stuc ture mandatory fields d field types schem allowed parents a etc. unst ruct ured look Ma, no schema! s schemales
  • 15. 1 Data First 2 Structure Structure First later (maybe)
  • 16. Data Model title: granular nosql date: 20/3/2010 binary
  • 17. Data Model granular binary 1 ordere d 2
  • 18. Data Model granular binary ordered node-level access control
  • 19. Data Model granular binary ordered node-level access control versioning
  • 20. The Sweet Spot web content http://www.flickr.com/photos/blentley/2951836266/
  • 21.
  • 22. Background check ideas and 1st implementations by ex-Notes developer
  • 23. Data Model Documents { schemaless “_id”: “abc”, “title”: “NoSQL”, JSON “tags”: [ binary attachments “data model”, “scalability” ], “_rev”: 1234 }
  • 24. Interface ODBC? JDBC? HTTP! + JSON
  • 25. Interface read GET /somedatabase/some_doc_id?rev=946B7D1C HTTP/1.0 write POST /somedatabase/ HTTP/1.0 Content-Length: 245 Content-Type: application/json { "Subject":"I like Plankton", "Author":"Rusty" } delete DELETE /somedatabase/some_doc?rev=1582603387 HTTP/1.0
  • 26. quer y “No SQL”, remember? meet “map-reduce”
  • 27. all documents results of map 1 map() reduce() 2 result 1 3 result 2 result of reduce result 3 parallel
  • 28. example: map-reduce { { "total_rows":2, id: “abc”, "offset":0, title: “nosql”, "rows": type: “talk” [ } function(doc) { { if (doc.type == "talk") { "id":"abc", emit(doc.title, doc); "key":"nosql", } "value": {id: “abc”, { title: “nosql”, type: “talk”} id: “xyz”, } }, title: “ajax”, { type: “talk” "id":"xyz", } "key":"ajax", map "value": {id: “xyz”, title: “ajax”, type: “talk”} } ] }
  • 29. example: map-reduce { "total_rows":2, "offset":0, "rows": [ { "id":"abc", "key":"nosql", function (key, values, rereduce) { "value": {id: “abc”, return sum(values); title: “nosql”, type: “talk”} } }, { "id":"xyz", "key":"ajax", re duce "value": {id: “xyz”, title: “ajax”, type: “talk”} } ] }
  • 30. Designed for Replication t io n e not the excep co nflicts ar master master (incremental) replication on demand master
  • 31. Distributed Address Book server desktop mobile (partial replication)
  • 32. The Sweet Spot distributed databases with schemaless data http://www.flickr.com/photos/blentley/2951836266/
  • 33. Eric Brewer: CAP Theorem Consistency choose any 2 Availability application trade-off Partition tolerance
  • 34. client 1 client 2 write reads consistent value db replicate db 1 transaction 1 Partition 2 Consistency
  • 35. client 1 client 2 write reads inconsistent data until replication een time betw db replicate db clicks? DNS 1 Partition 2 Availability
  • 36.
  • 37. Background check first developed by Facebook for inbox search now also used by Twitter, Digg, ...
  • 38.
  • 39. Data Model k v on s tero id s
  • 40. Data Model keyspace Twitter column family Statuses key columns 123 user_id: “abc” text: “i can haz cheesburger” 456 user_id: “abc” reply-to: “123” text: “nom nom” plus super-co lumns column family Users
  • 41. High Lights datacenter aware • High availability • Eventually consistent • Tunable tradeoffs between consistency and latency • No Single Point of Failure no no de in the clus ter is spec ial
  • 42. The Sweet Spot really large data sets, really high availability http://www.flickr.com/photos/blentley/2951836266/
  • 44. reme mber the ambrian E xplosion? C extinct
  • 45. “Polyglot Programming” Neal Ford, 2006 “Polyglot Persistence” Scott Leberknight , 2009
  • 46. questions ? @michaelmarth | www.marth.ch