jsoniq - the sql of nosql
DESCRIPTION
Since a couple of years, the NoSQL movement has developed a variety of open-source document stores. They are focused on high availability, horizontal scalability, and are designed to run on commodity hardware. These products have gained great traction in the industry to store large amounts of flexible data. Arguably, the next step for the NoSQL community is on harnessing flexible data processing. The aim of this presentation is to introduce JSONiq: the SQL of NoSQL.TRANSCRIPT
![Page 2: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/2.jpg)
Two Drivers
![Page 3: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/3.jpg)
Scalability
![Page 4: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/4.jpg)
Flexible Data
![Page 5: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/5.jpg)
NoSQL Checklist 28
![Page 6: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/6.jpg)
Document Stores
High Availability ✔
NoSQL Checklist 28
![Page 7: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/7.jpg)
Document Stores
High Availability ✔Sharding ✔
NoSQL Checklist 28
![Page 8: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/8.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔
NoSQL Checklist 28
![Page 9: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/9.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language
NoSQL Checklist 28
![Page 10: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/10.jpg)
Standardization (1) 28
![Page 11: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/11.jpg)
Standardization (2) 28
![Page 12: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/12.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
NoSQL Checklist 28
![Page 13: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/13.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing
NoSQL Checklist 28
![Page 14: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/14.jpg)
Modern Query Processing (2) 28
![Page 15: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/15.jpg)
Modern Query Processing (1) 28
![Page 16: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/16.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
NoSQL Checklist 28
![Page 17: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/17.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
Rich Data Model
NoSQL Checklist 28
![Page 18: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/18.jpg)
Rich Data Model (1) 28
![Page 19: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/19.jpg)
Rich Data Model (2) 28
![Page 20: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/20.jpg)
Document Stores
High Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
Modern Query Processing X
Rich Data Model X
NoSQL Checklist 28
![Page 21: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/21.jpg)
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
![Page 22: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/22.jpg)
The SQL of NoSQL
![Page 23: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/23.jpg)
JSONiq (1) 28
Extension of XQuery, a mature W3C standard, with native JSON support
Contributors: 28msec, Oracle, EMC
Declarative JSON Query LanguageFully Composable
![Page 24: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/24.jpg)
JSONiq (2) 28
Updates, Indexes, Search, Transform & Filter, Join, Group, and more
Open Source Implementation: Zorba
Drivers: MongoDB, CouchDB, AmazonDB, SQLite, Oracle NoSQL
![Page 25: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/25.jpg)
{ "question_id" : 42, "title" : "NoSQL: Help me to choose", "tags" : [ "mongodb", "couchdb" ], "answered" : true, }
![Page 26: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/26.jpg)
let $question :={ "question_id" : 42, "title" : "NoSQL: Help me to choose", "tags" : [ "mongodb", "couchdb" ], "answered" : true, }return $question("title")
![Page 27: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/27.jpg)
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>...
![Page 28: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/28.jpg)
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 }...
![Page 29: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/29.jpg)
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 }...
![Page 30: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/30.jpg)
"Luke, I am your father"contains text "dad"
false
![Page 31: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/31.jpg)
"Luke, I am your father"contains text "dad"using thesaurus default
true
![Page 32: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/32.jpg)
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...
![Page 33: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/33.jpg)
MongoDB Driver
Runtime CollectionsXDM Indexes
MongoS CollectionsBSON Indexes
Zorba
MongoDB
28
![Page 34: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/34.jpg)
28.io
• Seamless JSONiq Integration into MongoDB
• Automatic Scale out of the Query Processing
Runtime CollectionsXDM Indexes
MongoS CollectionsBSON Indexes
Zorba
MongoDB
28
![Page 35: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/35.jpg)
28.io 28
![Page 36: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/36.jpg)
Put the Pressure back to the Query Language
![Page 37: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/37.jpg)
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
![Page 38: JSONiq - The SQL of NoSQL](https://reader034.vdocuments.mx/reader034/viewer/2022052321/55512b50b4c905f1528b4c4f/html5/thumbnails/38.jpg)
Thank You!Questions?
msec