SlideShare a Scribd company logo
Not only SQL Niklas Gustavsson [email_address] @protocol7 With thanks to Mårten Gustafson (@martengustafson) for the original presentation
What? “ NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases ”  - Wikipedia
What? “ NoSQL is a  movement  promoting a  loosely defined  class of  non-relational  data stores that break with a long history of relational databases ”  - Wikipedia Not a single technique Not a single type of data Not a single type of use case
Why? Non-relational Schema-less “ Easily” scalable REST/JSON API = web friendly Emphasize P in the CAP theorem
CAP what? Brewer’s theorem C onsistency A vailability P artition tolerance Eventual consistency
Consistency N = number of nodes to store each data on W=number of nodes for each write R=number of nodes for each read R + W > N
What’s out there? Storage type License Implemented in Amazon Dynamo Key/Value n/a ? Cassandra Columnfamily ASL 2.0 Java CouchDB Document ASL 2.0 Erlang Dynomite Key/Value BSD/MIT-style Erlang HBase Columnfamily ASL 2.0 Java MongoDB Document AGPL v3.0 C++ Neo4J Graph AGPL v3.0 / Comm Java Riak Key/Value ASL 2.0 Erlang Redis Key/Value BSD/MIT-style C Scalaris Key/Value ASL 2.0 Erlang Tokyo Cabinet Key/Value LGPL C Voldemort Key/Value ASL 2.0 Java
Distribution Master / Slave Master / Slave(s) Masterless (Master / Master)
Distribution * Neo4J HA coming “soon” This is a very simplified view Masterless Master/Slave Hot standby Amazon Dynamo X Cassandra X CouchDB X Dynomite X HBase ? MongoDB X X Neo4J * Riak X Redis X Scalaris X Tokyo Cabinet Voldemort X
Common factor “ ...of the web...” Of the who?!
Of the web “ ...Django may be  built for  the Web, but CouchDB is  built of  the  Web . I’ve never seen software that so completely  embraces  the  philosophies behind HTTP . CouchDB makes Django look old-school in the same way that Django makes ASP look outdated” -  http://jacobian.org/writing/of-the-web/
Of the web “ ...CouchDB may succeeded, and it may fail; who knows. I’m sure of one thing, though —  this is what the software of the future looks like ” -  http://jacobian.org/writing/of-the-web/
So freakin’ what?! All your web ish  skillz and tools apply... proxies load balancers caches HTTP client libs (etag, if-modified-since, etc) language-, platform- and OS-neutral MIME / Content-Type
These guys can just  suck it HTTP/REST is integration that  works
ColumnFamily
Cassandra Origins at Facebook Apache project Thrift API
World view KeyStore, like a database ColunmFamily, like a table. Have infinite number of columns Column, named, stores binary data SuperColumn, a column of columns Row, identified by key, contains columnes  No schema Sparse
The Ring 1 2 3 4 5 6 7 8 9 10 11 12
Partitioning Token Snitching Placement
This slide intentionally left blank
Document Store Relax
CouchDB Document oriented database Kick ass replication HTTP/JSON API Map/reduce view (index) definitions
World view One document == JSON One document == One record Many documents == One database Many databases == One instance No schema
World view Documents can have  attachments  (binary + mime type) be  rendered  differently (HTML, XML)
A document { " _id ":  "b098445d587b1f347e48e1a79301de02" , " _rev ":  "1-80bfd8302e0f08eec2396c8107cafc19" , " platform ": { " browser ":  "mozilla" , " version ":  "1.9.1.8" }, " timestamp ":  1270131033337 } Key, either you choose it or CouchDB does it for you  Revision number
Views Filter Collate Aggregate
Views { " _id ":  "b098445d587b1f347e48e1a79301de02" , " _rev ":  "1-80bfd8302e0f08eec2396c8107cafc19" , " platform ": { " browser ":  "mozilla" , " version ":  "1.9.1.8" }, " timestamp ":  1270131033337 }  + function(doc)   { emit(doc.platform.browser, doc.platform.version); }   = { " total_rows ":  1 , " offset ":  0 , " rows ": [ " id ":  "b098445d587b1f347e48e1a79301de02" , " key ":  "mozilla" , " value ":  "1.9.1.8" ] }
Views Views are stored as an  accessible web resource on disk and  incrementally updated as well as  replicated  with the database
Replication Peer to peer Online/Offline Conflict detection and resolution Any number of nodes
CouchDB - Takeaways Kick ass replication Views are  fast Can host and serve complete webapps
This slide intentionally left blank
Graphs How to persist a network?
Neo4J Graph database Embedded Java (and other languages) API REST API Traversal and indexes
World view Nodes and relationships Transactional (!) No schema
Traversing Start at a node Walk the graph Filter nodes Decide when to stop
Indexing Indexing done at insert, or as a batch Lucene based indexer for full-text search
Replication Neo4J HA coming soon, P2P replication Master-slave replication
Outro Test  one or more  NoSQL  thingys Get familiar with Brewers  CAP  theorem Get familiar with the  Dynamo paper
 
