Cloudant logo

A first look at Cloudant on IBM Cloud

IBM Cloudant is a distributed NoSQL database build on couchDB. It is a NoSQL JSON document data store, delivered as a managed database service (DBaaS).

Types of documents that Cloudant supports:

  • data document (json and xml)
  • design document. Are intended to hold the definition for all secondary and search indexes created in data documents. All design documents _id will start with “_design/” followed by the design document name.

Two attributes are required in every document:

  • _id attribute is automatically generated if not specified
  • _rev is always autogenerated and manage by cloudant every time you modify a document. It is used by cloudant to do the autosync between various replicas.

It is ideal for application that require:

  • massive elastic scalability
  • high availability
  • geo-location services
  • full-text search
  • occasionally connected users.

When you are designing Cloudant collections, you should have in mind some good practice for that:

  • as much as possible try to have single schema documents per Cloudant database. However, if you decide to have multiple schema documents in one DB make sure to add a schema-type attribute in every document.
  • let Cloudant generate the _id attribute, unless you are absolutely sure it is going to be unique.

Resources:

  • https://developer.ibm.com/clouddataservices/docs/cloudant/
Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply