CD210 Couchbase NoSQL Data Modeling, Querying, and Tuning Using N1QL

CD210 Couchbase NoSQL Data Modeling, Querying, and Tuning Using N1QL

Summary

A 3-day hands-on lab-intensive course on architecture and design of NoSQL data using N1QL. Instruction and exercises are focused on data modeling, query, storage and access for robust, scalable, high-performance NoSQL applications. Topics include: the N1QL query language (SQL for JSON), data modeling for NoSQL applications, indexes and views, and methods of application performance tuning for principal use cases. See Customer testimonials

Description

Through conceptual presentation, demonstration and extensive hands­-on labs and exercises, this 3-day instructor-­led course guides developers, architects and DBA's on storing and accessing data rapidly and at web scale, in diverse document-database use cases based on JSON, using Couchbase Server, N1QL, and related technologies. All labs rely on queries in N1QL without dependency on any particular application programming language. The course is aimed at developers, architects, analysts, DBAs, data warehouse and business intelligence admins and analysts, and DevOps professionals.

The hands-on labs (usually 60% of class time) get you real-world "flight-time" modeling NoSQL data using best practices for JSON and key/value, creating and exploiting secondary indexes, performing complex aggregations using map-reduce Views, and becoming capable with N1QL as a basis for developing powerful, scalable, and reliable applications using NoSQL data, in any programming language.

Duration

3 Days

Objectives

The course is geared to produce effective NoSQL data modeling, storage, querying, and performance tuning competency in experienced software application developers and other technical professionals who may be either newbies to data-driven apps, or already experienced with SQL and modern databases from prior data application development projects.

Audience

This course is intended for application developers, architects, software engineers, database administrators, data warehouse managers, business intelligence analysts, data engineers, and DevOps professionals with experience in any software development or scripting language, and with or without prior experience using SQL in a relational database (RDBMS) context.

Prerequisites

The course is designed for developers and data architects seeking to use Couchbase for data modeling, storage, and retrieval. No specific programming language expertise is required or assumed. Success in the hands-on labs will be assured for participants who bring prior experience writing software or scripting in ANY modern language, for example, Java, C#/.Net, Node.js, Go, Python, C/C++, Ruby, PHP, etc. Familiarity with basic programming fundamentals and database concepts is assumed, but no prior experience with NoSQL databases (or with SQL datbases) is required. We strongly suggest Participants complete the following Couchbase online courses prior to class: CB030, and CB105, and CB110.

Outline

Partial list of concepts, topics and hands-on labs. Subject to change and update without prior notice. Course includes: 

Module 00 – Welcome to the Course
Module 01 - Introduction to NoSQL
Modern Application Challenges
Growth of Digital Data
Why Not Use a Relational Database?
What is Big Data?
Common Strategies for Handling Big Data
ACID Properties in Relational Databases
BASE
The CAP Theorem
Hadoop and NoSQL
Types of NoSQL
Polyglot Programming
 
LABS: 6 hands-on labs
 
Module 02 - Introduction to Couchbase
History of Couchbase Server
NoSQL and Couchbase Server
What is Couchbase Server?
JavaScript Object Notation
Couchbase as Key-Value Store vs. Document Store
Storage of Data in Couchbase Server
Couchbase Server Architecture
What is a Couchbase Document?
Anatomy of a Couchbase Application
Read, Write and Update Operations with Couchbase
Cache Miss
The Couchbase “write path”
Scaling with Couchbase
MDS Architecture
Tools to Integrate with Couchbase
 
Module 03 – N1QL Essentials [4 labs]
JavaScript Object Notation
Json As Database Storage Format
Relational Model Vs. JSON
What is N1QL?
Goals of N1QL
Who Uses N1QL
Query Workbench
CBQ
Key features of N1QL
Querying with N1QL
SELECT Query
Querying Nested Elements
Document Meta-Data
Performing Simple Arithmetic
Filtering Documents
Pattern Matching
NULL and MISSING Values
Matching Elements in Nested Arrays with ANY
Querying Using Document Keys
Sorting, Ordering and Grouping
Unnest
Getting System Information
            Querying Datastores
            Querying Namespaces
            Querying Keyspaces
            Querying Indexes
Array, Objects and Array of Objects
Collection Operators
Functions in N1QL
            ARRAY_APPEND(expression, value, ...)
            ARRAY_INTERSECT(expression1, expression2, ...)
            DATE_ADD_MILLIS(date1, n, part)
            Other Date Functions
            Pattern-Matching Functions
            Token Functions
            String Functions