Slides/code Slides:  http://www.slideshare.net/protocol7 ,  CC-BY-SA Code: http://github.com/protocol7

More Related Content

What's hot (20)

PDF
MongoDB and Node.js
Norberto Leite
 
PPT
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
MongoDB
 
PDF
«Scrapy internals» Александр Сибиряков, Scrapinghub
it-people
 
PPTX
Lessons Learned Migrating 2+ Billion Documents at Craigslist
Jeremy Zawodny
 
PDF
What Every Developer Should Know About Database Scalability
jbellis
 
PDF
Woo: Writing a fast web server @ ELS2015
fukamachi
 
KEY
MongoFr : MongoDB as a log Collector
Pierre Baillet
 
PDF
Painless OO XML with XML::Pastor
joelbernstein
 
PPT
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
Hadoop User Group
 
PDF
Monitoramento com ELK - Elasticsearch - Logstash - Kibana
Waldemar Neto
 
KEY
Sphinx at Craigslist in 2012
Jeremy Zawodny
 
PPT
Jassa la GeekMeet Bucuresti
alexnovac
 
PDF
Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Jeremy Zawodny
 
PDF
Starting with MongoDB
Cesar Martinez
 
PPTX
HTML, Javascript and AJAX
Wan Leung Wong
 
PDF
A Practical Multi-Tenant Cluster
Command Prompt., Inc
 
PDF
Cassandra at mahalo_com_scale_la_meetup_de
mahalomeetup
 
PPTX
Scrapy
Francisco Sousa
 
PPTX
Understanding and tuning WiredTiger, the new high performance database engine...
Ontico
 
MongoDB and Node.js
Norberto Leite
 
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
MongoDB
 
«Scrapy internals» Александр Сибиряков, Scrapinghub
it-people
 
Lessons Learned Migrating 2+ Billion Documents at Craigslist
Jeremy Zawodny
 
What Every Developer Should Know About Database Scalability
jbellis
 
Woo: Writing a fast web server @ ELS2015
fukamachi
 
MongoFr : MongoDB as a log Collector
Pierre Baillet
 
Painless OO XML with XML::Pastor
joelbernstein
 
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
Hadoop User Group
 
Monitoramento com ELK - Elasticsearch - Logstash - Kibana
Waldemar Neto
 
Sphinx at Craigslist in 2012
Jeremy Zawodny
 
Jassa la GeekMeet Bucuresti
alexnovac
 
Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Jeremy Zawodny
 
Starting with MongoDB
Cesar Martinez
 
HTML, Javascript and AJAX
Wan Leung Wong
 
A Practical Multi-Tenant Cluster
Command Prompt., Inc
 
Cassandra at mahalo_com_scale_la_meetup_de
mahalomeetup
 
Understanding and tuning WiredTiger, the new high performance database engine...
Ontico
 

Viewers also liked (6)

KEY
The future is bright
Niklas Gustavsson
 
PDF
Spotify services (SDC 2013)
Niklas Gustavsson
 
ODP
Oredev 2009 JAX-RS
Niklas Gustavsson
 
PPT
RESTful web services
Niklas Gustavsson
 
PDF
Spotify services - Leetspeak 2014
Niklas Gustavsson
 
ODP
REST made simple with Java
Niklas Gustavsson
 
The future is bright
Niklas Gustavsson
 
