DEV Community

Cover image for The Simple Basics of Cloudant NoSQL DB
Bradston Henry for IBM Developer

Posted on • Edited on

The Simple Basics of Cloudant NoSQL DB

In my last blog, we covered how to create a Cloudant NoSQL DB in just 5 minutes. In this blog, we will continue on the topic of Cloudant NoSQL DB and will look at the basics of the database. We will look at a simplified architecture, some of the Cloudant API capabilities and some of the features of Cloudant NoSQL DB.

If you have not already gone through the process of creating a Cloudant NoSQL DB instance in IBM Cloud, I encourage you to check out the blog below. This way you will have had an opportunity to check out Cloudant in the the cloud:

So without further adieu, let's get into it!

A Basic Overview of Cloudant NoSQL DB

So let's first look at Cloudant NoSQL DB as a whole and get a high-level understanding of how it works. Below is a very simplified architecture diagram of Cloudant NoSQL DB:

Cloudant-NoSQL-DB-Simple-Arch-Diagram

So the first thing to be aware of us that Cloudant NoSQL DB is hosted in IBM Cloud. To be more specific it can be called IBM Cloudant and is based on the Open Source Apache Couch DB project. It being hosted in IBM Cloud allows you to get all the security and accessibility that IBM Cloud has by default without any extra configuration or work.

Within any instance of Cloudant NoSQL DB are what are called databases (in the above diagram databases are represented as DB1, DB2, and DB3). In each individual database, data is stored in "documents" (in the above diagram they are represented by the document icons).

Each instance of Cloudant NoSQL DB can have multiple databases and each database can have multiple documents.

Each document is stored in JSON (Javascript Object Notation) inside of its particular database.

Data can be created, edited and deleted manually using the Cloudant NoSQL DB UI at anytime BUT Cloudant offers an immense amount of capabilities using its Cloudant API. Using the Cloudant API, any developer with the correct access rights can create, modify, delete, view or work with documents and databases using industry standard HTTP Requests.

Here is a quick look at some of the high level requests a developer can access when using the Cloudant API via HTTP Request (NOTE: This is just a sample of a handful of possible requests. There are many more possible request types. Check out the Cloudant API Documentation for more info):

Cloudant-NoSQL-DB-Cloudant-API-Overview

  • GET: Returns document with the specified ‘doc_id’ from the specified database. NOTE: doc_id represents the ID or name of any particular document.

  • POST: Creates or modifies a document in the specified database by using the supplied JSON.

  • PUT: Creates a new named document, or creates a new revision of the existing document.

  • DELETE: Marks the specified document as deleted by adding a '_deleted' field with the value true. Documents with this field are not returned within requests anymore but stay in the database.

Though it may not be completely apparent at the moment, one of the greatest strengths of Cloudant NoSQL is it's extremely convenient and powerful API. It allows for rapid integration into diverse project environments and standardized database implementations.

Finally, here is a snapshot of some of the features that Cloudant NoSQL offers out-of-the-box (specificially IBM Cloudant):

IBM-Cloudant-Features

  • Serverless: Deploy an instance, create databases and independently scale throughput capacity and data storage to meet your application requirements.
  • Secure: Encrypt all data, with optional user-defined encryption key management through IBM® Key Protect and integrate with IBM Identity and Access Management.
  • Global Availability: Get continuous availability as Cloudant distributes data across availability zones and 6 regions for app performance and disaster recovery requirements.
  • Powerful API: Store JSON documents with an HTTP API. Enhance your applications with built-in key value, MapReduce, full-text search and geospatial querying.
  • Zero vendor Lock-in: Employ an open-source drop-in replacement — Apache CouchDB. You can deploy for hybrid or multicloud architectures.
  • Complaint: Ensure compliance as Cloudant is ISO 27001 compatible and SOC 2 Type 2, PCI, GDPR and HIPAA compliant.
  • Durable replication: Move app data closer to where it’s needed for continuous data access. Build web apps, develop with an offline-first architecture or manipulate data at the edge.
  • Cloudant  Language Libraries: Supported languages include Android, iOS, Java, Node.js, Python and Swift.

And for those who may be interested in the history of Cloudant, Cloudant was founded my three MIT physicist who worked on large data experiments like the Large Hadron Collider. Its goal was to solve the "big data" problem and was designed for cloud computing and distributing data across multiple servers. With an emphasis on data consistency and data distribution, Cloudant has become a great option for developers looking for more agile and easy-to-use cloud databases.


As you can see, Cloudant NoSQL has a pretty simple, straight-forward and easy to understand architecture as well as a powerful API backing it all. Along with that, it has quite a few features that makes it very useful in this growing cloud development environment and makes it easier for a developer to get going without worrying about things like security and language dependencies.

In my next blog, I'll be focusing on making your first database and how we can quickly and easily connect to it. In that blog, we will also be using the Cloudant API to do a few basic API requests to test the Cloudant NoSQL DB.

And if you are looking to learn more about Cloudant, check out the replays of some of my past webinars where I talk about the nitty-gritty of the basics of Cloudant NoSQL DB and how they relate to React and NodeJS.

React and Databasing: Basics of Cloudant NoSQL DB
https://www.crowdcast.io/e/react-and-basics-of-ibm

NodeJS and Databasing: Basics of Cloudant NoSQL DB
https://www.crowdcast.io/e/nodejs-and-databasing

Thanks for checking out this blog and until next time!


LOOKING TO LEARN A THING? Check out some of my previous blogs and tutorials:

Dockers and Dad Jokes: How to Containerize a ReactJS Application

Deploying your first ReactJS application into the Cloud

Creating Your Own Chat Room with React, Node, and Socket.io in the Cloud Part 1 Part 2

==== FOLLOW ME ON SOCIAL MEDIA ====

Twitter: Bradston Dev
Dev.to: @bradstondev
Youtube: Bradston YT

Top comments (0)