1. Experience: 8+ Years in IT industry.
Education: MBA (Marketing) 2009 - 2011,
BSCS (Hons) 2000 - 2005
Skills Areas: PHP Frameworks, CMS &
Front-End Technologies
Cell #: 923009888545
Email: khurrammhd@gmail.com
Skype: Khurram645
Khurram Mahmood Bhatti
Software Lead at DatumSquare IT Services
2. Agenda
NoSQL Vs SQL
Basic Concepts & RESTful API
Introduction to CouchDB?
Features of CouchDB
Installation and Configuration
Questions & Answers
3. NoSQL vs SQL
SQL vs NoSQL Data Integrity
SQL vs NoSQL Transactions
SQL vs NoSQL CRUD Syntax Show Syntax
SQL vs NoSQL Performance
SQL vs NoSQL Scaling
Types of NoSQL Datastores
Key - value Stores (Redis, Riak, Memcached)
Document stores(CouchDB, MongoDB)
Column stores (Cassandra, Apache Hadoop/HBase)
Graph/Object stores (InfiniteGraph, Neo4J)
4. RESTful API (Representational State Transfer)
Stateless interaction
Doesn’t use login sessions or store other state information on the server
Communication over HTTP
Common HTTP methods (GET, POST, PUT, DELETE)
Uses standard HTTP codes
{200 – Success, 300 – Redirection, 400 – User error, 500 – Server error}
Manipulates resources
A unique URL identifies each resource. can manipulate it with standard HTTP
methods
5. Introduction to CouchDB
• Released in 2005 and became an Apache project in 2008.
• Non technical can learn it
• Written in Erlang.
• A document oriented NoSQL Database
• Store data with JSON document
• Uses JavaScript as a query language for Map/Reduce indexes
• HTTP for its API
• RESTful interface
7. Design Documents contents
Views
Views are the primary tool used for querying and reporting on CouchDB databases.
Show
Use to represent documents in various formats, commonly as HTML.
List
Use to customize document presentation, but on View Functions results.
Update Handlers
Update handlers are functions that clients can request to invoke server-side logic that
will create or update a document.
Filters
Filters are special design document functions that allow the changes feed to emit only
specific documents that pass filter rules.
Validation
Use to prevent invalid or unauthorized document update
8. CouchDB access via CURL
Check the server status:
Get list of all databases:
Create database:
Delete database:
9. Futon: Web GUI Administration Panel
http://localhost:5984/_utils/