Spotify services (SDC 2013)
Niklas Gustavsson
 
Oredev 2009 JAX-RS
Niklas Gustavsson
 
RESTful web services
Niklas Gustavsson
 
Spotify services - Leetspeak 2014
Niklas Gustavsson
 
REST made simple with Java
Niklas Gustavsson
 
Ad

Similar to Not only SQL (20)

PPTX
Introduction to NoSQL Databases
Derek Stainer
 
PDF
Spring one2gx2010 spring-nonrelational_data
Roger Xia
 
PPT
No sql landscape_nosqltips
imarcticblue
 
PDF
Couch Db
Ross Lawley
 
PDF
NoSQL and CouchDB: the view from MOO
James Hollingworth
 
PPTX
Nosql seminar
Shreyashkumar Nangnurwar
 
PPTX
Sql vs NoSQL
RTigger
 
PDF
NoSQL
Radu Potop
 
PPTX
NoSQL
Harshith Keni
 
PDF
SDEC2011 NoSQL Data modelling
Korea Sdec
 
PDF
Nosql databases for the .net developer
Jesus Rodriguez
 
PPT
No sql Database
mymail2ashok
 
KEY
Nosql-columbia-feb2011
siculars
 
PDF
HPTS 2011: The NoSQL Ecosystem
Adam Marcus
 
PDF
The NoSQL Ecosystem
yarapavan
 
PPTX
CouchDB
Jacob Diamond
 
PDF
A walk down NOSQL Lane in the cloud
siculars
 
PDF
CouchDB
Rashmi Agale
 
PPTX
NoSQL Introduction
John Kerley-Weeks
 
PDF
NoSQL Introduction
John Kerley-Weeks
 
Introduction to NoSQL Databases
Derek Stainer
 
Spring one2gx2010 spring-nonrelational_data
Roger Xia
 
No sql landscape_nosqltips
imarcticblue
 
Couch Db
Ross Lawley
 
NoSQL and CouchDB: the view from MOO
James Hollingworth
 
Sql vs NoSQL
RTigger
 
NoSQL
Radu Potop
 
SDEC2011 NoSQL Data modelling
Korea Sdec
 
Nosql databases for the .net developer
Jesus Rodriguez
 
No sql Database
mymail2ashok
 
Nosql-columbia-feb2011
siculars
 
HPTS 2011: The NoSQL Ecosystem
Adam Marcus
 
The NoSQL Ecosystem
yarapavan
 
CouchDB
Jacob Diamond
 
A walk down NOSQL Lane in the cloud
siculars
 
CouchDB
Rashmi Agale
 
NoSQL Introduction
John Kerley-Weeks
 
NoSQL Introduction
John Kerley-Weeks
 
Ad

Recently uploaded (20)

PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 

