SlideShare a Scribd company logo
1 of 20
Download to read offline
“N1QL” A Rich Query 
Language For Couchbase 
Don Pinto 
Sr. Product Manager, Couchbase
Agenda 
• Rich data 
• Compare relational and N1QL data model 
• Mission 
• Resources 
• Q&A 
• Demo
The Real World
Couchbase Server 
General 
purpose 
The 
Most 
complete, 
scalable 
& 
highest 
performing 
NoSQL 
database 
Elas-c 
scalability 
Consistent 
high 
performance 
Always 
available 
Flexible, 
global 
deployment 
Enterprise 
grade 
administra-on 
Real 
-me 
big 
data 
Data 
mobility 
Developer 
focused
Couchbase Server 
Couchbase 
offers 
a 
full 
range 
of 
Data 
Management 
solu5ons 
High 
Availability 
Cache 
Key 
Value 
Document 
Mobile 
device 
SSN: 
400 
658 
9993 
Pass: 
******
A Basic Data Model 
§ Tables, schemas, constraints 
§ Prevailing model for 30+ years
A Rich Data Model 
8 
Person 
Name 
DOB 
Billing 
Connec5ons 
Purchases 
Jane 
Smith 
Product 
Jan-­‐30-­‐1990 
§ Structure and richness of real-world data 
§ Drivers: Big Data, agility 
§ Enabler: JSON — convenient, standard
9 
Basic 
Data 
Model 
Rich 
Data 
Model 
Technology 
q Rela-onal 
v Document 
Building 
blocks 
§ Flat 
tables 
ü Rich 
objects 
Developer 
impact 
§ Real 
world 
must 
be 
translated 
§ Objects 
must 
be 
assembled 
§ Data 
must 
be 
uniform 
§ Change 
must 
be 
an 
excep-on 
ü Real 
world 
can 
be 
reflected 
ü Objects 
can 
be 
represented 
ü Data 
can 
be 
uniform 
or 
varied 
ü Change 
can 
be 
a 
norm 
Query 
language 
q SQL 
v N1QL 
— 
SQL 
and 
more 
Comparing the data models
10 
SQL: 
Expressive 
Power 
JSON: 
Rich 
Data 
N1NF 
N1QL: 
Query 
Language 
for 
Rich 
Data 
Defining N1QL
11 
What does N1QL achieve? 
Ø Joy 
for 
Developers 
§ Freedom, 
flexibility, 
alignment, 
produc-vity 
§ 
Best 
of 
both 
— 
SQL 
and 
rich 
data 
Ø Power 
for 
Big 
Data 
Applica5ons 
§ Ability 
to 
index 
and 
query 
rich 
data 
at 
scale 
§ Power 
of 
Couchbase 
extended 
to 
querying 
Ø Value 
for 
Customers 
§ Query 
technology 
for 
a 
new 
era 
§ Enabler 
for 
applica-ons 
of 
the 
future
12 
Reading 
Data 
SELECT 
Projec-on 
DISTINCT 
De-­‐duplica-on 
FROM 
Sourcing 
JOIN 
INNER, 
LEFT 
OUTER 
WHERE 
Filtering 
GROUP 
BY 
Aggrega-on 
— 
HAVING, 
MIN, 
MAX, 
SUM, 
AVG, 
COUNT 
[ 
DISTINCT 
] 
ORDER 
BY 
Sor-ng 
LIMIT, 
OFFSET 
Paging 
UNION*, 
INTERSECT*, 
EXCEPT* 
Set 
operators 
EXPLAIN 
Analyzing 
and 
tuning 
query 
execu-on 
plans 
N1QL Features - Reads 
*Upcoming
13 
N1QL Features - Writes 
Wri5ng 
Data 
CREATE 
INDEX 
Create 
a 
Couchbase 
view 
index 
or 
secondary 
index* 
DROP 
INDEX 
Drop 
an 
index 
INSERT* 
INSERT 
using 
VALUES 
or 
SELECT 
UPDATE* 
UPDATE…WHERE, 
with 
document-­‐level 
atomicity 
DELETE* 
DELETE 
FROM…WHERE, 
with 
document-­‐level 
atomicity 
MERGE* 
MERGE 
with 
INSERT 
or 
UPDATE, 
depending 
on 
match 
*Upcoming
14 
N1QL Features - Expressions 
Expressions 
Literals 
Primi-ves 
[ 
0, 
‘hello’, 
TRUE 
] 
NULL 
Operators 
Arithme-c 
[ 
+, 
-­‐, 
*, 
/, 
% 
] 
Logical 
[ 
AND, 
OR, 
NOT 
] 
Comparison 
[ 
<, 
<=, 
=, 
!=, 
>=, 
>, 
BETWEEN, 
IS 
NULL 
] 
Papern 
matching 
[ 
LIKE 
] 
Condi-onal 
[ 
CASE 
] 
Scalar 
func-ons 
Numeric 
[ 
trigonometric, 
ROUND, 
TRUNC, 
… 
] 
String 
[ 
UPPER, 
LOWER, 
TRIM, 
SUBSTR, 
… 
] 
Date 
[ 
string 
and 
numeric 
dates, 
NOW, 
date 
arithme-c*, 
… 
] 
Aggregate 
func-ons 
MIN, 
MAX, 
SUM, 
AVG, 
COUNT 
[ 
DISTINCT 
] 
Subqueries* 
Subqueries 
are 
full 
expressions 
*Upcoming
15 
Nested 
Data 
Mul--­‐valued 
apributes 
Arrays 
as 
apributes 
Nested 
objects 
Mul--­‐level 
nes-ng 
of 
objects; 
path 
naviga-on 
NEST 
Collec-ng 
second 
term 
into 
nested 
array 
[ 
INNER, 
LEFT 
OUTER 
] 
UNNEST 
Flapening 
nested 
array 
[ 
INNER, 
LEFT 
OUTER 
] 
Collec-on 
operators 
Mapping, 
filtering, 
predicate, 
indexing, 
and 
slicing 
operators 
Collec-on 
func-ons 
Sort, 
Reverse, 
Dis-nct, 
Append, 
Concatenate, 
Contains… 
Collec-on 
aggrega-on* 
MIN, 
MAX, 
SUM, 
AVG, 
COUNT 
[ 
DISTINCT 
] 
Deep 
traversal* 
Finding 
or 
collec-ng 
of 
matching 
elements 
WITHIN 
any 
depth 
Array 
and 
deep 
update* 
UPDATE 
of 
matching 
elements 
IN 
arrays 
and 
WITHIN 
any 
depth 
Construc-on 
Dynamic 
construc-on 
of 
objects, 
arrays, 
and 
their 
combina-ons 
*Upcoming 
Rich Data Features - Nesting
Features for Rich Data — Heterogeneity 
Heterogeneous 
Data 
Heterogeneous 
inputs 
Input 
data 
of 
varying 
structure 
and 
type 
Heterogeneous 
results 
Results 
of 
varying 
structure 
and 
type 
Raw 
projec-on 
Support 
for 
non-­‐tuple, 
non-­‐object 
results 
Schema 
inference* 
Inference 
of 
result 
structure 
and 
types, 
based 
on 
result 
expressions 
Missing 
apributes 
IS 
[ 
NOT 
] 
MISSING 
and 
other 
operators 
and 
func-ons 
Apribute 
removal* 
UPDATE…UNSET 
to 
remove 
apributes 
Total 
ordering* 
Comparison 
and 
ordering 
for 
all 
values, 
across 
all 
types 
Implicit 
types* 
§ Type-­‐encoding 
func-ons 
+ 
expression 
indexes* 
§ For 
example, 
range 
scans 
on 
dates 
Closure 
JSON 
in, 
JSON 
out 
16 
*Upcoming
17 
Features for Distributed Data 
Distributed 
Data 
Key-­‐value 
access 
§ KEYS 
available 
in 
SELECT, 
UPDATE, 
DELETE 
§ KEYS 
used 
in 
JOIN, 
NEST, 
subqueries*, 
MERGE* 
Document 
metadata 
§ META 
func-on 
to 
access 
ID, 
TTL, 
CAS, 
FLAGS… 
LIMIT 
on 
UPDATE 
& 
DELETE* 
§ LIMIT 
available 
in 
write 
statements 
*Upcoming
18 
Resources 
Ø query.couchbase.com 
§ Downloads 
§ Tutorial 
§ Documenta-on 
§ Blogs 
§ Webinars 
§ Forum 
Ø @N1QL 
§ Follow 
us 
§ Engage
Thank you! 
@NoSQLDon | don@couchbase.com

