CouchDB is now an Apache project, it is known to be a user friendly and lightweight Data Base Management System. It uses JSON to store data and by architecture it is NoSQL which means the data is not stored in the forms of tables, rather it uses document approach to store data. It uses Javascript as its query engine. Originally started in 2005 , Apache took it over in 2008 and it is being developed under their umbrella till now. Couch stands for Cluster Of Unreliable Commodity Hardware. We will be reviewing its main features and installation process in this article.
Noteworthy Features
The prominent features of this database are listed below:
- Used Documents to store data and each document has a unique ID, data retrieval and storage to documents is quick as compared to tables.
- Support ACID transactions, so this database works with distributed and high connection applications too
- CouchDB has native support for REST APIs and is considered to be suitable one for them
- Partition tolerance features provides reliability and stability
- Ability to sync data for devices that can go offline and handle data sync for then once they are back online and available
- Distributed architecture and support for replications for high availability systems.
Installing CouchDB on Ubuntu 15.04
Installing CouchDB is easy, as like all other popular database systems, it is also included into Package Manager repos. Launch your system terminal window and run following command to install CouchDB:
Sit tight, it should take few min to complete the install, as soon as installation is complete, run following command on your terminal to verify couchDB connectivity. Note that couchDB runs on TCP 5984 port.
If CURL is not installed on your system, run following command to install it.
The standard output of curl localhost:5984 should look as shown in the following screenshot.
You can also use web browser to check CouchDB status, for that you need to enable binding for HTTP in couchDB configuration file. Edit /etc/couchdb/default.ini file by running the following command :
And un-comment the two lines, shown as highlighted in following screenshot.
Now point your browser to http://localhost:5984 and you should see the same output 🙂
You can restart couchDB service by running the following command:
If service is not responding to port 5984 for any reason, try running “couchdb” command on the terminal, it should start it or atleast show you error message with details of why its failing.
Conclusion
CouchDB is a fast and web oriented database, it has capabilities of all modern databases. Its popularity graph is higher than other available alternatives. Some high scale applications are using CouchDB for their database operations.