JSONiq - The SQL of NoSQL
-
Upload
william-candillon -
Category
Documents
-
view
3.736 -
download
1
description
Transcript of JSONiq - The SQL of NoSQL
JSONiq - The SQL of NoSQLWilliam Candillon {[email protected]}
msec
Two Drivers
Scalability
Flexible Data
NoSQL Checklist 28
Document Stores
High Availability ✔
NoSQL Checklist 28
Document Stores
High Availability ✔Sharding ✔
NoSQL Checklist 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔
NoSQL Checklist 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language
NoSQL Checklist 28
Standardization (1) 28
Standardization (2) 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
NoSQL Checklist 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing
NoSQL Checklist 28
Modern Query Processing (2) 28
Modern Query Processing (1) 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
NoSQL Checklist 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
Rich Data Model
NoSQL Checklist 28
Rich Data Model (1) 28
Rich Data Model (2) 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
Rich Data Model X
NoSQL Checklist 28
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
Rich Data Model X
ScalabilityFlexible D
ataNoSQL Checklist 28
The SQL of NoSQL
JSONiq (1) 28
Extension of XQuery, a mature W3C standard, with native JSON support
Contributors: 28msec, Oracle, EMC
Declarative JSON Query LanguageFully Composable
JSONiq (2) 28
Updates, Indexes, Search, Transform & Filter, Join, Group, and more
Open Source Implementation: Zorba
Drivers: MongoDB, CouchDB, AmazonDB, SQLite, Oracle NoSQL
{ "question_id" : 42, "title" : "NoSQL: Help me to choose", "tags" : [ "mongodb", "couchdb" ], "answered" : true, }
let $question :={ "question_id" : 42, "title" : "NoSQL: Help me to choose", "tags" : [ "mongodb", "couchdb" ], "answered" : true, }return $question("title")
for $answers in mongo:find("answers")group by $id := $answers("question_id")order by count($answers) descendinglet $faq := mongo:find("faq")return <h1>{ $faq[.("id") eq $id]("title") }</h1>
<h1>NoSQL: Help me to Choose</h1><h1>What NoSQL solutions for .NET?</h1><h1>The Next-gen Databases</h1>...
for $question in mongo:find("faq")let $user := $question("owner")group by $user := $user("user_id")return { "user" : $user[last()]("display_name"), "count" : count($question)}
{ "user": "jbellis", "count": 6 }{ "user": "user1557698", "count": 5 }{ "user": "nawroth", "count": 5 }...
max( for tumbling window $answers in mongo:find("answers") start $start when true only end $end next $next when $next("date") - $end("date") gt xs:dayTimeDuration("P1D") return $end("date") - $start("date"))
{ "user": "jbellis", "streak": 2 }{ "user": "user1557698", "streak": 1 }{ "user": "nawroth", "streak": 1 }...
"Luke, I am your father"contains text "dad"
false
"Luke, I am your father"contains text "dad"using thesaurus default
true
let $s := "These are not the droids you are looking for"let $tokens := ft:tokenize-string($s)for $token in $tokenswhere not(ft:is-stop-word($token))return ft:stem($token)
droid look...
MongoDB Driver
Runtime CollectionsXDM Indexes
MongoS CollectionsBSON Indexes
Zorba
MongoDB
28
28.io
• Seamless JSONiq Integration into MongoDB
• Automatic Scale out of the Query Processing
Runtime CollectionsXDM Indexes
MongoS CollectionsBSON Indexes
Zorba
MongoDB
28
28.io 28
Put the Pressure back to the Query Language
Take Away
• JSONiq.org - The SQL of NoSQL
• Open Source Implementation: Zorba
• Next Stop: Automatic Index Detection Query Parallelization
• Hosting: 28.io
• Demo: http://28.io/mongodb
28
Thank You!Questions?
msec