SlideShare a Scribd company logo
1 of 56
NoSQL Smackdown
                            2012 edition

   Tim Berglund
  @tlberglund
Wednesday, October 17, 12                  1
@tlberglund

                              #nosql
Wednesday, October 17, 12                 2
SQL
Wednesday, October 17, 12         3
Wednesday, October 17, 12   4
Wednesday, October 17, 12   5
Wednesday, October 17, 12   6
Wednesday, October 17, 12   7
Wednesday, October 17, 12   8
Wednesday, October 17, 12   9
Wednesday, October 17, 12   10
Wednesday, October 17, 12   11
Wednesday, October 17, 12   12
Metadata
                             Data model
                             Scale idiom
                             Queryability
                               License
Wednesday, October 17, 12                   13
Wednesday, October 17, 12   14
name:   role:     status:
                            tim
                                    Tim   teacher     Cool




Wednesday, October 17, 12                                     15
name:     role:        status:
                              tim
                                         Tim     teacher        Cool


                                      name:      role:
                            kristen               marketing
                                       Kristen




Wednesday, October 17, 12                                               16
name:     role:        status:
                              tim
                                         Tim     teacher        Cool


                                      name:      role:
                            kristen               marketing
                                       Kristen


                            billy      role:
                                        CEO




Wednesday, October 17, 12                                               17
name:      role:        status:
                              tim
                                         Tim      teacher        Cool


                                      name:      role:
                            kristen               marketing
                                       Kristen


                            billy      role:
                                        CEO


                                      name:      role:        status:
                            matt
                                       Matt       founder      ubercool




Wednesday, October 17, 12                                                 18
Outer hash key                     Inner hash key

                                          name:      role:        status:
                                  tim
                                            Tim      teacher        Cool


                                         name:      role:
                               kristen               marketing
                                          Kristen


                                billy     role:
                                           CEO


                                         name:      role:        status:
                               matt
                                          Matt       founder      ubercool




Wednesday, October 17, 12                                                    19
Scale Idiom
                               Amazon Dynamo
                             Horizontal scalability
                            No distinguished nodes
                                Fault tolerance
Wednesday, October 17, 12                             20
Queries
                            Nested hash table lookup
                               Single primary key
                                Ranged lookups

Wednesday, October 17, 12                              21
Queries
                            Ad-Hoc Query Language:

                                  CQL
Wednesday, October 17, 12                            22
Queries
                            CREATE COLUMNFAMILY Contacts (KEY uuid PRIMARY KEY);

                            CREATE COLUMNFAMILY Monkey (KEY text PRIMARY KEY,
                                                        id_tag long,
                                                        emotion text)
                              WITH comment='Simian Emotional States'
                              AND read_repair_chance = 0.5;




Wednesday, October 17, 12                                                          23
Queries
                            UPDATE Contacts SET name='Tim Berglund'
                              WHERE KEY = B70DE1D0-9908-4AE3-BE34-5573E5B09F14;

                            UPDATE Monkeys
                              USING CONSISTENCY EACH_QUORUM
                              SET emotion = 'Angry',
                                  name = 'Baby Boss'
                              WHERE KEY = 'OREILLY:8827';




Wednesday, October 17, 12                                                         24
Queries
                            SELECT * FROM Contacts
                              WHERE KEY = B70DE1D0-9908-4AE3-BE34-5573E5B09F14;

                            SELECT FIRST 1000 FROM Temperatures
                              WHERE KEY = 7627748986;

                            SELECT emotion, id_tag FROM Monkeys
                              USING CONSISTENCY ONE
                              WHERE KEY = 'OREILLY:8827';



Wednesday, October 17, 12                                                         25
License
                            Apache Public License 2.0
                                   DataStax
                            http://datastax.com/dev


Wednesday, October 17, 12                               26
Overview
                                 The leader at scale
                             Data model learning curve
                            Great backing from DataStax
                            Innovation (Brisk, Solandra)