More Related Content

Similar to “N1QL” a Rich Query Language for Couchbase: Presented by Don Pinto, Couchbase

Couchbase N1QL: Language & Architecture Overview.
Couchbase N1QL: Language & Architecture Overview.Couchbase N1QL: Language & Architecture Overview.
Couchbase N1QL: Language & Architecture Overview.Keshav Murthy
 
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5Keshav Murthy
 
A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...
A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...
A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...VMware Tanzu
 
Do More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the EnterpriseDo More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the EnterpriseEDB
 
Couchbase Data Platform | Big Data Demystified
Couchbase Data Platform | Big Data DemystifiedCouchbase Data Platform | Big Data Demystified
Couchbase Data Platform | Big Data DemystifiedOmid Vahdaty
 
managing big data
managing big datamanaging big data
managing big dataSuveeksha
 
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...Databricks
 
No SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBNo SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBKen Cenerelli
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersMichael Rys
 
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)Michael Rys
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLEDB
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3RojaT4
 
PGQL: A Language for Graphs
PGQL: A Language for GraphsPGQL: A Language for Graphs
PGQL: A Language for GraphsJean Ihm
 
Analyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudAnalyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudRobert Dempsey
 
N1QL: What's new in Couchbase 5.0
N1QL: What's new in Couchbase 5.0N1QL: What's new in Couchbase 5.0
N1QL: What's new in Couchbase 5.0Keshav Murthy
 
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...Amazon Web Services
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLAlexei Krasner
 

