JSONiq - The SQL of NoSQL

4,640 views
4,404 views

Published on

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.

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,640
On SlideShare
0
From Embeds
0
Number of Embeds
150
Actions
Shares
0
Downloads
57
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

JSONiq - The SQL of NoSQL

  1. 1. JSONiq - The SQL of NoSQLmsec William Candillon {wcandillon@28.io}
  2. 2. Two Drivers
  3. 3. Scalability
  4. 4. Flexible Data
  5. 5. NoSQL Checklist 28
  6. 6. NoSQL Checklist 28 Document StoresHigh Availability ✔
  7. 7. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔
  8. 8. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔
  9. 9. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language
  10. 10. Standardization (1) 28
  11. 11. Standardization (2) 28
  12. 12. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language X
  13. 13. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language XModern Query Processing
  14. 14. Modern Query Processing (2) 28
  15. 15. Modern Query Processing (1) 28
  16. 16. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language XModern Query Processing X
  17. 17. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language XModern Query Processing XRich Data Model
  18. 18. Rich Data Model (1) 28
  19. 19. Rich Data Model (2) 28
  20. 20. NoSQL Checklist 28 Document StoresHigh Availability ✔Sharding ✔Available as a Service ✔Standardized Query Language XModern Query Processing XRich Data Model X
  21. 21. NoSQL Checklist 28 Document StoresHigh Availability ✔ ScalabilitySharding ✔Available as a Service ✔Standardized Query Language X Flexible DataModern Query Processing XRich Data Model X
  22. 22. The SQL of NoSQL
  23. 23. JSONiq (1) 28 Declarative JSON Query Language Fully ComposableExtension of XQuery, a mature W3C standard, with native JSON support Contributors: 28msec, Oracle, EMC
  24. 24. JSONiq (2) 28 Updates, Indexes, Search, Transform & Filter, Join, Group, and more Open Source Implementation: Zorba Drivers: MongoDB, CouchDB, AmazonDB, SQLite, Oracle NoSQL
  25. 25. { "question_id" : 42, "title" : "NoSQL: Help me to choose", "tags" : [ "mongodb", "couchdb" ], "answered" : true,}
  26. 26. let $question :={ "question_id" : 42, "title" : "NoSQL: Help me to choose", "tags" : [ "mongodb", "couchdb" ], "answered" : true,}return $question("title")
  27. 27. 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>...
  28. 28. 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 }...
  29. 29. 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 }...
  30. 30. "Luke, I am your father" contains text "dad"false
  31. 31. "Luke, I am your father" contains text "dad" using thesaurus defaulttrue
  32. 32. let $s := "These are not the droids you are looking for" let $tokens := ft:tokenize-string($s) for $token in $tokens where not(ft:is-stop-word($token)) return ft:stem($token)droid look...
  33. 33. MongoDB Driver 28 Zorba Runtime XDM Collections IndexesMongoDB MongoS BSON Collections Indexes
  34. 34. 28.io 28• Seamless JSONiq Integration into MongoDB• Automatic Scale out of the Query Processing Zorba Runtime XDM Collections IndexesMongoDB MongoS BSON Collections Indexes
  35. 35. 28.io 28
  36. 36. Put the Pressure back to the Query Language
  37. 37. Take Away 28• 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
  38. 38. Thank You!msec Questions?

×