Wednesday, October 17, 12                                  27
Wednesday, October 17, 12   28
Data Model

                            Document Database



Wednesday, October 17, 12                       29
Data Model
                            {
                                name: "Hubert Poston",
                                username: "hposton",
                                password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace",
                                active: true,
                                lastLogin: ISODate('2012-01-19 16:37:03'),
                                loginCount: 873,
                                rating: 8.6,
                                roles: ["ADMIN", "USER", "BOSS"],
                                address: {
                                  street1: "984 Sunny Glen Lane",
                                  city: "Warrensville Heights",
                                  province: "OH",
                                  postalCode: "44128"
                                }
                            }



Wednesday, October 17, 12                                                               30
Data Model
                            {
                                name: "Hubert Poston",
                                username: "hposton",
                                password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace",
                                active: true,
                                lastLogin: ISODate('2012-01-19 16:37:03'),
                                loginCount: 873,
                                rating: 8.6,
                                roles: ["ADMIN", "USER", "BOSS"],
                                address: {
                                  street1: "984 Sunny Glen Lane",
                                  city: "Warrensville Heights",
                                  province: "OH",
                                  postalCode: "44128"
                                }
                            }



Wednesday, October 17, 12                                                               31
Data Model
                            {
                                name: "Hubert Poston",
                                username: "hposton",
                                password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace",
                                active: true,
                                lastLogin: ISODate('2012-01-19 16:37:03'),
                                loginCount: 873,
                                rating: 8.6,
                                roles: ["ADMIN", "USER", "BOSS"],
                                address: {
                                  street1: "984 Sunny Glen Lane",
                                  city: "Warrensville Heights",
                                  province: "OH",
                                  postalCode: "44128"
                                }
                            }



Wednesday, October 17, 12                                                               32
Data Model
                            {
                                name: "Hubert Poston",
                                username: "hposton",
                                password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace",
                                active: true,
                                lastLogin: ISODate('2012-01-19 16:37:03'),
                                loginCount: 873,
                                rating: 8.6,
                                roles: ["ADMIN", "USER", "BOSS"],
                                address: {
                                  street1: "984 Sunny Glen Lane",
                                  city: "Warrensville Heights",
                                  province: "OH",
                                  postalCode: "44128"
                                }
                            }



Wednesday, October 17, 12                                                               33
Data Model
                            {
                                name: "Hubert Poston",
                                username: "hposton",
                                password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace",
                                active: true,
                                lastLogin: ISODate('2012-01-19 16:37:03'),
                                loginCount: 873,
                                rating: 8.6,
                                roles: ["ADMIN", "USER", "BOSS"],
                                address: {
                                  street1: "984 Sunny Glen Lane",
                                  city: "Warrensville Heights",
                                  province: "OH",
                                  postalCode: "44128"
                                }
                            }



Wednesday, October 17, 12                                                               34
Scale Idiom
                             Single-master design
                            Master/slave replica sets
                                Auto-sharding
                              Like a nicer MySQL
Wednesday, October 17, 12                               35
Querying
                               Ad-hoc language
                              Secondary indexes
                            Many language bindings

Wednesday, October 17, 12                            36
Querying
                                              Creating a Record
                            db.users.insert({
                              firstName: "Tim",
                              lastName: "Berglund",
                              username: "tlberglund",
                              password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace"
                              active: true,
                              lastLogin: ISODate('2012-01-19 16:37:03'),
                              loginCount: 873,
                              roles: ["ADMIN", "USER", "BOSS"]
                            });

Wednesday, October 17, 12                                                            37
Querying
                                          Finding a Record


                        db.users.find({
                          username: "tlberglund",
                          password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace"
                        });




Wednesday, October 17, 12                                                        38
Querying
                                     Updating a record


                            db.users.update(
                               { username: "tlberglund" },
                               { $inc: { loginCount: 1 } }
                            );


Wednesday, October 17, 12                                    39
License

                               Database: AGPL 3.0
                                Drivers: APL 2.0
                       http://www.10gen.com/commercial-licenses



