Modify Data in Couchbase 6 Using N1QL
This course covers different ways to alter document data in Couchbase using the N1QL query language. It explores the queries used to add new data, modify existing data, and remove unwanted documents.
What you'll learn
Are you looking for different ways to alter document data in Couchbase? In this course, Modify Data in Couchbase Using N1QL, we look at different ways in which document data can be added to Couchbase, modified, and also removed using the N1QL query language. First, you will cover the different kinds of statements which N1QL provides in order to perform data modifications. You then delve into the use of INSERT statements to add one or more documents to Couchbase buckets and examine the role-based access control feature of Couchbase, specifically, the assignment of permissions to users to run N1QL queries performing INSERT operations. Next, with the addition of entire documents, you will discover how individual attributes can be added to, modified or removed from existing documents using the UPDATE statement. You will also cover the use of UPSERT statements which are a combination of INSERT and UPDATE statements. You will also explore the use of DELETE statements in order to remove documents which are no longer required. Finally, once you are familiar familiar with different ways to modify data, you will cover the use of MERGE statements to define which data needs to be added, modified or removed based on the results of a join operation. Once you are done with this course, you will have the skills required to perform any kind of data modification on your Couchbase document data using the N1QL query language.
Table of contents
- The DELETE and MERGE Statements 7m
- Demo: The DELETE Statement 6m
- Demo: Permissions for DELETE Queries 5m
- Demo: The MERGE Statement 5m
- Demo: Merging with an Empty Source 4m
- Demo: Merges Without Matches 4m
- Demo: The Lookup Merge 3m
- Demo: Deletes in Merge Queries 5m
- Demo: Data Compaction 6m
- Demo: Auto Compaction 6m