Data set is the peripheral information structure in CouchDB where your archives are put away. You can make these data sets utilizing cURL utility given by CouchDB, just as Futon the web interface of CouchDB.
Making a Database utilizing cURL Utility
You can make a data set in CouchDB by sending a HTTP solicitation to the worker utilizing PUT strategy through cURL utility. Following is the grammar to make a data set −
$ curl -X PUT http://127.0.0.1:5984/database name
Utilizing −X we can indicate HTTP custom solicitation technique to be utilized. For this situation, we are utilizing PUT technique. At the point when we utilize the PUT activity/technique, the substance of the url determines the article name we are making utilizing HTTP demand. Here we need to send the name of the data set utilizing put demand in the url to make a data set.
Model
Utilizing the above given sentence structure in the event that you need to make an information base with name my_database, you can make it as follows
curl -X PUT http://127.0.0.1:5984/my_database
{
"ok":true
}
As a reaction the worker will restore you a JSON record with content "Alright" − genuine showing the activity was effective.
Confirmation
Check whether the information base is made, by drilling down all the data sets as demonstrated beneath. Here you can notice the name of a recently made data set, " my_database " in the rundown.
$ curl -X GET http://127.0.0.1:5984/_all_dbs
[ "_replicator " , " _users " , " my_database " ]
Making a Database utilizing Futon
To make a data set open the http://127.0.0.1:5984/_utils/. You will get an Overview/record page of CouchDB as demonstrated beneath.
In this page, you can see the rundown of data sets in CouchDB, an alternative catch Create Database on the left hand side.
Presently click on the make data set connection. You can see a popup window Create New Databases requesting the information base name for the new data set. Pick any name following the referenced standards. Here we are making another information base with name tutorials_point. Snap on the make button as demonstrated in the accompanying screen capture.