Not only SQL

  • 1. Not only SQL Niklas Gustavsson [email_address] @protocol7 With thanks to Mårten Gustafson (@martengustafson) for the original presentation
  • 2. What? “ NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases ” - Wikipedia
  • 3. What? “ NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases ” - Wikipedia Not a single technique Not a single type of data Not a single type of use case
  • 4. Why? Non-relational Schema-less “ Easily” scalable REST/JSON API = web friendly Emphasize P in the CAP theorem
  • 5. CAP what? Brewer’s theorem C onsistency A vailability P artition tolerance Eventual consistency
  • 6. Consistency N = number of nodes to store each data on W=number of nodes for each write R=number of nodes for each read R + W > N
  • 7. What’s out there? Storage type License Implemented in Amazon Dynamo Key/Value n/a ? Cassandra Columnfamily ASL 2.0 Java CouchDB Document ASL 2.0 Erlang Dynomite Key/Value BSD/MIT-style Erlang HBase Columnfamily ASL 2.0 Java MongoDB Document AGPL v3.0 C++ Neo4J Graph AGPL v3.0 / Comm Java Riak Key/Value ASL 2.0 Erlang Redis Key/Value BSD/MIT-style C Scalaris Key/Value ASL 2.0 Erlang Tokyo Cabinet Key/Value LGPL C Voldemort Key/Value ASL 2.0 Java
  • 8. Distribution Master / Slave Master / Slave(s) Masterless (Master / Master)
  • 9. Distribution * Neo4J HA coming “soon” This is a very simplified view Masterless Master/Slave Hot standby Amazon Dynamo X Cassandra X CouchDB X Dynomite X HBase ? MongoDB X X Neo4J * Riak X Redis X Scalaris X Tokyo Cabinet Voldemort X
  • 10. Common factor “ ...of the web...” Of the who?!
  • 11. Of the web “ ...Django may be built for the Web, but CouchDB is built of the Web . I’ve never seen software that so completely embraces the philosophies behind HTTP . CouchDB makes Django look old-school in the same way that Django makes ASP look outdated” - http://jacobian.org/writing/of-the-web/
  • 12. Of the web “ ...CouchDB may succeeded, and it may fail; who knows. I’m sure of one thing, though — this is what the software of the future looks like ” - http://jacobian.org/writing/of-the-web/
  • 13. So freakin’ what?! All your web ish skillz and tools apply... proxies load balancers caches HTTP client libs (etag, if-modified-since, etc) language-, platform- and OS-neutral MIME / Content-Type
  • 14. These guys can just suck it HTTP/REST is integration that works
  • 16. Cassandra Origins at Facebook Apache project Thrift API
  • 17. World view KeyStore, like a database ColunmFamily, like a table. Have infinite number of columns Column, named, stores binary data SuperColumn, a column of columns Row, identified by key, contains columnes No schema Sparse
  • 18. The Ring 1 2 3 4 5 6 7 8 9 10 11 12
  • 22. CouchDB Document oriented database Kick ass replication HTTP/JSON API Map/reduce view (index) definitions
  • 23. World view One document == JSON One document == One record Many documents == One database Many databases == One instance No schema
  • 24. World view Documents can have attachments (binary + mime type) be rendered differently (HTML, XML)
  • 25. A document { " _id ": "b098445d587b1f347e48e1a79301de02" , " _rev ": "1-80bfd8302e0f08eec2396c8107cafc19" , " platform ": { " browser ": "mozilla" , " version ": "1.9.1.8" }, " timestamp ": 1270131033337 } Key, either you choose it or CouchDB does it for you Revision number
  • 26. Views Filter Collate Aggregate
  • 27. Views { " _id ": "b098445d587b1f347e48e1a79301de02" , " _rev ": "1-80bfd8302e0f08eec2396c8107cafc19" , " platform ": { " browser ": "mozilla" , " version ": "1.9.1.8" }, " timestamp ": 1270131033337 } + function(doc) { emit(doc.platform.browser, doc.platform.version); } = { " total_rows ": 1 , " offset ": 0 , " rows ": [ " id ": "b098445d587b1f347e48e1a79301de02" , " key ": "mozilla" , " value ": "1.9.1.8" ] }
  • 28. Views Views are stored as an accessible web resource on disk and incrementally updated as well as replicated with the database
  • 29. Replication Peer to peer Online/Offline Conflict detection and resolution Any number of nodes
  • 30. CouchDB - Takeaways Kick ass replication Views are fast Can host and serve complete webapps
  • 32. Graphs How to persist a network?
  • 33. Neo4J Graph database Embedded Java (and other languages) API REST API Traversal and indexes
  • 34. World view Nodes and relationships Transactional (!) No schema
  • 35. Traversing Start at a node Walk the graph Filter nodes Decide when to stop
  • 36. Indexing Indexing done at insert, or as a batch Lucene based indexer for full-text search
  • 37. Replication Neo4J HA coming soon, P2P replication Master-slave replication
  • 38. Outro Test one or more NoSQL thingys Get familiar with Brewers CAP theorem Get familiar with the Dynamo paper
  • 39.  
  • 40. Slides/code Slides: http://www.slideshare.net/protocol7 , CC-BY-SA Code: http://github.com/protocol7

Editor's Notes

  • #5: * Relational not always most suitable model * Schema-less gives freedom * Non-relational gives interesting scalability capabilities (which most provides) * Most provides REST/JSON API ** Very suitable for web dev’t ** Easy peasy to use, regardless of environment
  • #27: collation - assembling in proper numerical or logical sequence
  • #28: Simplified view explanation