Alternative Databases

1,515 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,515
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
37
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Alternative Databases

  1. 1. Alternative Databases Scott MacVicar php|tek 2009 Wednesday, 27 May 2009
  2. 2. Who are you? Wednesday, 27 May 2009
  3. 3. History Lesson Wednesday, 27 May 2009
  4. 4. First Data Storage Wednesday, 27 May 2009
  5. 5. Relational Databases FTW! Relational Database is Born Wednesday, 27 May 2009
  6. 6. Parts of a RDBMS? Maths SQL Relation Table Derived Result Set Relation Tuple Row Attribute Column Domain Type Wednesday, 27 May 2009
  7. 7. SQL Purpose Retrieval Manipulation Transactions Wednesday, 27 May 2009
  8. 8. SQL Fails Complex Specification Join Fails Where clause Wednesday, 27 May 2009
  9. 9. RDBMS through the Ages Wednesday, 27 May 2009
  10. 10. RDBMs suck Adding fields is hard Complex Copying / Backup database Performance Wednesday, 27 May 2009
  11. 11. Scaling? Master Master Master Database Database Database App App App Wednesday, 27 May 2009
  12. 12. Scaling? Slave Master Slave Database Database Database App App App Wednesday, 27 May 2009
  13. 13. “Write consistency is the reason RDBMS are imploding under their own weight.” Wednesday, 27 May 2009
  14. 14. Why do we use a RDBMs? Wednesday, 27 May 2009
  15. 15. RDBMS Hangups Wednesday, 27 May 2009
  16. 16. Save See Secure Share Wednesday, 27 May 2009
  17. 17. Memcache + BerkleyDB = MemcacheDB Wednesday, 27 May 2009
  18. 18. MemcacheDB Memcache isn’t persistent :( Memcache dependency Wednesday, 27 May 2009
  19. 19. MemcacheDB Simple Protocol Tried and tested DB Transactions Replication Wednesday, 27 May 2009
  20. 20. Using MemcacheDB Wednesday, 27 May 2009
  21. 21. MemcacheDB Save ✔ See ✔ Secure ✖ Share ✔ Wednesday, 27 May 2009
  22. 22. Tokyo Cabinet Collection of types Created for mixi.jp (Facebook of Japan) Common API New in PHP6, maybe PHP 5.3.1 Wednesday, 27 May 2009
  23. 23. Tokyo Hash Database Constant time for most operations Second Hash for collisions Key values stored in a bucket array Wednesday, 27 May 2009
  24. 24. Buckets! Key Value Key Value Key Value Key Value Key Value Key Value Wednesday, 27 May 2009
  25. 25. Tokyo Cabinet Hash Wednesday, 27 May 2009
  26. 26. B+ Tree Ordered Access Multiple Keys Cursor Wednesday, 27 May 2009
  27. 27. Fixed-Length Access by numeric key No keys stored Fast Wednesday, 27 May 2009
  28. 28. Fixed-Length 0 value value value value value value value 8 value value value value value value value 16 value value value value value value value 24 value value value value value value value 32 value value value value value value value 40 Wednesday, 27 May 2009
  29. 29. Table Database Schema-less Named Attributes Indexes Queries Wednesday, 27 May 2009
  30. 30. Table Database Primary Key name value name value name value Primary Key name value name value name value Primary Key name value name value name value Wednesday, 27 May 2009
  31. 31. Tokyo Tyrant Network wrapper Speaks Memcache / HTTP Wednesday, 27 May 2009
  32. 32. TokyoCabinet Save ✔ See ✔ Secure ✔ Share ✖ Wednesday, 27 May 2009
  33. 33. CouchDB REST JavaScript Erlang Wednesday, 27 May 2009
  34. 34. CouchDB Document Database Replication Map Reduce No Indexes Wednesday, 27 May 2009
  35. 35. Database Access GET /_all_dbs PUT /somedatabase/ DELETE /somedatabase/ GET /somedatabase/ Wednesday, 27 May 2009
  36. 36. Document Access GET /somedatabase/_all_docs PUT /somedatabase/some_docid POST /somedatabase/ DELETE /somedatabase/some_docid GET /somedatabase/some_docid Wednesday, 27 May 2009
  37. 37. CouchDB Document Wednesday, 27 May 2009
  38. 38. CouchDB Document Wednesday, 27 May 2009
  39. 39. CouchDB Views Wednesday, 27 May 2009
  40. 40. CouchDB Scaling Caching Clustering Layering Wednesday, 27 May 2009
  41. 41. CouchDB Wrappers PHPillow - http://short.ie/buiqhu Phly_Couch - http://short.ie/pa47gp Wednesday, 27 May 2009
  42. 42. CouchDB Save ✔ See ✔ Secure ✔ Share ✔ Wednesday, 27 May 2009
  43. 43. Amazon SimpleDB XML Rest Application Wednesday, 27 May 2009
  44. 44. Amazon SimpleDB Amazon Web Service Cloudy Rest / XML Wednesday, 27 May 2009
  45. 45. SimpleDB 1 billion attributes 5 seconds execution 1024 byte values Wednesday, 27 May 2009
  46. 46. SimpleDB Set Wednesday, 27 May 2009
  47. 47. SimpleDB Query Wednesday, 27 May 2009
  48. 48. SimpleDB API Officially Amazon API - http://short.ie/apx6c3 Tarzan-AWS - http://short.ie/54rucx Wednesday, 27 May 2009
  49. 49. SimpleDB Save ✔ See ✔ Secure ✔ Share ✔ Wednesday, 27 May 2009
  50. 50. Questions? http://talks.macvicar.net http://couchdb.apache.org http://aws.amazon.com http://memcachedb.org Wednesday, 27 May 2009

×