SlideShare a Scribd company logo
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
No Sql
No Sql
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/
No Sql
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
No Sql
Background check
first developed by Facebook
      for inbox search


  now also used by Twitter,
          Digg, ...
No Sql
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

PPTX
Dexjava Technical Seminar Dec 2011
ODP
Grails goes Graph
PDF
Bcn On Rails May2010 On Graph Databases
PPTX
Spark and Shark: Lightning-Fast Analytics over Hadoop and Hive Data
PDF
A Content Repository for TYPO3 5.0
PDF
Data Aggregation System
PDF
MongoDB at the energy frontier
PDF
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
Dexjava Technical Seminar Dec 2011
Grails goes Graph
Bcn On Rails May2010 On Graph Databases
Spark and Shark: Lightning-Fast Analytics over Hadoop and Hive Data
A Content Repository for TYPO3 5.0
Data Aggregation System
MongoDB at the energy frontier
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)

What's hot (6)

PDF
PDF
Why Spark Is the Next Top (Compute) Model
PPTX
A unified data modeler in the world of big data
PPTX
Scaling Big Data Mining Infrastructure Twitter Experience
PDF
Federated HDFS
PDF
Mongony aug10
Why Spark Is the Next Top (Compute) Model
A unified data modeler in the world of big data
Scaling Big Data Mining Infrastructure Twitter Experience
Federated HDFS
Mongony aug10
Ad

Viewers also liked (20)

PDF
Polyglot Persistence
PDF
PPTX
Unlikeliest World Series participants since 2000
PDF
25. tvc renamevasc
PDF
Bonus-1-GuidetoRelaxationTherapy
PPTX
V-Kid Knowledge Boost (VKKB) Program Highlights
PPTX
Pfplace presentacion
PDF
World Micro Portal Training Presentation
PDF
Guia sexual 16
PDF
Studio 3D Portfolio
PPTX
Versao 33895
DOCX
Secuencia didactica (2)
PPTX
The script
PDF
D13.1 ARIADNE Service Design
PDF
Librolactancia1
PPTX
Cicle urbà de l’aigua (Grup 8)
PDF
On a Deterministic Property of the Category of k-almost Primes: A Determinist...
PDF
Zdrowie 2.0 definicja i szanse rozwoju w Polsce i Europie - Marcin Zawisza
PDF
Mughal smith email
Polyglot Persistence
Unlikeliest World Series participants since 2000
25. tvc renamevasc
Bonus-1-GuidetoRelaxationTherapy
V-Kid Knowledge Boost (VKKB) Program Highlights
Pfplace presentacion
World Micro Portal Training Presentation
Guia sexual 16
Studio 3D Portfolio
Versao 33895
Secuencia didactica (2)
The script
D13.1 ARIADNE Service Design
Librolactancia1
Cicle urbà de l’aigua (Grup 8)
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
Mughal smith email
Ad

Similar to No Sql (20)

PPTX
No sql introduction_v1.1.1
PPTX
Big Data (NJ SQL Server User Group)
KEY
Spring Data Neo4j Intro SpringOne 2011
PPTX
Intro to Big Data and NoSQL
PDF
3/15 - Intro to Spring Data Neo4j
PPTX
No Sql Movement
PDF
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
PPTX
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
KEY
Mark ramm To relate or not to relate
PPTX
An Introduction to Big Data, NoSQL and MongoDB
PDF
Seminar.2010.NoSql
PPTX
PDF
Spring one2gx2010 spring-nonrelational_data
PDF
Is NoSQL The Future of Data Storage?
PDF
Transition from relational to NoSQL Philly DAMA Day
PDF
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
PDF
Scaling Databases On The Cloud
PDF
Scaing databases on the cloud
PDF
No SQL Technologies
PDF
Sql no sql
No sql introduction_v1.1.1
Big Data (NJ SQL Server User Group)
Spring Data Neo4j Intro SpringOne 2011
Intro to Big Data and NoSQL
3/15 - Intro to Spring Data Neo4j
No Sql Movement
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
Mark ramm To relate or not to relate
An Introduction to Big Data, NoSQL and MongoDB
Seminar.2010.NoSql
Spring one2gx2010 spring-nonrelational_data
Is NoSQL The Future of Data Storage?
Transition from relational to NoSQL Philly DAMA Day
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Scaling Databases On The Cloud
Scaing databases on the cloud
No SQL Technologies
Sql no sql

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Dropbox Q2 2025 Financial Results & Investor Presentation
GamePlan Trading System Review: Professional Trader's Honest Take
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
Advanced Soft Computing BINUS July 2025.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf

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
  • 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/
  • 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
  • 37. Background check first developed by Facebook for inbox search now also used by Twitter, Digg, ...
  • 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