Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MySQL 8.0 Document Store - how to mix NoSQL & SQL in MySQL 8.0

199 views

Published on

FOSDEM MySQL Devroom presentation Feb 2nd 2019: MySQL 8.0 Document Store: the perfect match for both NoSQL & SQL.

  • Be the first to comment

MySQL 8.0 Document Store - how to mix NoSQL & SQL in MySQL 8.0

  1. 1. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 1/70 1 / 70
  2. 2. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 2/70 2 / 702 / 702 / 70
  3. 3. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 3/70 MyMySQLSQL 8.0 Document Store8.0 Document Store How to Mix NoSQL & SQL inHow to Mix NoSQL & SQL in MyMySQLSQL 8.08.0             Frédéric Descamps - MySQL Community Manager - OracleOracle 3 / 70
  4. 4. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 4/70   Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product remains at the sole discretion of Oracle. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 4 / 70
  5. 5. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 5/70 about me - http://about.me/lefred Who am I ?Who am I ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 5 / 70
  6. 6. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 6/70 Frédéric Descamps @lefred MySQL Evangelist Hacking MySQL since 3.23 devops believer living in Belgium 🇧🇪 http://lefred.be   Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 6 / 70
  7. 7. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 7/70 Why ? Developers don't really like SQLSQL   Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 7 / 70
  8. 8. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 8/70 Why ? SQL can be complicated and slows down the initial development Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 8 / 70
  9. 9. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 9/70 easy operations What do developers want ?What do developers want ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 9 / 70
  10. 10. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 10/70 Use Objects / Documents Developers want to just use objects (that's why they usually love what DBAs hates: ORMs !). Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 10 / 70
  11. 11. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 11/70 Use Objects / Documents Developers want to just use objects (that's why they usually love what DBAs hates: ORMs !). They want to deal with these objects easily (CRUD operations) and they don't want to think about schema design (slows down the initial development process). Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 11 / 70
  12. 12. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 12/70 Use Objects / Documents Developers want to just use objects (that's why they usually love what DBAs hates: ORMs !). They want to deal with these objects easily (CRUD operations) and they don't want to think about schema design (slows down the initial development process). But they also want to keep their data safe and use transactions. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 12 / 70
  13. 13. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 13/70 ready for some fun? Let's start !Let's start ! Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 13 / 70
  14. 14. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 14/70 Migration from MongoDB to MySQL DS For this example, I will use the well known collection: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 14 / 70
  15. 15. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 15/70 Migration from MongoDB to MySQL DS For this example, I will use the well known collection: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 15 / 70
  16. 16. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 16/70 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 16 / 70
  17. 17. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 17/70 Let's query Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 17 / 70
  18. 18. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 18/70 Let's query That's too much records to show it here... let's limit it Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 18 / 70
  19. 19. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 19/70 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 19 / 70
  20. 20. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 20/70 Some more examples Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 20 / 70
  21. 21. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 21/70 Some more examples Let's add a selection criteria: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 21 / 70
  22. 22. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 22/70 Using IN... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 22 / 70
  23. 23. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 23/70 And for developers ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 23 / 70
  24. 24. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 24/70 And for developers ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 24 / 70
  25. 25. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 25/70 And for developers ?   Easy, using only CRUD operations ! Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 25 / 70
  26. 26. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 26/70 MySQL Document Store Objects Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 26 / 70
  27. 27. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 27/70 CRUD operations Add Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 27 / 70
  28. 28. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 28/70 CRUD operations Add Remove Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 28 / 70
  29. 29. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 29/70 CRUD operations Modify Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 29 / 70
  30. 30. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 30/70 All you need to know is here: https://dev.mysql.com/doc/x-devapi- userguide/en/crud-operations-overview.html Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 30 / 70
  31. 31. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 31/70 we do care about your data MyMySQLSQL Document StoreDocument Store is Full ACIDis Full ACID CompliantCompliant Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 31 / 70
  32. 32. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 32/70 Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 32 / 70
  33. 33. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 33/70 Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 33 / 70
  34. 34. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 34/70 Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 34 / 70
  35. 35. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 35/70 Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 35 / 70
  36. 36. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 36/70 Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 36 / 70
  37. 37. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 37/70 Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: We do care about your data ! Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 37 / 70
  38. 38. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 38/70 MySQL DS - ACID Transactions support Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 38 / 70
  39. 39. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 39/70 MySQL DS - ACID Transactions support Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 39 / 70
  40. 40. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 40/70 OK we have Document Store, CRUD and ACID but what makesbut what makes MyMySQLSQL DocumentDocument StoreStore unique ?unique ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 40 / 70
  41. 41. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 41/70 Challenge: list the best restaurant of each type of food and show the top 10, with the best one first !   don't forget that all these restaurants are just JSON documents Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 41 / 70
  42. 42. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 42/70 NoSQL as SQL - aggregation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 42 / 70
  43. 43. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 43/70 NoSQL as SQL - aggregation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 43 / 70
  44. 44. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 44/70 NoSQL as SQL - aggregation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 44 / 70
  45. 45. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 45/70 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 45 / 70
  46. 46. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 46/70 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 46 / 70
  47. 47. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 47/70 Virtual Columns, Indexes, ... And for the DBA ?And for the DBA ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 47 / 70
  48. 48. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 48/70 DS for DBAs: JSON The DBAs can benefit from all JSON functions and capabilities. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 48 / 70
  49. 49. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 49/70 DS for DBAs: JSON The DBAs can benefit from all JSON functions and capabilities. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 49 / 70
  50. 50. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 50/70 DS for DBAs: JSON The DBAs can benefit from all JSON functions and capabilities. same as: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 50 / 70
  51. 51. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 51/70 DS for DBAs: JSON The DBAs can benefit from all JSON functions and capabilities. same as: we can use it in SQL: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 51 / 70
  52. 52. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 52/70 SQL and JSON: validation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 52 / 70
  53. 53. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 53/70 SQL and JSON: validation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 53 / 70
  54. 54. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 54/70 SQL and JSON: validation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 54 / 70
  55. 55. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 55/70 SQL & JSON But what for ?But what for ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 55 / 70
  56. 56. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 56/70 Example Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 56 / 70
  57. 57. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 57/70 Example (2) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 57 / 70
  58. 58. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 58/70 Example (3) - Index Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 58 / 70
  59. 59. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 59/70 Example (4) - Index Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 59 / 70
  60. 60. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 60/70 Indexes in Document Store It's also possible to create indexes without using SQL syntax: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 60 / 70
  61. 61. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 61/70 Indexes in Document Store It's also possible to create indexes without using SQL syntax: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 61 / 70
  62. 62. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 62/70 Example (5): arrays Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 62 / 70
  63. 63. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 63/70 Example (5): arrays Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 63 / 70
  64. 64. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 64/70 Example (5): arrays Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 64 / 70
  65. 65. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 65/70 Example (5): arrays Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 65 / 70
  66. 66. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 66/70 Example (5): JSON_TABLE Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 66 / 70
  67. 67. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 67/70 what do I gain ? ConclusionConclusion Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 67 / 70
  68. 68. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 68/70 schemaless flexible data structure easy to start (CRUD) Conclusion This is the best of the two worlds in one product ! Data integrity ACID Compliant Transactions SQL Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 68 / 70
  69. 69. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 69/70 69 / 70
  70. 70. 2/6/2019 FOSDEM MySQL, MariaDB & Friends Devroom: MySQL 8.0 Document Store - How to Mix NoSQL & SQL in MySQL 8.0 file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%208.0%20Document%20Store/pres.html#1 70/70 Thank you ! Any Questions ? share your 💕 for MySQL on social media using Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 70 / 70

×