Wednesday, October 17, 12                                         40
Overview
                              NoSQL mindshare leader
                                    Easy to adopt
                            Usually used at smaller scale
                             Not your father’s database!
                            (More like your young uncle)
Wednesday, October 17, 12                                   41
Wednesday, October 17, 12   42
Data Model
                                  Graph Database
                             Nodes and Relationships
                            Arbitrary key/value bundles

Wednesday, October 17, 12                                 43
Data Model
                                    ...
                            How do I use that?

                                 Easily!
Wednesday, October 17, 12                        44
Data Model
                                      Graph Database                                          Traversal



                                      manages             manages               navigates        identifies   expresses



                            Indexes                             Graph                                         Algorithm




                                             map to       records data in                        Paths




                                  map to        Relationships               records data in         order



                            map from                      organize



                                            have       Nodes



                                                   have



                                  Properties



Wednesday, October 17, 12                                                                                                 45
Data Model
                                      Graph Database                                 Traversal



                                      manages          manages           navigates      identifies        e



                            Indexes                          Graph                                        A




                                             map to    records data in                  Paths
Wednesday, October 17, 12                                                                            46
Indexes                                       Graph                                   Algorithm


                                                   Data Model
                                      map to       records data in                     Paths




                            map to      Relationships                records data in     order



           map from                                organize



                                     have      Nodes



Wednesday, October 17, 12                   have                                                         47
map to        Data Model
                                               Relationships        records data in   order



                            map from                     organize



                                          have        Nodes



                                                  have



                                  Properties

Wednesday, October 17, 12                                                                     48
Scale Idiom
                               Single-master design
                             Master/slave replication
                            High-availability clustering
                              Always single-master
Wednesday, October 17, 12                                  49
Wednesday, October 17, 12   50
Querying

                            REST/JSON
                              Cypher

Wednesday, October 17, 12               51
License
                                GPL 3.0 (Community)
                            AGPL 3.0 (Advanced/Enterprise)
                                      Commercial

Wednesday, October 17, 12                                    52
Overview
                              The 95% niche
                            Usually commercial
                             Scales like MySQL
                              Affinity to ROA
Wednesday, October 17, 12                        53
Do you need this?

Wednesday, October 17, 12                       54
You will.

Wednesday, October 17, 12               55
Tim Berglund
                            http://timberglund.com
                            tlberglund@github.com
                                       @tlberglund




Wednesday, October 17, 12
                                      Thank You      56

More Related Content

Viewers also liked

Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...
Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...
Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...JAX London
 
Everything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexityEverything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexityJAX London
 
HTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun GuptaHTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun GuptaJAX London
 
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX London
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John StevensonJAX London
 
Hadoop as Data Refinery - Steve Loughran
Hadoop as Data Refinery - Steve LoughranHadoop as Data Refinery - Steve Loughran
Hadoop as Data Refinery - Steve LoughranJAX London
 

Viewers also liked (6)

Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...
Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...
Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...
 
Everything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexityEverything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexity
 
HTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun GuptaHTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun Gupta
 
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
Hadoop as Data Refinery - Steve Loughran
Hadoop as Data Refinery - Steve LoughranHadoop as Data Refinery - Steve Loughran
Hadoop as Data Refinery - Steve Loughran
 

More from JAX London

Worse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin HenneyWorse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin HenneyJAX London
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfJAX London
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter HiltonJAX London
 
Complexity theory and software development : Tim Berglund
Complexity theory and software development : Tim BerglundComplexity theory and software development : Tim Berglund
Complexity theory and software development : Tim BerglundJAX London
 
Why FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave GruberWhy FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave GruberJAX London
 
Akka in Action: Heiko Seeburger
Akka in Action: Heiko SeeburgerAkka in Action: Heiko Seeburger
Akka in Action: Heiko SeeburgerJAX London
 
Mongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsMongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsJAX London
 
New opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian RobinsonNew opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian RobinsonJAX London
 
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian PloskerThe Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian PloskerJAX London
 
