is apache couchdb for you? sumedha rubasinghe sumedha@apache.org
Post on 28-Dec-2015
225 Views
Preview:
TRANSCRIPT
During this 45 mins..
• What is Apache CouchDB?• Paradigm for modeling data• Demonstration• Features
What CouchDB is NOT..
• Relational Database• SQL• Tabular storage of data• Replacement for relational databases
Different paradigm to model data• Real world application – based on
data in a document• Relational model – maps data into
tables, columns• How about storing the document as it
is !!!
What is CouchDB then?
• Document based database server– Key-value type of storage
• Schema free documents– stored in JSON format– versioning
• REST API• Views• Open source
JSON ?
• Java Script Object Notation• lightweight data storage format based on a
subset of JavaScipt syntax• eg:{
"Subject": "ASF turns 10",
"Author": "ajith",
"PostedDate": "2009-11-20",
"Tags": [
"Apache Software Foundation",
"Open source"
],
"Body": "Recently Apache Software Foundation became 10 years old."
}
Getting started - Installation
• Documentation– http://wiki.apache.org/couchdb/Installation
• Unix-like systems• Mac OS X• Windows
– http://people.virginia.edu/~lmb7s/couch
• Latest source distribution (4th Dec 2009)– 0.10.1
Views
• What is a view?• View in CouchDB context
–A "show" that directly renders a document using JavaScript–MapReduce
• Two types– Permanent view• Indexed• JSON for the view is stored as a design document
– Temporary view• Sent via a HTTP POST• Computed on the fly
• Creating a view using Futon
Programming with CouchDB
• Clients available for many languages– C, C#, Erlang, Java, JavaScript, Perl, PHP,
Python,Ruby & many more..
– http://wiki.apache.org/couchdb/Basics
CouchApp
• Develop CouchDB applications in a convenient directory structure
• Separate folder for css,js,images,etc...
• To deploy – couchapp push• Change & deploy – couchapp push
Important configuration files
• Linux environment• Start up script
– /usr/local/etc/init.d/couchdb start | status | stop
• Configurations (ports,users)– /usr/local/etc/couchdb/local.ini
Samples on the web
http://jchrisa.net/cal/_design/cal/index.html
http://github.com/quirkey/swinger
top related