29
NoSQL Advanced Query Languages Using specialization and standards to drive NoSQL database selection Host: Dan McCreary, Kelly-McCreary & Associates Guest: Matthias Brantner, 28msec

NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Embed Size (px)

Citation preview

Page 1: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

NoSQL Advanced Query Languages

Using specialization and standards to drive NoSQL database selection

Host: Dan McCreary, Kelly-McCreary & Associates

Guest: Matthias Brantner, 28msec

Page 2: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

2Kelly-McCreary & Associates

Reminder

• Registration is open!

• Preview of many of the topics being discussed at the

conference

• Link: http://nosqlnow.com/

Page 3: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

3Kelly-McCreary & Associates

Summary

This webinar will cover the latest trends in advanced query languages

for NoSQL databases. We’ll look at how innovations in vendor-

independent standardized query languages allow NoSQL developers to

query multiple types of data and multiple NoSQL databases using a

single query language. We’ll see how using the right NoSQL query

language promotes portability across multiple NoSQL databases, avoids

vendor lock-in, and keeps your developers productive at the same

time. We will be interviewing Matthias Brantner from 28msec and see

on how they use JSONiq as a basis for a modern ETL framework that

works on a diverse number of data sources.

Page 4: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

4Kelly-McCreary & Associates

About Us

• Working with NoSQL since 2006

• Co-founders of the NoSQL Now! conference

• Authors of Manning book on NoSQL (MEAP now, print June

2013)

• Guide for managers with a focus on business benefits

• Focus on NoSQL architectural tradeoff analysis

• Published a variety of research papers on the general topics of

query processing and optimization

• Expert on XML and JSON query languages

• Studied Information Systems at the University of Mannheim and

acquired a PhD based on his research on "Rewriting Declarative

Query Language"

• Has more than 15 years of experience in database and query

technologies

Page 5: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

High Level NoSQL Patterns

Relational Analytical (OLAP) Key-Value

Column-Family DocumentGraph

key value

key value

key value

key value

5

Page 6: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Query Languages

Relational: SQL

Analytical: MDX (Cubes, Categories, Measures)

key value

key value

key value

key value

Key Value Store: None (PUT, GET, DELETE)

Column Family: HIVE, PIG

Graph: SPARQL, proprietary

Document: XQuery, JSONiq

Page 7: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Distributed Computing = Distributed Queries

Traditional: Send data between nodes for "distributed joins"

NoSQL: Send queries to each node

CPU

Disk

Query

Node

CPU

Disk

CPU

Disk

CPU

Disk

CPU

Disk

Query

Response

Data

Nodes

Page 8: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Do we need 75 APIs?

"If we have 75 NoSQL databases with 75

different APIs the NoSQL movement will

never become mainstream."

Michael Stonebreaker

http://cacm.acm.org/blogs/blog-cacm/99512-why-enterprises-are-uninterested-in-nosql/fulltext

http://hpts.ws/papers/2011/sessions_2011/Stonebraker.pdf

8

Page 9: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

SQL is a Platform

App1 App2 App3

RDBMS1 RDBMS2 RDBMS3

SQL ODBC, JDBC

Third Party

Applications

9

Page 10: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

NoSQL is Not Yet a Platform

App1 App2 App3

NoSQL1 NoSQL2 NoSQL3

?

Third Party

Applications

Can NoSQL have a standard

API or query language?

1

0

Page 11: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

11Kelly-McCreary & Associates

Types of Data

Read Mostly

Read/Write

StructuredUnstructured

Transactional

RDBMS BI/DWWeb Crawlers

Documents

Log Files

XML

JSON

Binary

Open Linked Data

Graph

Page 12: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

12Kelly-McCreary & Associates

Diverse Needs of Databases

• Security and RBAC

• Transaction Control

• Analysis - Aggregates

• Search and Findability – XQuery fulltext, Lucene

• Spatial Queries

• Control over Clusters and Remote Data Centers• fast vs. reliable for both reads and writes

• Consistency vs. Availability

Page 13: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

13Kelly-McCreary & Associates

Metcalf's Law and Standards

• Standards lower IT

costs

• Standard tools

• Standard libraries

• Standard training

XML

RSS

XForms

REST

Page 14: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Many Interfaces or One?

14

DB4

DB1

DB2

DB3DB5

DB6

Db7

App

DB1

DB2

DB3

DB4

DB5

DB6

DB7

Std

App

Send Data to Nodes or Queries to Nodes?

Page 15: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

15Kelly-McCreary & Associates

Standards Drive Lower Costs

• Consistent data formats

• Standardize with public data

• Example: postal code address standards

• Open linked data

• Data consistency

• Social network verifiability

• Standardized tools

• Standardize rules

• XML Schema

Page 16: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

16Kelly-McCreary & Associates

Service Insulation

• Services separate applications from databases

Corporate Data Services

App1 App2 App3

NoSQL1 NoSQL2 NoSQL3

Page 17: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

17Kelly-McCreary & Associates

Adaptors Are Inevitable!

• One library runs on may browsers – don't use proprietary APIs!

HTML

Page 1

HTML

Page 2

HTML

Page 3

Page 18: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

18Kelly-McCreary & Associates

De facto Standards

• Some interfaces achieve a dominant position by public

acceptance or market forces (such as early entrance to the

market).

• Example: Amazon S3

http://en.wikipedia.org/wiki/De_facto_standard

Page 19: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

19Kelly-McCreary & Associates

Standard for Key-Value Stores

• Note: APIs are simple but security models are non-trivial

App1 App2

S3 API (PUT, GET, DELETE)

S3 Security Models

App3

Page 20: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

20Kelly-McCreary & Associates

Challenges with Adaptors

• Added complexity

• Debugging

• Match of semantics

• Performance concerns

• Added level of indirection

• Native interfaces are always faster

• Training

• What standard can you use?

• Security

• Variety of security models for data access

Page 21: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

21Kelly-McCreary & Associates

One Language for All

http://xsparql.deri.org/

SQLXQuery/JSONiq

Graph

XSPARQLKey-Value

Library

Page 22: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

22Kelly-McCreary & Associates

One Database, Many Interfaces

ODBC, JDBC

SPARQL

Document

Store

Triple

Store

TablesKey Value

Store

Future DB

get, put

XQuery

JSONiq

Page 23: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Standards/Diversity Leadership

Standards

Diversity

SQL

NoSQL

ideal

world

23

Page 24: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Many Types of Data

Page 25: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

Goal: One Language

Page 26: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

JSONiq

Page 27: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

27Kelly-McCreary & Associates

Summary

1. NoSQL solutions use many diverse data formats from simple key-

value pairs to complex documents

2. NoSQL today has limited third party developers and limited use by

large companies due to concerns about application portability

3. New "common query languages" like JSONiq can handle multiple

sources in a single robust query language

4. Find out more at the NoSQL Now! conference

Page 28: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

28Kelly-McCreary & Associates

See Matthias In Person!

Do More with MongoDB and JSONiq

Matthias Brantner CTO 28msec, Inc.

http://nosql2013.dataversity.net/sessionPop.cfm?confid=7

4&proposalid=5522

• Link: http://nosqlnow.com/

Page 29: NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages

29Kelly-McCreary & Associates

References

• JSONiq Language Specification: http://jsoniq.org

• Demo queries used during the webinar: http://28.io/demo

• Free JSONiq book: http://www.28.io/jsoniq-the-sql-of-nosql/

• 28msec Twitter: http://twitter.com/28msec

• 28msec Blog: http://28.io/blog

• Full Text Search Specs: http://www.w3.org/TR/xpath-full-

text-10/