No Crash Allowed - Patterns for fault tolerance : Uwe Friedrichsen
No Crash Allowed - Patterns for fault tolerance : Uwe FriedrichsenNo Crash Allowed - Patterns for fault tolerance : Uwe Friedrichsen
No Crash Allowed - Patterns for fault tolerance : Uwe FriedrichsenJAX London
 
Size does matter - Patterns for high scalability: Uwe Friedrichsen
Size does matter - Patterns for high scalability: Uwe FriedrichsenSize does matter - Patterns for high scalability: Uwe Friedrichsen
Size does matter - Patterns for high scalability: Uwe FriedrichsenJAX London
 
HBase Advanced - Lars George
HBase Advanced - Lars GeorgeHBase Advanced - Lars George
HBase Advanced - Lars GeorgeJAX London
 
Scala in Action - Heiko Seeburger
Scala in Action - Heiko SeeburgerScala in Action - Heiko Seeburger
Scala in Action - Heiko SeeburgerJAX London
 
Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...
Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...
Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...JAX London
 
Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...
Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...
Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...JAX London
 
Back to Basics - Hype-free Principles for Software Developers: Jason Gorman
Back to Basics - Hype-free Principles for Software Developers: Jason GormanBack to Basics - Hype-free Principles for Software Developers: Jason Gorman
Back to Basics - Hype-free Principles for Software Developers: Jason GormanJAX London
 
Realtime analytics with Apache Cassandra - Tom Wilkie
Realtime analytics with Apache Cassandra - Tom WilkieRealtime analytics with Apache Cassandra - Tom Wilkie
Realtime analytics with Apache Cassandra - Tom WilkieJAX London
 

More from JAX London (17)

Worse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin HenneyWorse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin Henney
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter Hilton
 
Complexity theory and software development : Tim Berglund
Complexity theory and software development : Tim BerglundComplexity theory and software development : Tim Berglund
Complexity theory and software development : Tim Berglund
 
Why FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave GruberWhy FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave Gruber
 
Akka in Action: Heiko Seeburger
Akka in Action: Heiko SeeburgerAkka in Action: Heiko Seeburger
Akka in Action: Heiko Seeburger
 
Mongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsMongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdams
 
New opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian RobinsonNew opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian Robinson
 
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian PloskerThe Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
 
No Crash Allowed - Patterns for fault tolerance : Uwe Friedrichsen
No Crash Allowed - Patterns for fault tolerance : Uwe FriedrichsenNo Crash Allowed - Patterns for fault tolerance : Uwe Friedrichsen
No Crash Allowed - Patterns for fault tolerance : Uwe Friedrichsen
 
Size does matter - Patterns for high scalability: Uwe Friedrichsen
Size does matter - Patterns for high scalability: Uwe FriedrichsenSize does matter - Patterns for high scalability: Uwe Friedrichsen
Size does matter - Patterns for high scalability: Uwe Friedrichsen
 
HBase Advanced - Lars George
HBase Advanced - Lars GeorgeHBase Advanced - Lars George
HBase Advanced - Lars George
 
Scala in Action - Heiko Seeburger
Scala in Action - Heiko SeeburgerScala in Action - Heiko Seeburger
Scala in Action - Heiko Seeburger
 
Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...
Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...
Achieving genuine elastic multitenancy with the Waratek Cloud VM for Java : J...
 
Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...
Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...
Choosing the right Agile innovation practices: Scrum vs Kanban vs Lean Startu...
 
Back to Basics - Hype-free Principles for Software Developers: Jason Gorman
Back to Basics - Hype-free Principles for Software Developers: Jason GormanBack to Basics - Hype-free Principles for Software Developers: Jason Gorman
Back to Basics - Hype-free Principles for Software Developers: Jason Gorman
 
Realtime analytics with Apache Cassandra - Tom Wilkie
Realtime analytics with Apache Cassandra - Tom WilkieRealtime analytics with Apache Cassandra - Tom Wilkie
Realtime analytics with Apache Cassandra - Tom Wilkie
 

