• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • high volume 64Mbytes.....
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
1,652
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
16
Comments
1
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • bad diagram - self-referential join in taxon table
  • TIGON - Tiger + Lioness
    Ernst Mayr: “groups of actually or potentially interbreeding natural populations, which are reproductively isolated from other such groups”
  • tomatoes - hybrids & heirlooms
  • PLUOT
    Plum + Apricot
  • Caminalcules (from Camin and animalcule) are a group of animal-like life forms invented by Professor Joseph H. Camin (University of Kansas) as a tool for understanding phylogenetics. Interested in how taxonomists group species, he designed these creatures to show an evolutionary pattern of divergence and diversification in morphology. There are 29 recent 'species' of Caminalcules and 48 fossil forms.
  • bad diagram - self-referential join in taxon table
  • problems with cladistics: historical change is hard to see, and cladistics gives you CRAZY counter-intuitive results
  • this is a little naive - titles can change imprints; in some cases, retroactively
  • ISSUES
    collected in diff trades
  • volume has-many trades
    trade has-many issues
    issue has-many trades
  • diff covers, and sometimes internal art
  • favorite variant cover of all time...
  • issue has-many variants (incl covers, writing, art)
  • issue has-many variants (incl covers, writing, art)
  • call attention to the title change (ala Aquaman)
    numbering changes: CAC started with #1 in 1941
  • call attention to the title change (ala Aquaman)
    numbering changes: CAC started with #1 in 1941
  • most recent volume of Cap started in 2005 -> #50
    then renumbered #600
  • most recent volume of Cap started in 2005 -> #50
    then renumbered #600
  • Fallen Angel -- DC => IDW
  • could be implemented as tagging
  • just because you can model relationships in these alt DBs, doesn’t mean you should. YOU SHOULDN’T!
  • Cassandra inherits from Amazon’s Dynamo and Google’s BigTable - eventual consistency, rich data model
  • for more information
  • CouchDB - HTTP
    Mongo - socket???
  • both use JSON
  • MongoMapper from John Nunemaker
  • for more information
  • Perfect use for document DB: CMS with custom fields
  • RDF / Web 2.0
    30 years old, finally coming into its own
  • back to the blog example
  • tags don’t fit in the document model
  • baby steps: polyglotting applications and/or web services
  • step two: connect to couch via HTTP directly (couch application)
  • step three: polyglot away!
  • step three: polyglot away!

