Book Image

Learning Couchbase

By : Henry Potsangbam
Book Image

Learning Couchbase

By: Henry Potsangbam

Overview of this book

This book achieves its goal by taking up an end-to-end development structure, right from understanding NOSQL document design to implementing full fledged eCommerce application design using Couchbase as a backend. Starting with the architecture of Couchbase to get you up and running, this book quickly takes you through designing a NoSQL document and implementing highly scalable applications using Java API. You will then be introduced to document design and get to know the various ways to administer Couchbase. Followed by this, learn to store documents using bucket. Moving on, you will then learn to store, retrieve and delete documents using smart client base on Java API. You will then retrieve documents using SQL like syntax call N1QL. Next, you will learn how to write map reduce base views. Finally, you will configure XDCR for disaster recovery and implement an eCommerce application using Couchbase.
Table of Contents (12 chapters)
Index

Understanding the Couchbase API


Any database operation usually falls under one of the four categories of CRUD (Create, Read, Update, and Delete). What is CRUD really about? Whenever we develop an application that requires some information to be stored at the backend, before performing any activity we need to store the data, which is the primary role of any database. This is represented by C to signify creation of record in the database. Then, we fetch data for manipulating or displaying, which is represented by R to signify a read operation. Sometimes, we need to update or delete data after it is stored in the database, that is, U and D signify the update and delete operations, respectively. Most databases provide these basic operational features. Couchbase also provides these with different operation names.

CRUD operations using the Couchbase API

Let me introduce some operations and their different forms provided by Couchbase for performing CRUD operations. These are abstract methods. The...