Getting Up to Speed with CouchDB and Java

by Alex Popescu

Nothing fancy, but if you haven’t done it already, this article will probably get you started in no time.

This article provides a step-by-step guide for using Apache CouchDB using Java. Here we will use Java code to:

  • Create a database in CouchDB,
  • Store employee data (Employee number, Name, Designation, etc).
  • Perform some CRUD operations on the data that is stored.
  • Show the use of “Views” and how it can retrieve data based on field values.

The software we use includes:

  • Apache CouchDB 0.9.0 installation
  • Couchdb4j-0.1.2 jar file
  • Json-lib-2.2.3-jdk15 jar file
  • ezmorph-1.0 jar file
  • Httpclient-4.0-beta2 jar file
  • Httpcore-4.0.1 jar file

Please note the current CouchDB version is 0.10.1, so you might want to try with this version instead of the one mentioned in the article.