Subqueries
Joins
Join Documents from a Key Array
Data Manipulation Statements
 
Module 04 – Indexes in N1QL [4 labs + 2 optional labs]
Index Options
            Primary Index
            Named Primary Index
            Secondary Index
            Secondary Composite Index
            Functional Index
            Array Index
            Partial Index
            Covering Index
            Duplicate Index
Intersect Scans in N1QL
Bucket Analysis
The INFER command
Indexing Architectures
GSI Vs. Views
 
Module 05 – Query Engine [OPTIONAL]
Query Execution
Client to Query Service: REST API
The Parse Phase
Plan Phase
Scan Phase
Fetch Phase
Joins
Filter
Aggregate, Sort, Offset, Limit
Project Phase
Covered and Non-Covered Indexes
Capacity Management of Query Node
LABS: 2 hands-on labs
 
Module 06 - Query Planning and Tuning [1 lab]
Query Planning
Data Source Access Methods
Index Selection
Index Scans – Covering and Regular Index Scans
Index Scans – CountScan and IndexCountScan
Index Scans – ValueScan and DummyScan
Pushdowns - Predicates
Pushdowns - Order
Pushdowns - Limit
Pushdowns - Offset
Query Tuning in N1QL
Query Tuning Checklist
 
Module 07: N1QL Performance Tricks and Other Tools [3 labs + 1 optional lab]
Pretty – Query Setting
UPDATE Nested Arrays
cURL in N1QL
 
Module 08 – Introduction to Data Modeling
What is Data Modeling?
Data Modeling for Distributed Systems
Data Modeling for Couchbase Server
Conceptual Data Modeling
Logical Data Modeling
Physical Data Modeling
Data Models Used In The Course
 
Module 09 – Data Modeling for Couchbase Server [exercise by the instructor]
What is Data Modeling?
Data Modeling for Distributed Systems
Data Modeling for Couchbase Server
Conceptual Data Modeling
Logical Data Modeling
Physical Data Modeling
JSON Document Design
JSON Design Choices
Single Root Attributes
Objects vs. Arrays
Array Element Types
Timestamp Formats
Property Names
Empty and Null Property Values
JSON Schema
Data Nesting (aka Denormalization)
Key Design
Lookup Key Pattern
Making Trade-offs
Making tough choices: Document Size, Atomicity, Complexity, Speed
Embed vs. Refer
 
Module 10 – Query Monitoring and Troubleshooting [1 lab]
What is Query Monitoring?
REST API Endpoints in N1QL
Vitals
REST: active requests
REST: completed requests
REST: prepared statements
REST: cache configuration
SYSTEM Namespaces and N1QL Query Monitoring
Using N1QL Monitoring for Problem Resolution
Prepared Statements With Highest Execution Time
Prepared Statements With Highest Prepare Counts
Non-Prepared Statements With Highest Execution Times/Counts
Plans Using Sub-Optimal Indexes
Cancelling unruly requests
Profiling
 
Module 11 – View Essentials [OPTIONAL] [1 lab]
What is a View?
MapReduce
Design Documents
Working with Views in the Couchbase web console
Create Development View
Writing Map Functions
The emit Function
Writing Reduce Functions
Built-in Reduce Functions
View group and group_level
Emitting Multiple Rows from the Map Function
Emitting Array Keys
View Use Cases
View vs. N1QL
 
Labs
lab-01-n1ql-essentials
lab-02-n1ql-without-indexes-use-keys
lab-03-ARRAY_INTERSECT()
lab-04-dynamic-object-constructon
lab-05-designing-index-for-query-in-couchbase-n1ql
lab-06-split
lab-07-suffixes
lab-08-tokens-simple
lab-09-tokens-detailed [optional]
lab-10-n1ql-twitter [optional]
lab-11-index-scans-in-couchbase-n1ql-query
lab-12-pretty-query-setting
lab-13-update-nested-arrays
lab-14-cURL
lab-15-cbq [optional]
lab-16-query-performance-monitoring
lab-17-view-essentials [optional]

Note: The above listed topics, labs, and all other content of this course are subject to change and/or update without prior notice from time to time, as we optimize our hands-on training for guaranteed customer success.

Public Training

Madrid

London, London

VIRTUAL Class - EMEA GMT

Kirkland, WA

El Segundo, CA

San Francisco, CA

VIRTUAL Class - Pacific / Mountain Time

Chicago, il

Dallas, TX

Singapore, Singapore

Barcelona

VIRTUAL Class - Eastern / Central Time

New York, NY

Paris, Ile-de-France

Paris