CouchDB - SPLessons

CouchDB Create Database

Home > Lesson > Chapter 6
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

CouchDB Create Database

CouchDB Create Database

shape Description

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

shape Description

The following steps describes the process of creating a database using futon.

shape Step - 1

For creating a database open http://127.0.0.1:5984/_utils/.

shape Step - 2

Click on Create Database.

shape Step - 3

Enter the New Database name and click on Create button.

shape Step - 4

The entered new database name Splessons1 has been successfully created.

Database creating using cURL Utility

shape Description

Database can be created in CouchDB by passing a HTTP solicitation to the server utilizing PUT techniques over the utility of cURL.

shape 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.

shape 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

shape 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.