A Database is a huge gathering of logical related information, Which can be created, accessed, managed, and updated. The data can may be in any form like text and numbers. There are many type of data stores, such as files on the file system, where data reading and writing will be very slow. So in this present generation, relational database administration framework is being utilized to store and oversee colossal measure of information.
Database is the peripheral informational structure in CouchDB in which all the records are saved and an generate a new databases utilizing cURL utility contributed by CouchDB, and in addition Futon the web interface of CouchDB.
Database creating using Futon
Description
The following steps describes the process of creating a database using futon.
Step - 1
For creating a database open http://127.0.0.1:5984/_utils/.
Step - 2
Click on Create Database.
Step - 3
Enter the New Database name and click on Create button.
Step - 4
The entered new database name Splessons1 has been successfully created.
Database creating using cURL Utility
Description
Database can be created in CouchDB by passing a HTTP solicitation to the server utilizing PUT techniques over the utility of cURL.
Syntax
The syntax for creating a database using cURL utility.
$ curl -X PUT http://127.0.0.1:5984/database_name;
X => HTTP request.
PUT => Operation/methods in the url's.
Examples
By viewing the below example, the concept of creating a new database can be easily understand.
[c]
curl -X PUT http://127.0.0.1:5984/splessons
{
"ok":true
}
$ curl -X GET http://127.0.0.1:5984/_all_dbs
[ "_replicator " , " _users " , " splessons " ]
[/c]
Here in the above example Splessons database as been successfully created and get verified that the database is existing or not.
Summary
Key Points
Creating a database - Huge gathering of logical related information.
Creating new database using futon - The process of creating a new database.
Creating new database using cURL utility - Created by passing a HTTP solicitation to the server using PUT techniques.