1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define...
Transcript of 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define...
![Page 1: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/1.jpg)
1 / 112
![Page 2: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/2.jpg)
2 / 112
![Page 3: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/3.jpg)
MySQL 8.0
a Document Store with all the benefits of a transactional RDBMS
3 / 112
![Page 4: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/4.jpg)
Safe Harbor StatementThe following is intended to outline our general product direction. It is intended for information purpose only, and may notbe incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not berelied up in making purchasing decisions. The development, release and timing of any features or functionality describedfor Oracle´s product remains at the sole discretion of Oracle.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
4 / 112
![Page 5: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/5.jpg)
about me
Who am I ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
5 / 112
![Page 6: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/6.jpg)
Frédéric Descamps@lefredMySQL EvangelistHacking MySQL since 3.23devops believerliving in Belgium 🇧🇪http://lefred.be
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
6 / 112
![Page 7: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/7.jpg)
RDBMS & MySQL
Relational Databases
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
7 / 112
![Page 8: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/8.jpg)
Relational DatabasesData Integrity
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
8 / 112
![Page 9: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/9.jpg)
Relational DatabasesData Integrity
normalization
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
9 / 112
![Page 10: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/10.jpg)
Relational DatabasesData Integrity
normalizationconstraints (foreign keys, ...)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
10 / 112
![Page 11: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/11.jpg)
Relational DatabasesData Integrity
normalizationconstraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
11 / 112
![Page 12: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/12.jpg)
Relational DatabasesData Integrity
normalizationconstraints (foreign keys, ...)
Atomicity, Consistency, Isolation, DurabilityACID compliant
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
12 / 112
![Page 13: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/13.jpg)
Relational DatabasesData Integrity
normalizationconstraints (foreign keys, ...)
Atomicity, Consistency, Isolation, DurabilityACID complianttransactions
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
13 / 112
![Page 14: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/14.jpg)
Relational DatabasesData Integrity
normalizationconstraints (foreign keys, ...)
Atomicity, Consistency, Isolation, DurabilityACID complianttransactions
SQL
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
14 / 112
![Page 15: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/15.jpg)
Relational DatabasesData Integrity
normalizationconstraints (foreign keys, ...)
Atomicity, Consistency, Isolation, DurabilityACID complianttransactions
SQLpowerfull query language
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
15 / 112
![Page 16: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/16.jpg)
NoSQL & MySQL
NoSQL Databases
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
16 / 112
![Page 17: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/17.jpg)
NoSQL or Document StoreSchemaless
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
17 / 112
![Page 18: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/18.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
18 / 112
![Page 19: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/19.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
19 / 112
![Page 20: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/20.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structure
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
20 / 112
![Page 21: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/21.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objects
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
21 / 112
![Page 22: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/22.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objectsvalid solution when natural data can´t be modelized optimaly into a relational model
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
22 / 112
![Page 23: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/23.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objectsvalid solution when natural data can´t be modelized optimaly into a relational modelobjects persistance without the use of any ORM - mapping oobject-oriented
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
23 / 112
![Page 24: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/24.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objectsvalid solution when natural data can´t be modelized optimaly into a relational modelobjects persistance without the use of any ORM - mapping oobject-oriented
JSON
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
24 / 112
![Page 25: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/25.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objectsvalid solution when natural data can´t be modelized optimaly into a relational modelobjects persistance without the use of any ORM - mapping oobject-oriented
JSONclose to frontend
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
25 / 112
![Page 26: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/26.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objectsvalid solution when natural data can´t be modelized optimaly into a relational modelobjects persistance without the use of any ORM - mapping oobject-oriented
JSONclose to frontendnative in JS
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
26 / 112
![Page 27: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/27.jpg)
NoSQL or Document StoreSchemaless
no schema design, no normalization, no foreign keys, no data types, ...very quick initial development
Flexible data structureembedded arrays or objectsvalid solution when natural data can´t be modelized optimaly into a relational modelobjects persistance without the use of any ORM - mapping oobject-oriented
JSONclose to frontendnative in JSeasy to learn
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
27 / 112
![Page 28: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/28.jpg)
How DBAs see data
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
28 / 112
![Page 29: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/29.jpg)
How DBAs see data How Developers see data{ "GNP" : 249704, "Name" : "Belgium", "government" : { "GovernmentForm" : "Constitutional Monarchy, Federation", "HeadOfState" : "Philippe I" }, "_id" : "BEL", "IndepYear" : 1830, "demographics" : { "Population" : 10239000, "LifeExpectancy" : 77.8000030517578 }, "geography" : { "Region" : "Western Europe", "SurfaceArea" : 30518, "Continent" : "Europe" }}
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
29 / 112
![Page 30: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/30.jpg)
What if there was a way to provide both SQL and NoSQL on onestable platform that has proven stability on well know
technology with a large Community and a diverse ecosystem ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
30 / 112
![Page 31: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/31.jpg)
DMBS or NoSQL ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
31 / 112
![Page 32: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/32.jpg)
DMBS or NoSQL ?
Why not both ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
32 / 112
![Page 33: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/33.jpg)
The MySQL Document Store !
SQL is now optional !
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
33 / 112
![Page 34: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/34.jpg)
Developers:
[x] schemaless[x] rapid prototying/simpler APIs[x] document model[x] transactions
Operations:
[x] performance management/visibility[x] robust replication, backup, restore[x] comprehensive tooling ecosystem[x] simpler application schema upgrades
Business Owner:
[x] don't lose my data == ACID trx[x] capture all my data = extensible/schemaless[x] product on schedule/time to market = rapiddevelopement
A solution for all
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
34 / 112
![Page 35: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/35.jpg)
MySQL Document Store
the Solution
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
35 / 112
![Page 36: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/36.jpg)
Built on theMySQL JSONData type andProven MySQLServerTechnology
Provides a schema flexible JSON Document StoreNo SQL requiredNo need to define all possible attributes, tables, etc.Uses new X DevAPICan leverage generated column to extract JSON values into materialized columnsthat can be indexed for fast SQL searches.Document can be ~1GB
It's a column in a row of a tableIt cannot exceed max_allowed_packet
Allows use of modern programming stylesNo more embedded strings of SQL in your codeEasy to read
Also works with relational TablesProven MySQL Technology
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
36 / 112
![Page 37: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/37.jpg)
X DevAPI Connectors forC++, Java, .Net, Node.js, Python, PHPworking with Communities to help them supporting it too
New MySQL ShellCommand CompletionPython, JavaScrips & SQL modesAdmin functionsNew Util objectA new high-level session concept that can scale from single MySQL Server toa multiple server environment
Non-blocking, asynchronous calls follow common language patternsSupports CRUD operations
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
37 / 112
![Page 38: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/38.jpg)
Starting using MySQL DS in few minutes
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
38 / 112
![Page 39: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/39.jpg)
MySQL Shell Info
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
39 / 112
![Page 40: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/40.jpg)
Migration from MongoDB to MySQL DSFor this example, I will use the well known restaurants collection:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
40 / 112
![Page 41: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/41.jpg)
Migration from MongoDB to MySQL DSFor this example, I will use the well known restaurants collection:
We need to dump the data to a file and we will use MySQL Shell with the Python interpreter to load the data.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
41 / 112
![Page 42: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/42.jpg)
Migration from MongoDB to MySQL DSFor this example, I will use the well known restaurants collection:
We need to dump the data to a file and we will use MySQL Shell with the Python interpreter to load the data.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
42 / 112
![Page 43: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/43.jpg)
Dump and load using MySQL Shell & Pythonthis example is inspired by @datacharmer's work: https://www.slideshare.net/datacharmer/mysql-documentstore
$ mongo --quiet --eval 'DBQuery.shellBatchSize=30000; db.restaurants.�nd().shellPrint()' \ | perl -pe 's/(?:ObjectId|ISODate)\(("[^"]+")\)/ $1/g' > all_recs.json
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
43 / 112
![Page 44: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/44.jpg)
Dump and load using MySQL Shell & Pythonthis example is inspired by @datacharmer's work: https://www.slideshare.net/datacharmer/mysql-documentstore
$ mongo --quiet --eval 'DBQuery.shellBatchSize=30000; db.restaurants.�nd().shellPrint()' \ | perl -pe 's/(?:ObjectId|ISODate)\(("[^"]+")\)/ $1/g' > all_recs.json
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
44 / 112
![Page 45: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/45.jpg)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
45 / 112
![Page 46: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/46.jpg)
Let´s query
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
46 / 112
![Page 47: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/47.jpg)
Let´s query
That´s too much records to show it here... let´s limit it
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
47 / 112
![Page 48: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/48.jpg)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
48 / 112
![Page 49: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/49.jpg)
Some more examples
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
49 / 112
![Page 50: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/50.jpg)
Some more examples
Let´s add a selection criteria:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
50 / 112
![Page 51: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/51.jpg)
Syntax slightly different than MongoDB
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
51 / 112
![Page 52: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/52.jpg)
Syntax slightly different than MongoDB
> db.restaurants.�nd({"cuisine": "French", "borough": { $not: /^Manhattan/} }, {"_id":0, "name": 1,"cuisine": 1, "borough": 1}).limit(2){ "borough" : "Queens", "cuisine" : "French",
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
52 / 112
![Page 53: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/53.jpg)
CRUD operations
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
53 / 112
![Page 54: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/54.jpg)
CRUD operations for collections
Add a document
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
54 / 112
![Page 55: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/55.jpg)
CRUD operations for collections
Modify a document
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
55 / 112
![Page 56: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/56.jpg)
CRUD operations for collections
Remove a document
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
56 / 112
![Page 57: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/57.jpg)
MySQL Document Store Objects Summary
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
57 / 112
![Page 58: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/58.jpg)
Document Store Full ACID !It relies on the proven MySQL InnoDB´s strength & robustness:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
58 / 112
![Page 59: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/59.jpg)
Document Store Full ACID !It relies on the proven MySQL InnoDB´s strength & robustness:
innodb_�ush_log_at_trx_commit = 1
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
59 / 112
![Page 60: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/60.jpg)
Document Store Full ACID !It relies on the proven MySQL InnoDB´s strength & robustness:
innodb_�ush_log_at_trx_commit = 1
innodb_doublewrite = ON
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
60 / 112
![Page 61: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/61.jpg)
Document Store Full ACID !It relies on the proven MySQL InnoDB´s strength & robustness:
innodb_�ush_log_at_trx_commit = 1
innodb_doublewrite = ON
sync_binlog = 1
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
61 / 112
![Page 62: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/62.jpg)
Document Store Full ACID !It relies on the proven MySQL InnoDB´s strength & robustness:
innodb_�ush_log_at_trx_commit = 1
innodb_doublewrite = ON
sync_binlog = 1
transaction_isolation = REPEATABLE-READ|READ-COMMITTED|...
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
62 / 112
![Page 63: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/63.jpg)
Document Store Full ACID !It relies on the proven MySQL InnoDB´s strength & robustness:
innodb_�ush_log_at_trx_commit = 1
innodb_doublewrite = ON
sync_binlog = 1
transaction_isolation = REPEATABLE-READ|READ-COMMITTED|...
We do care about your data !
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
63 / 112
![Page 64: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/64.jpg)
Document Store Full ACID !
MySQL Document Store supports transactions
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
64 / 112
![Page 65: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/65.jpg)
Document Store Full ACID !
MySQL Document Store supports transactions
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
65 / 112
![Page 66: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/66.jpg)
what about my old SQL ?
The hidden part of the iceberg
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
66 / 112
![Page 67: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/67.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
67 / 112
![Page 68: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/68.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
68 / 112
![Page 69: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/69.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4Conversion from "native" SQL types to JSON values
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
69 / 112
![Page 70: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/70.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4Conversion from "native" SQL types to JSON valuesJSON manipulation functions (JSON_EXTRACT, JSON_KEYS, JSON_SEARCH, JSON_TABLES, ...)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
70 / 112
![Page 71: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/71.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4Conversion from "native" SQL types to JSON valuesJSON manipulation functions (JSON_EXTRACT, JSON_KEYS, JSON_SEARCH, JSON_TABLES, ...)Generated/virtual columns
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
71 / 112
![Page 72: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/72.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4Conversion from "native" SQL types to JSON valuesJSON manipulation functions (JSON_EXTRACT, JSON_KEYS, JSON_SEARCH, JSON_TABLES, ...)Generated/virtual columns
Indexing JSON data
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
72 / 112
![Page 73: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/73.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4Conversion from "native" SQL types to JSON valuesJSON manipulation functions (JSON_EXTRACT, JSON_KEYS, JSON_SEARCH, JSON_TABLES, ...)Generated/virtual columns
Indexing JSON dataForeign Keys to JSON data
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
73 / 112
![Page 74: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/74.jpg)
JSON datatype is behind the scenenative datatype (since 5.7.8)JSON values are stored in MySQL tables using UTF8MB4Conversion from "native" SQL types to JSON valuesJSON manipulation functions (JSON_EXTRACT, JSON_KEYS, JSON_SEARCH, JSON_TABLES, ...)Generated/virtual columns
Indexing JSON dataForeign Keys to JSON dataSQL Views to JSON data
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
74 / 112
![Page 75: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/75.jpg)
How does the MySQL Document Store work ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
75 / 112
![Page 76: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/76.jpg)
What does a collection look like on the server ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
76 / 112
![Page 77: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/77.jpg)
_id Every document has a unique identifier called the document ID, which can be thoughtof as the equivalent of a table´s primary key. The document ID value can be manuallyassigned when adding a document. If no value is assigned, a document ID isgenerated and assigned to the document automatically !
Use getDocumentId() or getDocumentIds() to get _ids(s)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
77 / 112
![Page 78: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/78.jpg)
Mapping to SQL examplescreateCollection('mycollection')
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
78 / 112
![Page 79: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/79.jpg)
Mapping to SQL examplescreateCollection('mycollection')
CREATE TABLE `test`.`mycoll` ( doc JSON, _id VARCHAR(32) GENERATED ALWAYS AS (doc->>'$._id') STORED PRIMARY KEY ) CHARSET utf8mb4;
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
79 / 112
![Page 80: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/80.jpg)
Mapping to SQL examplescreateCollection('mycollection')
CREATE TABLE `test`.`mycoll` ( doc JSON, _id VARCHAR(32) GENERATED ALWAYS AS (doc->>'$._id') STORED PRIMARY KEY ) CHARSET utf8mb4;
mycollection.add({'test': 1234})
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
80 / 112
![Page 81: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/81.jpg)
Mapping to SQL examplescreateCollection('mycollection')
CREATE TABLE `test`.`mycoll` ( doc JSON, _id VARCHAR(32) GENERATED ALWAYS AS (doc->>'$._id') STORED PRIMARY KEY ) CHARSET utf8mb4;
mycollection.add({'test': 1234})
INSERT INTO `test`.`mycoll` (doc) VALUES ( JSON_OBJECT('_id','663807fe367ee6114e0e5458bdac28bf', 'test',1234) );
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
81 / 112
![Page 82: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/82.jpg)
Mapping to SQL examples (2)mycollection.find("test > 100")
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
82 / 112
![Page 83: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/83.jpg)
Mapping to SQL examples (2)mycollection.find("test > 100")
SELECT doc FROM `test`.`mycoll` WHERE (JSON_EXTRACT(doc,'$.test') > 100);
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
83 / 112
![Page 84: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/84.jpg)
SQL and JSON Example
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
84 / 112
![Page 85: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/85.jpg)
SQL and JSON Example
same as:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
85 / 112
![Page 86: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/86.jpg)
SQL and JSON Example
same as:
we can use it in SQL:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
86 / 112
![Page 87: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/87.jpg)
Indexes in Document StoreIt's also possible to create indexes without using SQL syntax:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
87 / 112
![Page 88: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/88.jpg)
Indexes in Document StoreIt's also possible to create indexes without using SQL syntax:
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
88 / 112
![Page 89: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/89.jpg)
SQL and JSON Example (2): validation
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
89 / 112
![Page 90: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/90.jpg)
SQL and JSON Example (2): validation
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
90 / 112
![Page 91: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/91.jpg)
SQL and JSON Example (2): validation
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
91 / 112
![Page 92: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/92.jpg)
SQL and JSON Example (3): explain
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
92 / 112
![Page 93: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/93.jpg)
SQL and JSON Example (3): explain
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
93 / 112
![Page 94: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/94.jpg)
SQL and JSON Example (4): add index
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
94 / 112
![Page 95: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/95.jpg)
SQL and JSON Example (4): add index
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
95 / 112
![Page 96: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/96.jpg)
SQL and JSON Example (5): arrays
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
96 / 112
![Page 97: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/97.jpg)
SQL and JSON Example (5): arrays
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
97 / 112
![Page 98: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/98.jpg)
SQL and JSON Example (5): arrays
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
98 / 112
![Page 99: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/99.jpg)
SQL and JSON Example (5): arrays
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
99 / 112
![Page 100: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/100.jpg)
NoSQL as SQL
JSON_TABLE
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
100 / 112
![Page 101: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/101.jpg)
NoSQL as SQL (2)
JSON_TABLE
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
101 / 112
![Page 102: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/102.jpg)
SQL and NoSQL
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
102 / 112
![Page 103: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/103.jpg)
SQL and NoSQL
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
103 / 112
![Page 104: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/104.jpg)
SQL and NoSQL
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
104 / 112
![Page 105: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/105.jpg)
SQL and NoSQL (2)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
105 / 112
![Page 106: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/106.jpg)
SQL and NoSQL (2)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
106 / 112
![Page 107: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/107.jpg)
SQL and NoSQL (2)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
107 / 112
![Page 108: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/108.jpg)
SQL and NoSQL (3) : and back to JSON Document
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
108 / 112
![Page 109: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/109.jpg)
what do I gain ?
Conclusion
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
109 / 112
![Page 110: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/110.jpg)
schemalessflexible data structureeasy to start (CRUD)
ConclusionThis is the best of the two worlds in one product !
Data integrityACID CompliantTransactionsSQL
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
110 / 112
![Page 111: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/111.jpg)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
111 / 112
![Page 112: 1 / 112 - MySQL · Provides a schema flexible JSON Document Store No SQL required No need to define all possible attributes, tables, etc. Uses new X DevAPI Can leverage generated](https://reader036.fdocuments.in/reader036/viewer/2022070714/5ed58a850d68dc0ad77f12ad/html5/thumbnails/112.jpg)
Thank you !
Any Questions ?
share your 💕 for @MySQL on social media using #mysqlinnovationday
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
112 / 112