Transcript

  • 1. “Comics” Is Hard: On Domains and Databases Ben Sco eld – Viget Labs
  • 2. domains
  • 3. biology
  • 4. Kingdom Animalia Phylum Chordata Class Mammalia Order Carnivora Family Felidae Genus Panthera Species tigris ickr: pandiyan
  • 5. Animalia Chordata Mammalia Carnivora Felidae Panthera tigris ickr: pandiyan
  • 6. kingdoms phyla classes orders families genera species
  • 7. Problem The levels are imaginary
  • 8. kingdoms subphyla phyla superclasses subclasses classes superorders suborders orders superfamilies subfamilies families subgenera genera subspecies species varieties
  • 9. kingdoms subphyla phyla superclasses subclasses ? classes superorders suborders orders superfamilies subfamilies families subgenera genera subspecies species varieties
  • 10. taxa subspecies species varieties
  • 11. Species ickr: cpurrin1
  • 12. Reproductive Isolation ickr: superciliousness
  • 13. Reproductive Isolation ickr: superciliousness
  • 14. ickr: chiotsrun
  • 15. ickr: niznoz
  • 16. Numerical taxonomy
  • 17. Cladistics
  • 18. clades organisms
  • 19. Problem Cladistics is historical and counter-intuitive
  • 20. ickr: goellnitz
  • 21. ickr: goellnitz pcoin
  • 22. The Challenge Unclear, imprecise domain
  • 23. comics
  • 24. publishers titles issues
  • 25. publishers imprints titles issues
  • 26. publishers imprints titles volumes issues
  • 27. publishers imprints titles volumes trades issues reprints
  • 28. publishers imprints titles volumes trades issues reprints variants
  • 29. publishers imprints titles names volumes trades issues reprints variants
  • 30. publishers imprints ? titles names volumes trades issues reprints nested set? variants
  • 31. publishers imprints ?!?! titles names volumes trades issues reprints nested set? variants
  • 32. science fiction noir horror genres? independent Martial Arts historical superhero Pirate
  • 33. publishers imprints #&*! titles names volumes trades genres issues reprints nested set? variants
  • 34. The Challenge Complete insanity
  • 35. nosql altdb postrelational lesssql
  • 36. http://thisisindexed.com/2009/02/just-because-you-can-doesnt-mean-you-should/
  • 37. key-value stores
  • 38. dynomite tokyo cabinet project voldemort pstore redis
  • 39. require "rubygems" require "tokyocabinet" include TokyoCabinet bdb = BDB::new # B-Tree database; keys may have multiple values bdb.open("casket.bdb", BDB::OWRITER | BDB::OCREAT) # store records in the database, allowing duplicates bdb.putdup("key1", "value1") bdb.putdup("key1", "value2") bdb.put("key2", "value3") bdb.put("key3", "value4") # retrieve all values p bdb.getlist("key1") # => ["value1", "value2"] # range query, find all matching keys p bdb.range("key1", true, "key3", true) # => ["key1", "key2", "key3"] http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/
  • 40. Biology x Comics x
  • 41. Configuration ✓ Caching ✓ Translations ✓
  • 42. document databases
  • 43. couchdb jackrabbit mongodb rddb riak
  • 44. { 'name':'Ben Scofield', 'twitter':'@bscofield' } { 'name':'Jim Van Fleet', 'adjective':'awesomesauce' }
  • 45. class Question include MongoMapper::Document key :number, Integer, :required => true key :text, String, :required => true many :choices end class Choice include MongoMapper::EmbeddedDocument key :text, String, :required => true end
  • 46. Biology ✓ Comics x
  • 47. { ‘kingdom’:‘Animalia’, ‘phylum’:‘Chordata’, ‘subphylum’:‘Vertebrata’, ‘class’:‘Mammalia’, ‘subclass’:‘Eutheria’, ‘order’:‘Carnivora’, ‘family’:‘Felidae’, ‘subfamily’:‘Panthernae’, ‘genus’:‘Pantera’, ‘species’:‘tigris’, ‘name’:‘Wanda’ }
  • 48. { ‘kingdom’:‘Animalia’, ‘subkingdom’:‘Eumetazoa’, ‘phylum’:‘Chordata’, ‘subphylum’:‘Vertebrata’, ‘class’:‘Mammalia’, ‘subclass’:‘Theria’, ‘order’:‘Carnivora’, ‘suborder’: ‘Caniformia’, ‘family’:‘Canidae’, ‘subfamily’:‘Caninae’, ‘tribe’:‘Canini’, ‘genus’:‘Canis’, ‘species’:‘lupus’, ‘subspecies’:‘familiaris’, ‘name’:‘Daisy’ }
  • 49. graph databases
  • 50. allegograph hypergraphdb neo4j activeRDF
  • 51. http://neotechnology.com/why-neo
  • 52. http://markorodriguez.com/Lectures_ les/risk-symposium2009.pdf
  • 53. ickr: 9948354@N08
  • 54. Biology ✓ Comics ✓
  • 55. Animalia ... Felidae subfamilyof genusof Panthernae genusof Panthera speciesof tigris member 001 age name weight 3 Wanda 300
  • 56. Animalia ... Felidae subfamilyof genusof Panthernae genusof Panthera species speciesof type tigris 010 name tigris member 001 age name weight 3 Wanda 300
  • 57. Group IV orderof Picornavirales familyof Picornaviridae genusof Rhinovirus speciesof human rhinovirus A member 002
  • 58. class Mammalia Group IV group orderof orderof Carnivora Picornavirales familyof familyof Felidae Picornaviridae subfamilyof Panthernae genusof genusof genusof Panthera Rhinovirus speciesof speciesof human tigris rhinovirus A member member 001 002
  • 59. DC imprintof titleof DC Universe Green titleof 001 Lantern nameof genreof volumeof genreof Volume 1 Sci Fi Superhero genreof issueof genreof 002 precedes Issue #2 number coverof #1 003
  • 60. require 'neo4j' Neo4j::Transaction.run do dc = Neo4j::Node.new dc[:name] = 'DC' dc_universe = Neo4j::Node.new dc_universe[:name] = 'DC Universe' dc.relationships.outgoing(:imprints) << dc_universe rel = dc.relationships.outgoing(:imprints).first rel[:started] = 1980 vol1 = Neo4j::Node.new vol1[:started] = 1941 vol1[:ended] = 1949 vol1[:name] = 'Green Lantern' dc.relationships.outgoing(:titles) << vol1 dc_universe.relationships.outgoing(:titles) << vol1 # ... end
  • 61. other alternatives
  • 62. column-oriented constant in-memory streaming temporal
  • 63. selection
  • 64. None Key-Value Many-One Document-Oriented Many-Many Relational Many-Many ++ Graph
  • 65. polyglot persistence
  • 66. { ‘title’:‘I Love Cheese’ ‘content’:‘Cheese is...’ ‘posted’:’24 Sept 2009’ ‘comments’:[{ ‘author’:‘Joe Schmoe’ ‘posted’:’24 Sept 2009’ ‘content’:‘First!’ }, {...}] }
  • 67. Tag Tag Post General Life 1ec8264 Work Food 1ec8264 Fitness Writing bae294a Life Food Writing { ‘title’:‘I Love Cheese’ Family ‘content’:‘Cheese is...’ ‘posted’:’24 Sept 2009’ ‘comments’:[{ ‘author’:‘Joe Schmoe’ ‘posted’:’24 Sept 2009’ ‘content’:‘First!’ }, {...}] }
  • 68. HTTP application application
  • 69. HTTP application
  • 70. application
  • 71. application
  • 72. Thank You ben sco eld - @bsco eld http://bensco eld.com http://www.viget.com/extend http://www.speakerrate.com/bsco eld