About Sunil Gulabani

Sunil Gulabani is a JAVA software engineer and Cloud Technology Savvy. He has developed enterprise solutions using Java(EE), Apache Solr, GWT, GWT-P, SmartGWT, Restlet and Hibernate. He holds a keen interest in system architecture and integration, data modeling, relational databases and mapping with NoSQL for high throughput.

Main features

Document Storage:

CouchDB stores data as “documents”, as one or more field/value pairs expressed as JSON. Field values can be simple things like strings, numbers, or dates; but ordered lists and associative arrays can also be used. Every document in a CouchDB database has a unique id and there is no required document schema.

ACID Semantics:

CouchDB provides ACID semantics. It does this by implementing a form of Multi-Version Concurrency Control, meaning that CouchDB can handle a high volume of concurrent readers and writers without conflict.

Map/Reduce Views and Indexes:

The stored data is structured using views. In CouchDB, each view is constructed by a JavaScript function that acts as the Map half of a map/reduce operation. The function takes a document and transforms it into a single value which it returns. CouchDB can index views and keep those indexes updated as documents are added, removed, or updated.

Distributed Architecture with Replication:

CouchDB was designed with bi-direction replication (or synchronization) and off-line operation in mind. That means multiple replicas can have their own copies of the same data, modify it, and then sync those changes at a later time.

REST API:

All items have a unique URI that gets exposed via HTTP. REST uses the HTTP methods POST, GET, PUT and DELETE for the four basic CRUD (Create, Read, Update, Delete) operations on all resources.

Eventual Consistency:

CouchDB guarantees eventual consistency to be able to provide both availability and partition tolerance.

Built for Offline:

CouchDB can replicate to devices (like smartphones) that can go offline and handle data sync for you when the device is back online.

Schema-Free:

Unlike SQL databases, which are designed to store and report on highly structured, interrelated data, CouchDB is designed to store and report on large amounts of semi-structured, document oriented data. CouchDB greatly simplifies the development of document oriented applications, such as collaborative web applications.

In an SQL database, the schema and storage of the existing data must be updated as needs evolve. With CouchDB, no schema is required, so new document types with new meaning can be safely added alongside the old. However, for applications requiring robust validation of new documents custom validation functions are possible. The view engine is designed to easily handle new document types and disparate but similar documents.

Installation (Ubuntu)

Open terminal and execute

sudo apt-get install couchdb -y

If the aptitude/apt-get installation gives an error message then couchdb might not have access to its pid file.

Join Us

With 1,240,600 monthly unique visitors and over 500 authors we are placed among the top Java related sites around. Constantly being on the lookout for partners; we encourage you to join us. So If you have a blog with unique and interesting content then you should check out our JCG partners program. You can also be a guest writer for Java Code Geeks and hone your writing skills!

Disclaimer

All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners. Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. Examples Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.