Erasing a Database utilizing cURL Utility
You can erase a data set in CouchDB by sending a solicitation to the worker utilizing DELETE technique through cURL utility. Following is the grammar to make a data set −
$ curl -X DELETE http://127.0.0.1:5984/database name
Utilizing −X we can indicate a custom solicitation strategy for HTTP we are utilizing, while at the same time speaking with the HTTP worker. For this situation, we are utilizing the DELETE technique. Send the url to the worker by indicating the data set to be erased in it.
Model
Accept there is an information base named my_database2 in CouchDB. Utilizing the above given linguistic structure in the event that you need to erase it, you can do it as follows −
$ curl -X DELETE http://127.0.0.1:5984/my_database2
{
"ok" : true
}
As a reaction, the worker will restore you a JSON record with content "Alright" − genuine demonstrating the activity was effective.
Check
Check whether the data set is erased by drilling down all the information bases as demonstrated underneath. Here you can notice the name of the erased data set, "my_database" isn't there in the rundown.
$ curl -X GET http://127.0.0.1:5984/_all_dbs
[ "_replicator " , " _users " ]
Erasing a Database utilizing Futon
To erase a data set, open the http://127.0.0.1:5984/_utils/url where you will get an Overview/record page of CouchDB as demonstrated beneath.
Here you can see three client made data sets. Allow us to erase the information base named tutorials_point2. To erase an information base, select one from the rundown of data sets, and snap on it, which will prompt the outline page of the chose data set where you can see the different procedure on data sets. The accompanying screen capture shows the equivalent −
Among them you can discover Delete Database alternative. By tapping on it you will get a popup window, finding out if you are certain! Snap on erase, to erase the chose information base.
