Query Data from Couchbase Using N1QL
By Kishan Iyer
Course info



Course info



Description
Couchbase is a document-oriented database which has its own query language, called N1QL to view and manipulate data. In this course, Query Data from Couchbase Using N1QL, you will get some hand-on experience in writing N1QL queries whose syntax is similar to SQL but is meant to work with JSON documents. First, you will explore how documents can be searched using the Couchbase web UI and how this interface allows you to define filters based on a document key and also on the values of its attributes. Next, you will cover some of the basics of querying in the N1QL query language - such as the SELECT, FROM and WHERE clauses of a N1QL query - and will also take a brief look at adding and updating documents using INSERT and UPDATE queries. Finally, you will discover how to work with data at a document level, and also perform aggregate operations using the GROUP BY and HAVING clauses. You will then gain an understanding on the use of built-in functions in N1QL, the building of indexes and the use of conditional operators such as the CASE statement. Once you finish this course, you will have a broad understanding of the capabilities of Couchbase and N1QL and can run a variety of queries on your document data.
Section Introduction Transcripts
Course Overview
Hi, and welcome to this course, Query Data from Couchbase using N1QL. My name is Kishan Iyer, and I will be your instructor for this course. A little about myself first. I have a Master's Degree in computer science from Columbia University and have previously worked in companies such as Deutsche Bank and WebMD in New York. I presently work for Loonycorn, a studio for high‑quality video content. Couchbase is a document‑oriented database, which has its own query language called N‑1‑Q‑L or N1QL. And this can be used to view and manipulate data. In this course, you will get some hands‑on experience in writing N1QL queries. The syntax is similar to SQL, but is meant to work with JSON documents. First, you will explore how documents can be searched using the Couchbase web UI and how this interface allows you to define filters based on a document key and also on the values of its attributes. Next, you will cover some of the basics of querying in the N1QL language, such as SELECT, FROM, and WHERE clauses, and we'll also take a brief look at adding and updating documents using insert and update queries. Beyond working with data at the document level, we also performed aggregate operations using the GROUP BY and HAVING clauses. We then explore the use of built‑in functions in N1QL, the building of indexes, and the use of conditional operators such as a case statement. Once you finish this course, you will have a broad understanding of the capabilities of Couchbase and N1QL and can run a variety of queries on your document data.