Similar to “N1QL” a Rich Query Language for Couchbase: Presented by Don Pinto, Couchbase (20)

Couchbase N1QL: Language & Architecture Overview.
Couchbase N1QL: Language & Architecture Overview.Couchbase N1QL: Language & Architecture Overview.
Couchbase N1QL: Language & Architecture Overview.
 
Databases for Data Science
Databases for Data ScienceDatabases for Data Science
Databases for Data Science
 
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
 
A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...
A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...
A Modern Interface for Data Science on Postgres/Greenplum - Greenplum Summit ...
 
Do More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the EnterpriseDo More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the Enterprise
 
Couchbase Data Platform | Big Data Demystified
Couchbase Data Platform | Big Data DemystifiedCouchbase Data Platform | Big Data Demystified
Couchbase Data Platform | Big Data Demystified
 
managing big data
managing big datamanaging big data
managing big data
 
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
 
No SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBNo SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDB
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
 
Couchbas for dummies
Couchbas for dummiesCouchbas for dummies
Couchbas for dummies
 
Presentation
PresentationPresentation
Presentation
 
PGQL: A Language for Graphs
PGQL: A Language for GraphsPGQL: A Language for Graphs
PGQL: A Language for Graphs
 
Analyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudAnalyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The Cloud
 
N1QL: What's new in Couchbase 5.0
N1QL: What's new in Couchbase 5.0N1QL: What's new in Couchbase 5.0
N1QL: What's new in Couchbase 5.0
 
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQL
 

More from Lucidworks

Search is the Tip of the Spear for Your B2B eCommerce Strategy
Search is the Tip of the Spear for Your B2B eCommerce StrategySearch is the Tip of the Spear for Your B2B eCommerce Strategy
Search is the Tip of the Spear for Your B2B eCommerce StrategyLucidworks
 
Drive Agent Effectiveness in Salesforce
Drive Agent Effectiveness in SalesforceDrive Agent Effectiveness in Salesforce
Drive Agent Effectiveness in SalesforceLucidworks
 
How Crate & Barrel Connects Shoppers with Relevant Products
How Crate & Barrel Connects Shoppers with Relevant ProductsHow Crate & Barrel Connects Shoppers with Relevant Products
How Crate & Barrel Connects Shoppers with Relevant ProductsLucidworks
 
Lucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
Lucidworks & IMRG Webinar – Best-In-Class Retail Product DiscoveryLucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
Lucidworks & IMRG Webinar – Best-In-Class Retail Product DiscoveryLucidworks
 
Connected Experiences Are Personalized Experiences
Connected Experiences Are Personalized ExperiencesConnected Experiences Are Personalized Experiences
Connected Experiences Are Personalized ExperiencesLucidworks
 
Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...
Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...
Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...Lucidworks
 
