SlideShare a Scribd company logo
Intro to CouchDBBen Aldredhttp://geekmade.co.uk@benaldred
DisclaimerI am not a CouchDB expert
I still quite like Relational DatabasesIntroducing...
Apache(so it must be good, right?)
Document orientated Database
CouchDB aims to solve problems
Scaling
Storing Data
How?
CouchDB Scalesjust like rails!
Non-locking Multiversion concurrency control (MVCC)
Replication
New way to model data
Case Study: Invoices
JSON{       "_id":"hello-world",    "_rev":"AE19EBC7654",    "title":"Hello World",    "body":"content...",    "date":"2009/12/25 15:52:20" }
JSON{   "_id":"hello-world",    "_rev":"AE19EBC7654",    "title":"Hello World",    "body":"content...",    "date":"2009/12/25 15:52:20" }
JSON{       "_id":"hello-world","_rev":"AE19EBC7654",    "title":"Hello World",    "body":"content...",    "date":"2009/12/25 15:52:20" }
HTTP REST APICreate:    PUT            /:db Read:      GET            /:db/:docidUpdate:   PUT            /:db/:docidDelete:    DELETE     /:db/:docid
Views
Mapfunction(doc) {    if(doc.date && doc.title) {        emit(doc.date, doc.title);       }} key                  |  value-------------------------------------"2009/12/25 15:52:20"  | "Hello World"
Query the Viewhttp://localhost:5984/mydb/_design/post/_view/foo
Query the Viewhttp://localhost:5984/mydb/_design/post/_view/foo
Demo
When to use CouchDB
When you need to scale
When availibility is more important than consistency
When not to use it
You want to leaverage the power of an ORM
CouchDB + Ruby
CouchRest
Corecouch = CouchRest.new("http://127.0.0.1:5984")db = couch.database!('NWRUG')db.save_doc({  'title' => 'Intro to CouchDB',  'speaker' => 'Ben Aldred',  'location' => 'BBC',  'tags' => ['couchdb', 'ruby']})
Moreclass Presentation < CouchRest::ExtendedDocument  include ::CouchRest::Validation  property :title  property :speaker  property :location  validates_present :titleend
MorePresentation.firstPresentation.allPresentation.by_title(:key => 'Ben Aldred')Presentation.get('intro_to_couchdb')
Moreproperty :questions, :cast_as => ['Question']property :speaker, :cast_as => 'Person'property :started_at, :cast_as => 'Time'
Moreview_by :started_at, :descending => trueview_by :speaker, :title
Moreview_by :name,  :map =>     "function(doc) {      if(doc.date && doc.title) {        emit(doc.date, doc.title);      }    }"
Loads Morebut I have not got time
Resourceshttp://books.couchdb.org/relax/

More Related Content

ODP
CouchApp - Build scalable web applications and relax
ODP
node.js - Fast event based web application development
ODP
MongoDB San Francisco DrupalCon 2010
PPTX
Node.js Lightning Talk
PPT
Caching Data For Performance
PDF
Cache all the things #DCLondon
PDF
იოსებ ძმანაშვილი Node.js
PPTX
What is AWS S3?
CouchApp - Build scalable web applications and relax
node.js - Fast event based web application development
MongoDB San Francisco DrupalCon 2010
Node.js Lightning Talk
Caching Data For Performance
Cache all the things #DCLondon
იოსებ ძმანაშვილი Node.js
What is AWS S3?

What's hot (20)

PDF
Optimize drupal
PPT
CouchDB and Rails on the Cloud
PDF
Scaling Rails Sites by default
PDF
Variations on a Theme
PDF
Big Frontends Made Simple
PDF
Phorum MySQL tricks
PDF
3 Steps to Make Better & Faster Frontends
PDF
3 ways-to-create-sprites-in-rails
PDF
Amazon S3 storage engine plugin for MySQL
PDF
Server-Side JavaScript with jQuery and AOLserver
PDF
Drupal feature proposal: two new stream-wrappers
PDF
Performace optimizations and frontend happiness
PDF
A practical 10m intro to PHP on Heroku
PPT
all data everywhere
PDF
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
PPTX
Dmp hadoop getting_start
PPT
Scaling my sql_in_3d
PPTX
A faster web
PDF
Web crawl with Elixir
KEY
Web Optimization Level: Paranoid
Optimize drupal
CouchDB and Rails on the Cloud
Scaling Rails Sites by default
Variations on a Theme
Big Frontends Made Simple
Phorum MySQL tricks
3 Steps to Make Better & Faster Frontends
3 ways-to-create-sprites-in-rails
Amazon S3 storage engine plugin for MySQL
Server-Side JavaScript with jQuery and AOLserver
Drupal feature proposal: two new stream-wrappers
Performace optimizations and frontend happiness
A practical 10m intro to PHP on Heroku
all data everywhere
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Dmp hadoop getting_start
Scaling my sql_in_3d
A faster web
Web crawl with Elixir
Web Optimization Level: Paranoid
Ad

Similar to Intro to CouchDB (20)

PDF
CouchDB: A NoSQL database
PDF
Couchdb
PPT
Introduction to couch_db
PDF
CouchDB Talk JChris NYC
KEY
Couchdb: No SQL? No driver? No problem
PDF
Introduction to CouchDB
ODP
Intro to CouchDB
KEY
CouchDB : More Couch
PDF
Apache CouchDB talk at Ontario GNU Linux Fest
PDF
Python-CouchDB Training at PyCon PL 2012
PPT
No sql Database
KEY
Perform Like a frAg Star
PPTX
Cluster of unreliable commodity hardware (couchdb) (2)
PPTX
Couch DB
PDF
CouchDB Mobile - From Couch to 5K in 1 Hour
PPT
Not only SQL
PPT
KEY
NoSQL: Why, When, and How
PDF
Couch Db.0.9.0.Pub
KEY
MongoDB at RubyEnRails 2009
CouchDB: A NoSQL database
Couchdb
Introduction to couch_db
CouchDB Talk JChris NYC
Couchdb: No SQL? No driver? No problem
Introduction to CouchDB
Intro to CouchDB
CouchDB : More Couch
Apache CouchDB talk at Ontario GNU Linux Fest
Python-CouchDB Training at PyCon PL 2012
No sql Database
Perform Like a frAg Star
Cluster of unreliable commodity hardware (couchdb) (2)
Couch DB
CouchDB Mobile - From Couch to 5K in 1 Hour
Not only SQL
NoSQL: Why, When, and How
Couch Db.0.9.0.Pub
MongoDB at RubyEnRails 2009
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
MYSQL Presentation for SQL database connectivity
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
MYSQL Presentation for SQL database connectivity
The Rise and Fall of 3GPP – Time for a Sabbatical?
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks

Intro to CouchDB