NoSQL Smackdown 2012 : Tim Berglund

  • 1. NoSQL Smackdown 2012 edition Tim Berglund @tlberglund Wednesday, October 17, 12 1
  • 2. @tlberglund #nosql Wednesday, October 17, 12 2
  • 13. Metadata Data model Scale idiom Queryability License Wednesday, October 17, 12 13
  • 15. name: role: status: tim Tim teacher Cool Wednesday, October 17, 12 15
  • 16. name: role: status: tim Tim teacher Cool name: role: kristen marketing Kristen Wednesday, October 17, 12 16
  • 17. name: role: status: tim Tim teacher Cool name: role: kristen marketing Kristen billy role: CEO Wednesday, October 17, 12 17
  • 18. name: role: status: tim Tim teacher Cool name: role: kristen marketing Kristen billy role: CEO name: role: status: matt Matt founder ubercool Wednesday, October 17, 12 18
  • 19. Outer hash key Inner hash key name: role: status: tim Tim teacher Cool name: role: kristen marketing Kristen billy role: CEO name: role: status: matt Matt founder ubercool Wednesday, October 17, 12 19
  • 20. Scale Idiom Amazon Dynamo Horizontal scalability No distinguished nodes Fault tolerance Wednesday, October 17, 12 20
  • 21. Queries Nested hash table lookup Single primary key Ranged lookups Wednesday, October 17, 12 21
  • 22. Queries Ad-Hoc Query Language: CQL Wednesday, October 17, 12 22
  • 23. Queries CREATE COLUMNFAMILY Contacts (KEY uuid PRIMARY KEY); CREATE COLUMNFAMILY Monkey (KEY text PRIMARY KEY, id_tag long, emotion text) WITH comment='Simian Emotional States' AND read_repair_chance = 0.5; Wednesday, October 17, 12 23
  • 24. Queries UPDATE Contacts SET name='Tim Berglund' WHERE KEY = B70DE1D0-9908-4AE3-BE34-5573E5B09F14; UPDATE Monkeys USING CONSISTENCY EACH_QUORUM SET emotion = 'Angry', name = 'Baby Boss' WHERE KEY = 'OREILLY:8827'; Wednesday, October 17, 12 24
  • 25. Queries SELECT * FROM Contacts WHERE KEY = B70DE1D0-9908-4AE3-BE34-5573E5B09F14; SELECT FIRST 1000 FROM Temperatures WHERE KEY = 7627748986; SELECT emotion, id_tag FROM Monkeys USING CONSISTENCY ONE WHERE KEY = 'OREILLY:8827'; Wednesday, October 17, 12 25
  • 26. License Apache Public License 2.0 DataStax http://datastax.com/dev Wednesday, October 17, 12 26
  • 27. Overview The leader at scale Data model learning curve Great backing from DataStax Innovation (Brisk, Solandra) Wednesday, October 17, 12 27
  • 29. Data Model Document Database Wednesday, October 17, 12 29
  • 30. Data Model { name: "Hubert Poston", username: "hposton", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace", active: true, lastLogin: ISODate('2012-01-19 16:37:03'), loginCount: 873, rating: 8.6, roles: ["ADMIN", "USER", "BOSS"], address: { street1: "984 Sunny Glen Lane", city: "Warrensville Heights", province: "OH", postalCode: "44128" } } Wednesday, October 17, 12 30
  • 31. Data Model { name: "Hubert Poston", username: "hposton", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace", active: true, lastLogin: ISODate('2012-01-19 16:37:03'), loginCount: 873, rating: 8.6, roles: ["ADMIN", "USER", "BOSS"], address: { street1: "984 Sunny Glen Lane", city: "Warrensville Heights", province: "OH", postalCode: "44128" } } Wednesday, October 17, 12 31
  • 32. Data Model { name: "Hubert Poston", username: "hposton", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace", active: true, lastLogin: ISODate('2012-01-19 16:37:03'), loginCount: 873, rating: 8.6, roles: ["ADMIN", "USER", "BOSS"], address: { street1: "984 Sunny Glen Lane", city: "Warrensville Heights", province: "OH", postalCode: "44128" } } Wednesday, October 17, 12 32
  • 33. Data Model { name: "Hubert Poston", username: "hposton", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace", active: true, lastLogin: ISODate('2012-01-19 16:37:03'), loginCount: 873, rating: 8.6, roles: ["ADMIN", "USER", "BOSS"], address: { street1: "984 Sunny Glen Lane", city: "Warrensville Heights", province: "OH", postalCode: "44128" } } Wednesday, October 17, 12 33
  • 34. Data Model { name: "Hubert Poston", username: "hposton", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace", active: true, lastLogin: ISODate('2012-01-19 16:37:03'), loginCount: 873, rating: 8.6, roles: ["ADMIN", "USER", "BOSS"], address: { street1: "984 Sunny Glen Lane", city: "Warrensville Heights", province: "OH", postalCode: "44128" } } Wednesday, October 17, 12 34
  • 35. Scale Idiom Single-master design Master/slave replica sets Auto-sharding Like a nicer MySQL Wednesday, October 17, 12 35
  • 36. Querying Ad-hoc language Secondary indexes Many language bindings Wednesday, October 17, 12 36
  • 37. Querying Creating a Record db.users.insert({ firstName: "Tim", lastName: "Berglund", username: "tlberglund", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace" active: true, lastLogin: ISODate('2012-01-19 16:37:03'), loginCount: 873, roles: ["ADMIN", "USER", "BOSS"] }); Wednesday, October 17, 12 37
  • 38. Querying Finding a Record db.users.find({ username: "tlberglund", password: "ab87d24bdc7452e55738deb5f868e1f16dea5ace" }); Wednesday, October 17, 12 38
  • 39. Querying Updating a record db.users.update( { username: "tlberglund" }, { $inc: { loginCount: 1 } } ); Wednesday, October 17, 12 39
  • 40. License Database: AGPL 3.0 Drivers: APL 2.0 http://www.10gen.com/commercial-licenses Wednesday, October 17, 12 40
  • 41. Overview NoSQL mindshare leader Easy to adopt Usually used at smaller scale Not your father’s database! (More like your young uncle) Wednesday, October 17, 12 41
  • 43. Data Model Graph Database Nodes and Relationships Arbitrary key/value bundles Wednesday, October 17, 12 43
  • 44. Data Model ... How do I use that? Easily! Wednesday, October 17, 12 44
  • 45. Data Model Graph Database Traversal manages manages navigates identifies expresses Indexes Graph Algorithm map to records data in Paths map to Relationships records data in order map from organize have Nodes have Properties Wednesday, October 17, 12 45
  • 46. Data Model Graph Database Traversal manages manages navigates identifies e Indexes Graph A map to records data in Paths Wednesday, October 17, 12 46
  • 47. Indexes Graph Algorithm Data Model map to records data in Paths map to Relationships records data in order map from organize have Nodes Wednesday, October 17, 12 have 47
  • 48. map to Data Model Relationships records data in order map from organize have Nodes have Properties Wednesday, October 17, 12 48
  • 49. Scale Idiom Single-master design Master/slave replication High-availability clustering Always single-master Wednesday, October 17, 12 49
  • 51. Querying REST/JSON Cypher Wednesday, October 17, 12 51
  • 52. License GPL 3.0 (Community) AGPL 3.0 (Advanced/Enterprise) Commercial Wednesday, October 17, 12 52
  • 53. Overview The 95% niche Usually commercial Scales like MySQL Affinity to ROA Wednesday, October 17, 12 53
  • 54. Do you need this? Wednesday, October 17, 12 54
  • 56. Tim Berglund http://timberglund.com tlberglund@github.com @tlberglund Wednesday, October 17, 12 Thank You 56