[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...
[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...
[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...Lucidworks
 
Preparing for Peak in Ecommerce | eTail Asia 2020
Preparing for Peak in Ecommerce | eTail Asia 2020Preparing for Peak in Ecommerce | eTail Asia 2020
Preparing for Peak in Ecommerce | eTail Asia 2020Lucidworks
 
Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...
Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...
Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...Lucidworks
 
AI-Powered Linguistics and Search with Fusion and Rosette
AI-Powered Linguistics and Search with Fusion and RosetteAI-Powered Linguistics and Search with Fusion and Rosette
AI-Powered Linguistics and Search with Fusion and RosetteLucidworks
 
The Service Industry After COVID-19: The Soul of Service in a Virtual Moment
The Service Industry After COVID-19: The Soul of Service in a Virtual MomentThe Service Industry After COVID-19: The Soul of Service in a Virtual Moment
The Service Industry After COVID-19: The Soul of Service in a Virtual MomentLucidworks
 
Webinar: Smart answers for employee and customer support after covid 19 - Europe
Webinar: Smart answers for employee and customer support after covid 19 - EuropeWebinar: Smart answers for employee and customer support after covid 19 - Europe
Webinar: Smart answers for employee and customer support after covid 19 - EuropeLucidworks
 
Smart Answers for Employee and Customer Support After COVID-19
Smart Answers for Employee and Customer Support After COVID-19Smart Answers for Employee and Customer Support After COVID-19
Smart Answers for Employee and Customer Support After COVID-19Lucidworks
 
Applying AI & Search in Europe - featuring 451 Research
Applying AI & Search in Europe - featuring 451 ResearchApplying AI & Search in Europe - featuring 451 Research
Applying AI & Search in Europe - featuring 451 ResearchLucidworks
 
Webinar: Accelerate Data Science with Fusion 5.1
Webinar: Accelerate Data Science with Fusion 5.1Webinar: Accelerate Data Science with Fusion 5.1
Webinar: Accelerate Data Science with Fusion 5.1Lucidworks
 
Webinar: 5 Must-Have Items You Need for Your 2020 Ecommerce Strategy
Webinar: 5 Must-Have Items You Need for Your 2020 Ecommerce StrategyWebinar: 5 Must-Have Items You Need for Your 2020 Ecommerce Strategy
Webinar: 5 Must-Have Items You Need for Your 2020 Ecommerce StrategyLucidworks
 
Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...
Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...
Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...Lucidworks
 
Apply Knowledge Graphs and Search for Real-World Decision Intelligence
Apply Knowledge Graphs and Search for Real-World Decision IntelligenceApply Knowledge Graphs and Search for Real-World Decision Intelligence
Apply Knowledge Graphs and Search for Real-World Decision IntelligenceLucidworks
 
Webinar: Building a Business Case for Enterprise Search
Webinar: Building a Business Case for Enterprise SearchWebinar: Building a Business Case for Enterprise Search
Webinar: Building a Business Case for Enterprise SearchLucidworks
 
Why Insight Engines Matter in 2020 and Beyond
Why Insight Engines Matter in 2020 and BeyondWhy Insight Engines Matter in 2020 and Beyond
Why Insight Engines Matter in 2020 and BeyondLucidworks
 

More from Lucidworks (20)

Search is the Tip of the Spear for Your B2B eCommerce Strategy
Search is the Tip of the Spear for Your B2B eCommerce StrategySearch is the Tip of the Spear for Your B2B eCommerce Strategy
Search is the Tip of the Spear for Your B2B eCommerce Strategy
 
Drive Agent Effectiveness in Salesforce
Drive Agent Effectiveness in SalesforceDrive Agent Effectiveness in Salesforce
Drive Agent Effectiveness in Salesforce
 
How Crate & Barrel Connects Shoppers with Relevant Products
How Crate & Barrel Connects Shoppers with Relevant ProductsHow Crate & Barrel Connects Shoppers with Relevant Products
How Crate & Barrel Connects Shoppers with Relevant Products
 
Lucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
Lucidworks & IMRG Webinar – Best-In-Class Retail Product DiscoveryLucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
Lucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
 
Connected Experiences Are Personalized Experiences
Connected Experiences Are Personalized ExperiencesConnected Experiences Are Personalized Experiences
Connected Experiences Are Personalized Experiences
 
Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...
Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...
Intelligent Insight Driven Policing with MC+A, Toronto Police Service and Luc...
 
[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...
[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...
[Webinar] Intelligent Policing. Leveraging Data to more effectively Serve Com...
 
Preparing for Peak in Ecommerce | eTail Asia 2020
Preparing for Peak in Ecommerce | eTail Asia 2020Preparing for Peak in Ecommerce | eTail Asia 2020
Preparing for Peak in Ecommerce | eTail Asia 2020
 
Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...
Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...
Accelerate The Path To Purchase With Product Discovery at Retail Innovation C...
 
AI-Powered Linguistics and Search with Fusion and Rosette
AI-Powered Linguistics and Search with Fusion and RosetteAI-Powered Linguistics and Search with Fusion and Rosette
AI-Powered Linguistics and Search with Fusion and Rosette
 
The Service Industry After COVID-19: The Soul of Service in a Virtual Moment
The Service Industry After COVID-19: The Soul of Service in a Virtual MomentThe Service Industry After COVID-19: The Soul of Service in a Virtual Moment
The Service Industry After COVID-19: The Soul of Service in a Virtual Moment
 
Webinar: Smart answers for employee and customer support after covid 19 - Europe
Webinar: Smart answers for employee and customer support after covid 19 - EuropeWebinar: Smart answers for employee and customer support after covid 19 - Europe
Webinar: Smart answers for employee and customer support after covid 19 - Europe
 
Smart Answers for Employee and Customer Support After COVID-19
Smart Answers for Employee and Customer Support After COVID-19Smart Answers for Employee and Customer Support After COVID-19
Smart Answers for Employee and Customer Support After COVID-19
 
Applying AI & Search in Europe - featuring 451 Research
Applying AI & Search in Europe - featuring 451 ResearchApplying AI & Search in Europe - featuring 451 Research
Applying AI & Search in Europe - featuring 451 Research
 
Webinar: Accelerate Data Science with Fusion 5.1
Webinar: Accelerate Data Science with Fusion 5.1Webinar: Accelerate Data Science with Fusion 5.1
Webinar: Accelerate Data Science with Fusion 5.1
 
Webinar: 5 Must-Have Items You Need for Your 2020 Ecommerce Strategy
Webinar: 5 Must-Have Items You Need for Your 2020 Ecommerce StrategyWebinar: 5 Must-Have Items You Need for Your 2020 Ecommerce Strategy
Webinar: 5 Must-Have Items You Need for Your 2020 Ecommerce Strategy
 
Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...
Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...
Where Search Meets Science and Style Meets Savings: Nordstrom Rack's Journey ...
 
Apply Knowledge Graphs and Search for Real-World Decision Intelligence
Apply Knowledge Graphs and Search for Real-World Decision IntelligenceApply Knowledge Graphs and Search for Real-World Decision Intelligence
Apply Knowledge Graphs and Search for Real-World Decision Intelligence
 
Webinar: Building a Business Case for Enterprise Search
Webinar: Building a Business Case for Enterprise SearchWebinar: Building a Business Case for Enterprise Search
Webinar: Building a Business Case for Enterprise Search
 
Why Insight Engines Matter in 2020 and Beyond
Why Insight Engines Matter in 2020 and BeyondWhy Insight Engines Matter in 2020 and Beyond
Why Insight Engines Matter in 2020 and Beyond
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

“N1QL” a Rich Query Language for Couchbase: Presented by Don Pinto, Couchbase

  • 1.
  • 2. “N1QL” A Rich Query Language For Couchbase Don Pinto Sr. Product Manager, Couchbase
  • 3. Agenda • Rich data • Compare relational and N1QL data model • Mission • Resources • Q&A • Demo
  • 5. Couchbase Server General purpose The Most complete, scalable & highest performing NoSQL database Elas-c scalability Consistent high performance Always available Flexible, global deployment Enterprise grade administra-on Real -me big data Data mobility Developer focused
  • 6. Couchbase Server Couchbase offers a full range of Data Management solu5ons High Availability Cache Key Value Document Mobile device SSN: 400 658 9993 Pass: ******
  • 7. A Basic Data Model § Tables, schemas, constraints § Prevailing model for 30+ years
  • 8. A Rich Data Model 8 Person Name DOB Billing Connec5ons Purchases Jane Smith Product Jan-­‐30-­‐1990 § Structure and richness of real-world data § Drivers: Big Data, agility § Enabler: JSON — convenient, standard
  • 9. 9 Basic Data Model Rich Data Model Technology q Rela-onal v Document Building blocks § Flat tables ü Rich objects Developer impact § Real world must be translated § Objects must be assembled § Data must be uniform § Change must be an excep-on ü Real world can be reflected ü Objects can be represented ü Data can be uniform or varied ü Change can be a norm Query language q SQL v N1QL — SQL and more Comparing the data models
  • 10. 10 SQL: Expressive Power JSON: Rich Data N1NF N1QL: Query Language for Rich Data Defining N1QL
  • 11. 11 What does N1QL achieve? Ø Joy for Developers § Freedom, flexibility, alignment, produc-vity § Best of both — SQL and rich data Ø Power for Big Data Applica5ons § Ability to index and query rich data at scale § Power of Couchbase extended to querying Ø Value for Customers § Query technology for a new era § Enabler for applica-ons of the future
  • 12. 12 Reading Data SELECT Projec-on DISTINCT De-­‐duplica-on FROM Sourcing JOIN INNER, LEFT OUTER WHERE Filtering GROUP BY Aggrega-on — HAVING, MIN, MAX, SUM, AVG, COUNT [ DISTINCT ] ORDER BY Sor-ng LIMIT, OFFSET Paging UNION*, INTERSECT*, EXCEPT* Set operators EXPLAIN Analyzing and tuning query execu-on plans N1QL Features - Reads *Upcoming
  • 13. 13 N1QL Features - Writes Wri5ng Data CREATE INDEX Create a Couchbase view index or secondary index* DROP INDEX Drop an index INSERT* INSERT using VALUES or SELECT UPDATE* UPDATE…WHERE, with document-­‐level atomicity DELETE* DELETE FROM…WHERE, with document-­‐level atomicity MERGE* MERGE with INSERT or UPDATE, depending on match *Upcoming
  • 14. 14 N1QL Features - Expressions Expressions Literals Primi-ves [ 0, ‘hello’, TRUE ] NULL Operators Arithme-c [ +, -­‐, *, /, % ] Logical [ AND, OR, NOT ] Comparison [ <, <=, =, !=, >=, >, BETWEEN, IS NULL ] Papern matching [ LIKE ] Condi-onal [ CASE ] Scalar func-ons Numeric [ trigonometric, ROUND, TRUNC, … ] String [ UPPER, LOWER, TRIM, SUBSTR, … ] Date [ string and numeric dates, NOW, date arithme-c*, … ] Aggregate func-ons MIN, MAX, SUM, AVG, COUNT [ DISTINCT ] Subqueries* Subqueries are full expressions *Upcoming
  • 15. 15 Nested Data Mul--­‐valued apributes Arrays as apributes Nested objects Mul--­‐level nes-ng of objects; path naviga-on NEST Collec-ng second term into nested array [ INNER, LEFT OUTER ] UNNEST Flapening nested array [ INNER, LEFT OUTER ] Collec-on operators Mapping, filtering, predicate, indexing, and slicing operators Collec-on func-ons Sort, Reverse, Dis-nct, Append, Concatenate, Contains… Collec-on aggrega-on* MIN, MAX, SUM, AVG, COUNT [ DISTINCT ] Deep traversal* Finding or collec-ng of matching elements WITHIN any depth Array and deep update* UPDATE of matching elements IN arrays and WITHIN any depth Construc-on Dynamic construc-on of objects, arrays, and their combina-ons *Upcoming Rich Data Features - Nesting
  • 16. Features for Rich Data — Heterogeneity Heterogeneous Data Heterogeneous inputs Input data of varying structure and type Heterogeneous results Results of varying structure and type Raw projec-on Support for non-­‐tuple, non-­‐object results Schema inference* Inference of result structure and types, based on result expressions Missing apributes IS [ NOT ] MISSING and other operators and func-ons Apribute removal* UPDATE…UNSET to remove apributes Total ordering* Comparison and ordering for all values, across all types Implicit types* § Type-­‐encoding func-ons + expression indexes* § For example, range scans on dates Closure JSON in, JSON out 16 *Upcoming
  • 17. 17 Features for Distributed Data Distributed Data Key-­‐value access § KEYS available in SELECT, UPDATE, DELETE § KEYS used in JOIN, NEST, subqueries*, MERGE* Document metadata § META func-on to access ID, TTL, CAS, FLAGS… LIMIT on UPDATE & DELETE* § LIMIT available in write statements *Upcoming
  • 18. 18 Resources Ø query.couchbase.com § Downloads § Tutorial § Documenta-on § Blogs § Webinars § Forum Ø @N1QL § Follow us § Engage
  • 19.
  • 20. Thank you! @NoSQLDon | don@couchbase.com