Experiment No-9
Title :- Installation of CouchDB on Ubuntu. Create
and delete CouchDB database. Run CouchDB query with Mongo.
Aim : To understand CouchDB.
Theory:
What is CouchDB? 1. CouchDB is a NoSQL Database
that uses JSON for documents. 2. CouchDB uses JavaScript for MapReduce indexes.
3. CouchDB uses HTTP for the REST API.
· Download for Windows OR macOs or
Debian/Ubuntu/RHEL/CentOS. Double click the downloaded installer and follow
through the steps.
· Access CouchDB Web Interface: Open Web browser and
browse to http://127.0.0.1:5984/_utils/
Fauxton Fauxton is a web based interface built into
CouchDB. You can do actions like creating and deleting databases, CRUD
operations on documents, user management, running MapReduce on indexex,
replication between CouchDB instances. Fauxton available at the URL
http://127.0.0.1:5984/_utils/
Create Database in CouchDB To create a CouchDB
Database, click on Databases tab in the left menu and then click on Create
Database.
Create a Document in CouchDB Database To create a
document in database, click on the Create Document button.
View documents of CouchDB Database:
1. Table 2. Metadata 3. JSON
Run CouchDB query with Mango Mongo is an easy way
to find documents on predefined indexes. Mongo provides a single HTTP API
endpoint that accepts JSON bodies via HTTP POST. These bodies provide a set of
instructions that returns the result in the same order we specified.
Conclusion: Students are able to perform queries
using CouchDB.