1 / 21

Is Apache CouchDB for you?

Sumedha Rubasinghe sumedha@apache.org. Is Apache CouchDB for you?. 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.

cianna
Download Presentation

Is Apache CouchDB for you?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sumedha Rubasinghe sumedha@apache.org Is Apache CouchDB for you?

  2. During this 45 mins.. • What is Apache CouchDB? • Paradigm for modeling data • Demonstration • Features

  3. What CouchDB is NOT.. • Relational Database • SQL • Tabular storage of data • Replacement for relational databases

  4. 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 !!!

  5. 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

  6. 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." }

  7. 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

  8. Accessing DB engine - REST • REST API • curl (unix like OS) • cURL (windows) • GET/PUT/POST/DELETE

  9. Accessing DB engine - Futon • Futon – Web administration console

  10. Creating a database • Using REST API • Using Futon

  11. Creating a document • Futon • REST API

  12. 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

  13. 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

  14. Sample Java Client (CouchDB4J) • connection

  15. Sample Java Client (CouchDB4J) • Accessing views

  16. CouchApp • Develop CouchDB applications in a convenient directory structure • Separate folder for css,js,images,etc... • To deploy – couchapp push • Change & deploy – couchapp push

  17. Interesting features • Replication • Versioning • Validation • functions/macros

  18. 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

  19. Samples on the web • http://jchrisa.net/cal/_design/cal/index.html • http://github.com/quirkey/swinger

  20. References • http://wiki.apache.org/couchdb/ • http://couchdb.apache.org/

  21. Thank you

More Related