NoSQL: Death to Relational Databases(?)
Upcoming SlideShare
Loading in...5
×
 

NoSQL: Death to Relational Databases(?)

on

  • 8,969 views

Overview of the NoSQL ecosystem given at RubyConf 2009

Overview of the NoSQL ecosystem given at RubyConf 2009

Statistics

Views

Total Views
8,969
Views on SlideShare
8,734
Embed Views
235

Actions

Likes
25
Downloads
358
Comments
1

9 Embeds 235

http://benscofield.com 91
http://www.slideshare.net 73
http://speakerrate.com 41
http://coderwall.com 25
http://www.mefeedia.com 1
http://localhost:3000 1
https://www.facebook.com 1
https://m.facebook.com&_=1384023961316 HTTP 1
https://m.facebook.com&_=1384030565222 HTTP 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

NoSQL: Death to Relational Databases(?) NoSQL: Death to Relational Databases(?) Presentation Transcript

  • NoSQL Death  to  Relational  Databases(?) bensco'ield  –  viget  labs rubyconf 20  november  2009 Friday, November 20, 2009
  • Motivations Friday, November 20, 2009
  • Performance Friday, November 20, 2009
  • Friday, November 20, 2009
  • Scalability Friday, November 20, 2009
  • Friday, November 20, 2009
  • Friday, November 20, 2009
  • Flexibility Friday, November 20, 2009
  • Friday, November 20, 2009
  • Locus  of  Work Friday, November 20, 2009
  • Charlie  Chaplin Jet  Li Hank  Mann Marian  Collier Friday, November 20, 2009
  • Domain  Complexity Friday, November 20, 2009
  • Friday, November 20, 2009
  • Taxonomy Friday, November 20, 2009
  • Key-­‐Value  Stores Friday, November 20, 2009
  • distributed  hash  tables Friday, November 20, 2009
  • Dynamo GT.M PStore Redis Friday, November 20, 2009
  • Column-­‐Oriented  Stores Friday, November 20, 2009
  • semi-­‐structured Friday, November 20, 2009
  • BigTable Cassandra HBase Friday, November 20, 2009
  • Document-­‐Oriented  Stores Friday, November 20, 2009
  • also  semi-­‐structured Friday, November 20, 2009
  • CouchDB MongoDB RDDB Riak Friday, November 20, 2009
  • Graph  Databases Friday, November 20, 2009
  • graph  theory Friday, November 20, 2009
  • ActiveRDF   AllegroGraph Neo4J Friday, November 20, 2009
  • Comparisons Friday, November 20, 2009
  • Performance Friday, November 20, 2009
  • key-­‐value  stores column-­‐oriented  stores document-­‐oriented  stores relational  databases graph  databases Friday, November 20, 2009
  • Scalability Friday, November 20, 2009
  • key-­‐value  stores column-­‐oriented  stores document-­‐oriented  stores relational  databases graph  databases Friday, November 20, 2009
  • Flexibility Friday, November 20, 2009
  • key-­‐value  stores document-­‐oriented  stores graph  databases   column-­‐oriented  stores relational  databases Friday, November 20, 2009
  • Locus  of  Work Friday, November 20, 2009
  • key-­‐value  stores column-­‐oriented  stores document-­‐oriented  stores relational  databases graph  databases   Friday, November 20, 2009
  • Domain  Complexity Friday, November 20, 2009
  • key-­‐value  stores column-­‐oriented  stores document-­‐oriented  stores relational  databases graph  databases   Friday, November 20, 2009
  • Examples Friday, November 20, 2009
  • Redis Friday, November 20, 2009
  • Data  Types strings lists sets Friday, November 20, 2009
  • In-­‐Memory periodic  snapshots master-­‐slave  replication memory-­‐bound Friday, November 20, 2009
  • require 'redis' gl = Redis.new # A string gl['name'] = 'Kyle Rayner' gl['name'] gl.delete('name') # A list gl.push_tail 'to-dos', 'Lose Ion power' gl.push_tail 'to-dos', 'Mourn dead loved ones' gl.push_tail 'to-dos', 'Blow up zombie lanterns' gl.list_range('to-dos', 0, -1) Friday, November 20, 2009
  • Tokyo  Cabinet Friday, November 20, 2009
  • Data  Types strings tables! Friday, November 20, 2009
  • Related  Projects tyrant dystopia promenade Friday, November 20, 2009
  • require 'rufus/tokyo' # Key-value leagues = Rufus::Tokyo::Cabinet.new('jl.tch') leagues['JLI'] = [ 'Batman', 'Black Canary', 'Blue Beetle', 'Captain Marvel', 'Doctor Light', 'Doctor Fate', 'Guy Gardner','Martian Manhunter', 'Mister Miracle' ].to_yaml YAML.load(leagues['JLI']) Friday, November 20, 2009
  • require 'rufus/tokyo' # Table big7 = Rufus::Tokyo::Table.new('big7.tct') big7['s'] = {'name' => 'Superman', 'role' => 'deus ex machina'} big7['b'] = {'name' => 'Batman', 'role' => 'mastermind'} big7['gl'] = {'name' => 'Green Lantern', 'role' => 'space cop'} big7['f'] = {'name' => 'Flash', 'role' => 'speedster'} big7['mm'] = {'name' => 'Martian Manhunter', 'role' => '?'} big7['ww'] = {'name' => 'Wonder Woman', 'role' => 'hitter'} big7['a'] = {'name' => 'Aquaman', 'role' => 'fish-talking'} big7.query {|q| q.add_condition 'role', :streq, 'fish-talking' } Friday, November 20, 2009
  • Cassandra Friday, November 20, 2009
  • Genealogy Dynamo BigTable Friday, November 20, 2009
  • Column-­‐Oriented columns supercolumns column  families Friday, November 20, 2009
  • Distributed automatic  replication eventual  consistency easy  expansion Friday, November 20, 2009
  • Availability weak  reads quorum  reads Friday, November 20, 2009
  • require 'cassandra' op = Cassandra.new('OnePiece') op.insert(:People, '1', {'name' => 'Luffy'}) op.insert(:People, '2', {'name' => 'Crocodile'}) op.insert(:People, '3', {'name' => 'Mr. 3'}) op.insert(:Fights, '1', {'opponents' => {UUID.new => '2'}}) op.insert(:Fights, '1', {'opponents' => {UUID.new => '3'}}) luffy_fights = op.get(:Fights, '1', 'opponents') luffy_fights.map {|t, opp| op.get(:People, opp, 'name')} Friday, November 20, 2009
  • CouchDB Friday, November 20, 2009
  • Web-­‐Inspired JSON  storage HTTP  /  RESTful  interface Friday, November 20, 2009
  • Views predeVined,  updated  incrementally javascript  for  map/reduce Friday, November 20, 2009
  • Updates full,  including  embedded  documents Friday, November 20, 2009
  • require 'couchrest' konoha = CouchRest.database!('http://127.0.0.1:5984/konoha') naruto = konoha.save_doc { 'name' => 'Naruto Uzumaki', 'chakra' => 'wind' } shikamaru = konoha.save_doc { 'name' => 'Shikamaru Nara', 'chunin' => true } konoha.save_doc { '_id' => '_design/first', :views => { :chunin => { :map => 'function(doc){if(doc.chunin){emit(null, doc);}}' } } } puts konoha.views('first/chunin')['rows'].inspect Friday, November 20, 2009
  • MongoDB Friday, November 20, 2009
  • Storage binary  JSON  documents Friday, November 20, 2009
  • Access native  clients Friday, November 20, 2009
  • Queries dynamic index-­‐based Friday, November 20, 2009
  • Updates allows  partial  updates Friday, November 20, 2009
  • require 'mongo' avengers = Mongo::Connection.new.db('avengers') members = avengers.collection('members') members.insert {'name' => 'Ant-Man'} members.insert {'name' => 'Hulk'} members.insert {'name' => 'Iron Man'} members.insert {'name' => 'Thor'} members.insert {'name' => 'Wasp'} members.create_index('name') pym = members.find {'name' => 'Ant-Man'} pym['name'] = 'Giant-Man' pym.save members.remove {'name' => 'Hulk'} members.insert {'name' => 'Captain America'} Friday, November 20, 2009
  • Neo4J Friday, November 20, 2009
  • Structure nodes  and  edges key-­‐value  pairs Friday, November 20, 2009
  • Queries lucene Friday, November 20, 2009
  • require 'neo4j' class Person include Neo4j::NodeMixin property :name, :mutant index :name, :mutant has_n :interests has_n :dates has_n :marriages def initialize(name, mutant = true) name = name mutant = mutant end end Friday, November 20, 2009
  • Neo4j::Transaction.run do magneto = Person.new('Magneto') esme = Person.new('Esme') rogue = Person.new('Rogue') magda = Person.new('Magda', false) wasp = Person.new('Wasp', false) magneto.interests << wasp magneto.marriages << magda magneto.dates << rogue esme.interests << magneto magda.marriages << magneto rogue.dates << magneto end Friday, November 20, 2009
  • magneto = Person.find(:name => 'Magneto') # Who likes Magneto? magneto.relationships.incoming(:interests).nodes # Which non-mutants has Magneto dated? magneto.dates{ !mutant? }.to_a Friday, November 20, 2009
  • Simulations Friday, November 20, 2009
  • Structure Friday, November 20, 2009
  • people { ‘name’:‘Jimmy Olsen’ ‘title’:‘Superman’s Pal’ ‘company_id’:12441 } companies { _id:12441 ‘name’:‘Daily Planet’ } Friday, November 20, 2009
  • Lack  of  Structure Friday, November 20, 2009
  • mysql> SELECT * FROM people LIMIT 1 G *************************** 1. row *************************** id: 1 content: --- company: Daily Planet name: Jimmy Olsen title: Superman’s Pal Friday, November 20, 2009
  • mysql> desc people; +-------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | | name | varchar(50) | YES | | NULL | | +-------+-------------+------+-----+---------+-------+ mysql> desc attributes; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | | person_id | int(11) | YES | | NULL | | | attribute | varchar(50) | YES | | NULL | | | value | varchar(100) | YES | | NULL | | +-----------+--------------+------+-----+---------+-------+ Friday, November 20, 2009
  • Not  Only  SQL Friday, November 20, 2009
  • Caching Friday, November 20, 2009
  • Already  in  Use memcached Friday, November 20, 2009
  • Logging Friday, November 20, 2009
  • Rails  Log  Replacement http://github.com/peburrows/mongo_db_logger Friday, November 20, 2009
  • Hybrid  Domains Friday, November 20, 2009
  • different  domains Friday, November 20, 2009
  • Publishing e-­‐commerce documents Friday, November 20, 2009
  • Dating e-­‐commerce social  graph Friday, November 20, 2009
  • different  scales Friday, November 20, 2009
  • Photo  Sharing user  accounts uploaded  photos Friday, November 20, 2009
  • Next  Steps Friday, November 20, 2009
  • Explore Friday, November 20, 2009
  • Database  List http://internetmindmap.com/database_software NoSQL  Google  Group http://groups.google.com/group/nosql-­‐discussion NoSQL  Ecosystem http://www.rackspacecloud.com/blog/2009/11/09/nosql-­‐ecosystem/ Wave! Friday, November 20, 2009
  • Ignore  the  Database Friday, November 20, 2009
  • Logical  Modeling  First be  mindful Friday, November 20, 2009
  • Change  the  Default Friday, November 20, 2009
  • Application  Templates start  with  something  new Friday, November 20, 2009
  • bensco'ield @bsco'ield ben.sco'ield@viget.com http:/ /spkr8.com/bscoVield http:/ /viget.com/extend http:   /benscoVield.com / Friday, November 20, 2009