This document discusses the transition from relational databases to NoSQL databases. It provides an overview of key-value databases like Tokyo Cabinet and how they provide high performance and scalability alternatives to SQL databases. It also describes how Tokyo Cabinet can be used with an ActiveRecord adapter to integrate NoSQL style databases into Rails applications, bridging the gap between SQL and NoSQL. Finally, it outlines a vision for further developing Tokyo Cabinet into a cloud database that can provide a unified interface to both SQL and NoSQL databases.
2. From RDBMS to NoSQL (1) Long long ago … Network Database (GE IDS 1961) Hierarchical Database (IBM IMS 1968) Relational database era Edgar Frank Codd -- Since 1969 Relational model SQL Management system Over $ 20 billion (2008)
3. From RDBMS to NoSQL (2) Now is Web2.0 era Have huge storage(TB/PB data size) Need high performance Need high scalability Need high availability NoSQL now coming New theory support New API style New buzzword
4. Projects or papers… Google BigTable (2004) Tokyo Cabinet (2006) Amazon Dynamo (2007) MongoDB,CouchDB,Cassandra,Voldemort (2008) Redis,Riak,HBase… (2009) More and more… From RDBMS to NoSQL (3)
5. CAP (Eric Brewer 2000) Consistency Availability Partition tolerance BASE Basically Available Soft-state Eventual Consistency MapReduce From functional programming Distributed computing framework Important NoSQL theory
45. database.yml development: adapter: tcdb path: ./db database: blog model class Post < ActiveRecord::Base validates_presence_of :body, :title has_many :comments end About tcdb-adapter (1)
46. Migration class CreatePosts < ActiveRecord::Migration def self.up create_table :posts do |t| t.string :title t.text :body t.timestamps end end def self.down drop_table :posts end end About tcdb-adapter (2)