SlideShare una empresa de Scribd logo
1 de 128
Descargar para leer sin conexión
1 / 128
Looking Inside the MySQL
Document Store
A JSON Document Store with all the benefits
of a traditional RDBMS (DEV2902)
Frédéric Descamps
Community Manager
MySQL
September 2019
2 / 128
 
Safe Harbor
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, timing and pricing of any
features or functionality described for Oracle's product may change and remains at the sole discretion of Oracle
Corporation.
Statement in this presentation relating to Oracle's future plans, expectations, beliefs, intentions and ptospects are
"forward-looking statements" and are subject to material risks and uncertainties. A detailed discussion of these
factors and other risks that a ect our business is contained in Oracle's Securities and Exchange Commission
(SEC) lings, including our most recent reports on Form 10-K and Form 10-Q under the heading "Risk Factors".
These lings are available on the SEC's website or on Oracle's website at h p://www.oracle.com/investor. All
information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any
statement in light of new information or future events.
Copyright @ 2019 Oracle and/or its affiliates.
3 / 128
about.me/lefred
Who am I ?
Copyright @ 2019 Oracle and/or its affiliates.
4 / 128
Frédéric Descamps
@lefred
MySQL Evangelist
Managing MySQL since 3.23
devops believer
living in Belgium 🇧🇪
h ps://lefred.be
Copyright @ 2019 Oracle and/or its affiliates.
5 / 128
MySQL 8.0
a Document Store with all the benefits of
a RDBMS
Copyright @ 2019 Oracle and/or its affiliates.
6 / 128
Why ?
Copyright @ 2019 Oracle and/or its affiliates.
7 / 128
Why ?
Developers don't really like SQL anymore...
 
Copyright @ 2019 Oracle and/or its affiliates.
8 / 128
Why ?
SQL can be complicated and slows down the initial development
Copyright @ 2019 Oracle and/or its affiliates.
9 / 128
easy operations
What do developers want ?
Copyright @ 2019 Oracle and/or its affiliates.
10 / 128
Use Objects / Documents
Developers want just to use objects
Copyright @ 2019 Oracle and/or its affiliates.
11 / 128
Use Objects / Documents
Developers want just to use objects
that's why they usually love what DBAs hate the most ORMs !).
Copyright @ 2019 Oracle and/or its affiliates.
12 / 128
Use Objects / Documents
Developers want just to use objects
that's why they usually love what DBAs hate the most 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.
13 / 128
Use Objects / Documents
Developers want just to use objects
that's why they usually love what DBAs hate the most 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.
14 / 128
MySQL as RDBMS
Relational Databases
Copyright @ 2019 Oracle and/or its affiliates.
15 / 128
Relational Databases
Data Integrity
Copyright @ 2019 Oracle and/or its affiliates.
16 / 128
Relational Databases
Data Integrity
normalization
Copyright @ 2019 Oracle and/or its affiliates.
17 / 128
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Copyright @ 2019 Oracle and/or its affiliates.
18 / 128
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
Copyright @ 2019 Oracle and/or its affiliates.
19 / 128
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
ACID compliant
Copyright @ 2019 Oracle and/or its affiliates.
20 / 128
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
ACID compliant
transactions
Copyright @ 2019 Oracle and/or its affiliates.
21 / 128
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
ACID compliant
transactions
SQL
Copyright @ 2019 Oracle and/or its affiliates.
22 / 128
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
ACID compliant
transactions
SQL
powerfull query language
Copyright @ 2019 Oracle and/or its affiliates.
23 / 128
MySQL as Document Store
NoSQL Databases
Copyright @ 2019 Oracle and/or its affiliates.
24 / 128
NoSQL or Document Store
Schemaless
Copyright @ 2019 Oracle and/or its affiliates.
25 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
Copyright @ 2019 Oracle and/or its affiliates.
26 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Copyright @ 2019 Oracle and/or its affiliates.
27 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
Copyright @ 2019 Oracle and/or its affiliates.
28 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
Copyright @ 2019 Oracle and/or its affiliates.
29 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
valid solution when natural data can't be modelized optimaly into a relational model
Copyright @ 2019 Oracle and/or its affiliates.
30 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
valid solution when natural data can't be modelized optimaly into a relational model
objects persistance without the use of any ORM - mapping oobject-oriented
Copyright @ 2019 Oracle and/or its affiliates.
31 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
valid solution when natural data can't be modelized optimaly into a relational model
objects persistance without the use of any ORM - mapping oobject-oriented
JSON
Copyright @ 2019 Oracle and/or its affiliates.
32 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
valid solution when natural data can't be modelized optimaly into a relational model
objects persistance without the use of any ORM - mapping oobject-oriented
JSON
close to frontend
Copyright @ 2019 Oracle and/or its affiliates.
33 / 128
NoSQL or Document Store
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
valid solution when natural data can't be modelized optimaly into a relational model
objects persistance without the use of any ORM - mapping oobject-oriented
JSON
close to frontend
easy to learn
Copyright @ 2019 Oracle and/or its affiliates.
34 / 128
How DBAs see data
Copyright @ 2019 Oracle and/or its affiliates.
35 / 128
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 @ 2019 Oracle and/or its affiliates.
36 / 128
What if there was a way to provide both SQL
and NoSQL on one stable platform that has
proven stability on well know technology with a
large Community and a diverse ecosystem ?
Copyright @ 2019 Oracle and/or its affiliates.
37 / 128
DBMS or NoSQL ?
Copyright @ 2019 Oracle and/or its affiliates.
38 / 128
DBMS or NoSQL ?
Why not both ?
Copyright @ 2019 Oracle and/or its affiliates.
39 / 128
The MySQL Document Store !
SQL is now optional ?!
Copyright @ 2019 Oracle and/or its affiliates.
40 / 128
SQL is now optional ?!
Copyright @ 2019 Oracle and/or its affiliates.
41 / 128
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 = rapid
developement
A solution for all
Copyright @ 2019 Oracle and/or its affiliates.
42 / 128
MySQL Document Store
the Solution
Copyright @ 2019 Oracle and/or its affiliates.
43 / 128
Built on
the MySQL
JSON Data
type and
Proven
MySQL
Server
Technology
Provides a schema exible JSON Document Store
No SQL required
No need to de ne all possible a ributes, tables, etc.
Uses new X DevAPI
Can leverage generated column to extract JSON values into
materialized columns that can be indexed for fast SQL searches.
Document can be ~1GB
It's a column in a row of a table
It cannot exceed max_allowed_packet
Allows use of modern programming styles
No more embedded strings of SQL in your code
Easy to read
Also works with relational Tables
Proven MySQL Technology
Copyright @ 2019 Oracle and/or its affiliates.
44 / 128
X Protocol Connectors
Copyright @ 2019 Oracle and/or its affiliates.
45 / 128
X DevAPI We provide connectors for
C++, Java, .Net, Node.js, Python, PHP
working with Communities to help them supporting it too
New MySQL Shell
Command Completion
Python, JavaScrips & SQL modes
Admin functions
New Util object
A new high-level session concept that can scale from single
MySQL Server to a multiple server environment
Non-blocking, asynchronous calls follow common language
pa erns
Supports CRUD operations
Copyright @ 2019 Oracle and/or its affiliates.
46 / 128
PY
JS
SQL
>
MySQL 8.0
Upgrade Checker
Auto Completion
&
Command History
Output
Formats
(table, json, tabs)
Prompt
Themes
Batch
Execution
5.7
8.0
JS
Document
Store
X dev API
SQL CLI InnoDB
Cluster
importJSON
JSJS
Copyright @ 2019 Oracle and/or its affiliates.
47 / 128
MySQL Document Store
Setup
Copyright @ 2019 Oracle and/or its affiliates.
48 / 128
Installing MySQL Document Store
install MySQL 8.0
Copyright @ 2019 Oracle and/or its affiliates.
49 / 128
Installing MySQL Document Store
install MySQL 8.0
install MySQL Shell
Copyright @ 2019 Oracle and/or its affiliates.
50 / 128
Installing MySQL Document Store
install MySQL 8.0
install MySQL Shell
install MySQL Connector for your programming language
Copyright @ 2019 Oracle and/or its affiliates.
51 / 128
Installing MySQL Document Store
install MySQL 8.0
install MySQL Shell
install MySQL Connector for your programming language
php-pecl-mysql-xdevapi for PHP
mysql-connector-python for Python
...
Copyright @ 2019 Oracle and/or its affiliates.
52 / 128
Installing MySQL Document Store
install MySQL 8.0
install MySQL Shell
install MySQL Connector for your programming language
php-pecl-mysql-xdevapi for PHP
mysql-connector-python for Python
...
And nothing else, no need to install anything else or load any plugin, just be sure your
rewall allows you to connect through port 33060 (X Protocol).
Copyright @ 2019 Oracle and/or its affiliates.
53 / 128
Migration from MongoDB to MySQL DS
For this example, I will use the well known restaurants collection:
Copyright @ 2019 Oracle and/or its affiliates.
54 / 128
Migration from MongoDB to MySQL DS
For this example, I will use the well known restaurants collection:
Copyright @ 2019 Oracle and/or its affiliates.
55 / 128
Copyright @ 2019 Oracle and/or its affiliates.
56 / 128
Copyright @ 2019 Oracle and/or its affiliates.
57 / 128
Let's make a query
Copyright @ 2019 Oracle and/or its affiliates.
58 / 128
Let's make a query
That's too much records to show in here... let's limit it
Copyright @ 2019 Oracle and/or its affiliates.
59 / 128
Copyright @ 2019 Oracle and/or its affiliates.
60 / 128
Some more examples
Copyright @ 2019 Oracle and/or its affiliates.
61 / 128
Let's add a selection criteria:
Copyright @ 2019 Oracle and/or its affiliates.
62 / 128
Using IN...
Copyright @ 2019 Oracle and/or its affiliates.
63 / 128
Syntax slightly different than MongoDB
Copyright @ 2019 Oracle and/or its affiliates.
64 / 128
Syntax slightly different than MongoDB
Copyright @ 2019 Oracle and/or its affiliates.
65 / 128
And for developers ?
Copyright @ 2019 Oracle and/or its affiliates.
66 / 128
And for developers ?
$session = mysql_xdevapigetSession("mysqlx://fred:MyP@ssw0rd%@localhost");
$schema = $session->getSchema("docstore");
$collection = $schema->getCollection("restaurants");
$results = $collection-> nd($search)->execute()->fetchAll();
...
foreach ($results as $doc) {
echo "<tr><td><a href='?id=${doc[_id]}'>${doc[name]}</a></td>";
echo "<td>${doc[borough]}</td><td>${doc[cuisine]}</td></tr>";
}
Copyright @ 2019 Oracle and/or its affiliates.
67 / 128
And for developers ?
$session = mysql_xdevapigetSession("mysqlx://fred:MyP@ssw0rd%@localhost");
$schema = $session->getSchema("docstore");
$collection = $schema->getCollection("restaurants");
$results = $collection-> nd($search)->execute()->fetchAll();
...
foreach ($results as $doc) {
echo "<tr><td><a href='?id=${doc[_id]}'>${doc[name]}</a></td>";
echo "<td>${doc[borough]}</td><td>${doc[cuisine]}</td></tr>";
}
 
Easy, using only CRUD operations !
Copyright @ 2019 Oracle and/or its affiliates.
68 / 128
And for developers ?
$session = mysql_xdevapigetSession("mysqlx://fred:MyP@ssw0rd%@localhost");
$schema = $session->getSchema("docstore");
$collection = $schema->getCollection("restaurants");
$results = $collection-> nd($search)->execute()->fetchAll();
...
foreach ($results as $doc) {
echo "<tr><td><a href='?id=${doc[_id]}'>${doc[name]}</a></td>";
echo "<td>${doc[borough]}</td><td>${doc[cuisine]}</td></tr>";
}
 
Easy, using only CRUD operations !
Not a single SQL statement !
Copyright @ 2019 Oracle and/or its affiliates.
69 / 128
CRUD operations
Copyright @ 2019 Oracle and/or its affiliates.
70 / 128
CRUD operations for collections
Add a document
Copyright @ 2019 Oracle and/or its affiliates.
71 / 128
CRUD operations for collections
Add a document
collection.add({ name: 'fred', age: 42 })
.add({ name: 'dave', age: 23 })
.execute()
collection.add([
{ name: 'dimo', age: 50 },
{ name: 'kenny', age: 25 }
]).execute()
Copyright @ 2019 Oracle and/or its affiliates.
72 / 128
CRUD operations for collections
Modify a document
Copyright @ 2019 Oracle and/or its affiliates.
73 / 128
CRUD operations for collections
Modify a document
collection.modify('name = :name')
.bind('name', 'fred')
.set('age', 43)
.sort('name ASC')
.limit(1)
.execute()
collection.modify('name = :name')
.bind('name', 'fred')
.patch({ age: 43, active: false })
.sort('name DESC')
.limit(1)
.execute()
Copyright @ 2019 Oracle and/or its affiliates.
74 / 128
CRUD operations for collections
Remove a document
Copyright @ 2019 Oracle and/or its affiliates.
75 / 128
CRUD operations for collections
Remove a document
collection.remove('name = :name')
.bind('name', 'fred')
.sort('age ASC')
.limit(1)
.execute()
Copyright @ 2019 Oracle and/or its affiliates.
76 / 128
MySQL Document Store Objects Summary
Copyright @ 2019 Oracle and/or its affiliates.
77 / 128
All you need to know is here:
h ps://dev.mysql.com/doc/x-devapi-userguide/en/crud-operations-overview.html
Copyright @ 2019 Oracle and/or its affiliates.
78 / 128
we do care about your data
MySQL Document Store is Full ACID
Compliant
Copyright @ 2019 Oracle and/or its affiliates.
79 / 128
Document Store Full ACID !
It relies on the proven MySQL InnoDB's strength & robustness:
Copyright @ 2019 Oracle and/or its affiliates.
80 / 128
Document Store Full ACID !
It relies on the proven MySQL InnoDB's strength & robustness:
innodb_ ush_log_at_trx_commit = 1
Copyright @ 2019 Oracle and/or its affiliates.
81 / 128
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 @ 2019 Oracle and/or its affiliates.
82 / 128
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 @ 2019 Oracle and/or its affiliates.
83 / 128
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 @ 2019 Oracle and/or its affiliates.
84 / 128
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 @ 2019 Oracle and/or its affiliates.
85 / 128
MySQL DS Full ACID - Transactions support
Copyright @ 2019 Oracle and/or its affiliates.
86 / 128
MySQL DS Full ACID - Transactions support
Copyright @ 2019 Oracle and/or its affiliates.
87 / 128
OK we have Document Store, CRUD and ACID
but what makes MySQL Document Store
unique ?
Copyright @ 2019 Oracle and/or its affiliates.
88 / 128
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.
89 / 128
NoSQL as SQL - aggregation
Copyright @ 2019 Oracle and/or its affiliates.
90 / 128
NoSQL as SQL - aggregation
Copyright @ 2019 Oracle and/or its affiliates.
91 / 128
NoSQL as SQL - aggregation
Copyright @ 2019 Oracle and/or its affiliates.
92 / 128
NoSQL or SQL
You have the possibility to write clean and neat code:
Copyright @ 2019 Oracle and/or its affiliates.
93 / 128
NoSQL or SQL
You have the possibility to write clean and neat code:
$results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll();
Copyright @ 2019 Oracle and/or its affiliates.
94 / 128
NoSQL or SQL
You have the possibility to write clean and neat code:
$results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll();
Or use SQL only when it's really needed:
Copyright @ 2019 Oracle and/or its affiliates.
95 / 128
NoSQL or SQL
You have the possibility to write clean and neat code:
$results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll();
Or use SQL only when it's really needed:
$results = $session->sql('WITH cte1 AS (SELECT doc->>"$.name" AS name,
doc->>"$.cuisine" AS cuisine,
(SELECT AVG(score) FROM JSON_TABLE(doc, "$.grades[*]" COLUMNS (score INT
PATH "$.score")) AS r) AS avg_score FROM docstore.restaurants)
SELECT *, RANK()
OVER ( PARTITION BY cuisine ORDER BY avg_score) AS `rank`
FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;')->execute();
Copyright @ 2019 Oracle and/or its affiliates.
96 / 128
NoSQL or SQL
You have the possibility to write clean and neat code:
$results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll();
Or use SQL only when it's really needed:
$results = $session->sql('WITH cte1 AS (SELECT doc->>"$.name" AS name,
doc->>"$.cuisine" AS cuisine,
(SELECT AVG(score) FROM JSON_TABLE(doc, "$.grades[*]" COLUMNS (score INT
PATH "$.score")) AS r) AS avg_score FROM docstore.restaurants)
SELECT *, RANK()
OVER ( PARTITION BY cuisine ORDER BY avg_score) AS `rank`
FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;')->execute();
All in the same MySQL X Session !
Copyright @ 2019 Oracle and/or its affiliates.
97 / 128
You can mix NoSQL & SQL as you want
Copyright @ 2019 Oracle and/or its affiliates.
98 / 128
Best of Both Worlds: JSON_TABLE
What are the maximum 10 ratings ever given to a restaurant?
Copyright @ 2019 Oracle and/or its affiliates.
99 / 128
Best of Both Worlds: JSON_TABLE
What are the maximum 10 ratings ever given to a restaurant?
Cool... but my app only process JSON !
Copyright @ 2019 Oracle and/or its affiliates.
100 / 128
Best of Both Worlds: JSON_TABLE (2)
With JSON output:
Copyright @ 2019 Oracle and/or its affiliates.
101 / 128
MySQL Document Store
And the DBA ?
Copyright @ 2019 Oracle and/or its affiliates.
102 / 128
Role of the MySQL Document Store DBA ?
Copyright @ 2019 Oracle and/or its affiliates.
103 / 128
nd the non optimal lookups
create the necessary indexes based on
the results
 
Role of the MySQL Document Store DBA ?
Copyright @ 2019 Oracle and/or its affiliates.
104 / 128
Role of the MySQL Document Store DBA
Looking for full table scans:
SELECT schema_name, sum_rows_examined, (sum_rows_examined/exec_count) avg_rows_call,
format_time(total_latency) tot_lat, exec_count,
format_time(total_latency/exec_count) AS latency_per_call, query_sample_text
FROM sys.x$statements_with_full_table_scans AS t1
JOIN performance_schema.events_statements_summary_by_digest AS t2
ON t2.digest=t1.digest
WHERE schema_name = "docstore" AND query_sample_text LIKE '%select%'
ORDER BY (total_latency/exec_count) descG
Copyright @ 2019 Oracle and/or its affiliates.
105 / 128
Role of the MySQL Document Store DBA
Looking for full table scans:
SELECT schema_name, sum_rows_examined, (sum_rows_examined/exec_count) avg_rows_call,
format_time(total_latency) tot_lat, exec_count,
format_time(total_latency/exec_count) AS latency_per_call, query_sample_text
FROM sys.x$statements_with_full_table_scans AS t1
JOIN performance_schema.events_statements_summary_by_digest AS t2
ON t2.digest=t1.digest
WHERE schema_name = "docstore" AND query_sample_text LIKE '%select%'
ORDER BY (total_latency/exec_count) descG
More info at h ps://lefred.be/content/mysql-8-0-if-i-should-optimize-only-one-query-
on-my-application-which-one-should-it-be/
Copyright @ 2019 Oracle and/or its affiliates.
106 / 128
Role of the MySQL Document Store DBA (2)
Copyright @ 2019 Oracle and/or its affiliates.
107 / 128
Role of the MySQL Document Store DBA (3)
Copyright @ 2019 Oracle and/or its affiliates.
108 / 128
Role of the MySQL Document Store DBA (4)
Getting the Query Explain Plan:
Copyright @ 2019 Oracle and/or its affiliates.
109 / 128
Role of the MySQL Document Store DBA (4)
Getting the Query Explain Plan:
It's indeed a full table scan ! What should we do ?
Copyright @ 2019 Oracle and/or its affiliates.
110 / 128
Role of the MySQL Document Store DBA (5)
Create Indexes:
Copyright @ 2019 Oracle and/or its affiliates.
111 / 128
Role of the MySQL Document Store DBA (5)
Create Indexes:
For the "old" experienced MySQL DBAs, you can instead use:
Copyright @ 2019 Oracle and/or its affiliates.
112 / 128
INFO: JSON Notation Shortcut
Copyright @ 2019 Oracle and/or its affiliates.
113 / 128
Role of the MySQL Document Store DBA (6)
Result:
Copyright @ 2019 Oracle and/or its affiliates.
114 / 128
For the curious: a collection in SQL:
Copyright @ 2019 Oracle and/or its affiliates.
115 / 128
NEW in MySQL 8.0.17
Multi-valued indexes
JSON_CONTAINS()
MEMBER OF() new
JSON_OVERLAPS() new
JSON Schema
JSON_SCHEMA_VALID(<json schema>,<json doc>) new
JSON_SCHEMA_VALIDATION_REPORT(<json schema>,<json doc>) new
Copyright @ 2019 Oracle and/or its affiliates.
116 / 128
JSON Multi-Valued Indexes 8.0.17
Copyright @ 2019 Oracle and/or its affiliates.
117 / 128
JSON Multi-Valued Indexes 8.0.17 (2)
Copyright @ 2019 Oracle and/or its affiliates.
118 / 128
JSON Schema Validation 8.0.17
Copyright @ 2019 Oracle and/or its affiliates.
119 / 128
JSON Schema Validation (2) 8.0.17
Copyright @ 2019 Oracle and/or its affiliates.
120 / 128
JSON Schema Validation (3) 8.0.17
De ne the validation as a constraint:
Copyright @ 2019 Oracle and/or its affiliates.
121 / 128
JSON Schema Validation (3) 8.0.17
De ne the validation as a constraint:
And the result in action:
Copyright @ 2019 Oracle and/or its affiliates.
122 / 128
what do I gain ?
Conclusion
Copyright @ 2019 Oracle and/or its affiliates.
123 / 128
schemaless
exible 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.
124 / 128
http://lefred.be/content/top-10-reasons-for-
nosql-with-mysql/
Copyright @ 2019 Oracle and/or its affiliates.
125 / 128
126 / 128
Thank you !
Copyright @ 2019 Oracle and/or its affiliates.
127 / 128
Session Survey
Help us make the content even be er.
Please complete the session survey in
the Mobile App.
Copyright @ 2019 Oracle and/or its affiliates.
128 / 128

Más contenido relacionado

La actualidad más candente

MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesFrederic Descamps
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !Frederic Descamps
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20Frederic Descamps
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsFrederic Descamps
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Frederic Descamps
 
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0Frederic Descamps
 
Hash join in MySQL 8
Hash join in MySQL 8Hash join in MySQL 8
Hash join in MySQL 8Erik Frøseth
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSFrederic Descamps
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...Frederic Descamps
 
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0Frederic Descamps
 
MySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersMySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersFrederic Descamps
 
MySQL : State of the Dolphin May 2019
MySQL : State of the Dolphin May 2019MySQL : State of the Dolphin May 2019
MySQL : State of the Dolphin May 2019Frederic Descamps
 
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native -  Why to use MySQL 8.0 and how to use it on oci with MDSCloud native -  Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDSFrederic Descamps
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020Frederic Descamps
 
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with TerraformOracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with TerraformFrederic Descamps
 
Percona Live Europe 2018 MySQL Group Replication... the magic explained
Percona Live Europe 2018  MySQL Group Replication... the magic explainedPercona Live Europe 2018  MySQL Group Replication... the magic explained
Percona Live Europe 2018 MySQL Group Replication... the magic explainedFrederic Descamps
 
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...Frederic Descamps
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldFrederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 

La actualidad más candente (20)

MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best Practices
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
 
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
 
Hash join in MySQL 8
Hash join in MySQL 8Hash join in MySQL 8
Hash join in MySQL 8
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
 
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
 
MySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersMySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python Developers
 
MySQL : State of the Dolphin May 2019
MySQL : State of the Dolphin May 2019MySQL : State of the Dolphin May 2019
MySQL : State of the Dolphin May 2019
 
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native -  Why to use MySQL 8.0 and how to use it on oci with MDSCloud native -  Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with TerraformOracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
 
Percona Live Europe 2018 MySQL Group Replication... the magic explained
Percona Live Europe 2018  MySQL Group Replication... the magic explainedPercona Live Europe 2018  MySQL Group Replication... the magic explained
Percona Live Europe 2018 MySQL Group Replication... the magic explained
 
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New World
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 

Similar a Looking Inside the MySQL 8.0 Document Store

Oracle Code Roma: NoSQL + SQL = MySQL
Oracle Code Roma:   NoSQL + SQL = MySQLOracle Code Roma:   NoSQL + SQL = MySQL
Oracle Code Roma: NoSQL + SQL = MySQLFrederic Descamps
 
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Oracle Open World 2018 /  Code One : MySQL 8.0 Document StoreOracle Open World 2018 /  Code One : MySQL 8.0 Document Store
Oracle Open World 2018 / Code One : MySQL 8.0 Document StoreFrederic Descamps
 
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...Frederic Descamps
 
pre-FOSDEM MySQL day, February 2018 - MySQL Document Store
pre-FOSDEM MySQL day, February 2018 - MySQL Document Storepre-FOSDEM MySQL day, February 2018 - MySQL Document Store
pre-FOSDEM MySQL day, February 2018 - MySQL Document StoreFrederic Descamps
 
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...Frederic Descamps
 
MySQL Document Store - How to replace a NoSQL database by MySQL without effor...
MySQL Document Store - How to replace a NoSQL database by MySQL without effor...MySQL Document Store - How to replace a NoSQL database by MySQL without effor...
MySQL Document Store - How to replace a NoSQL database by MySQL without effor...Frederic Descamps
 
Introduction to MySQL Document Store
Introduction to MySQL Document StoreIntroduction to MySQL Document Store
Introduction to MySQL Document StoreFrederic Descamps
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLManuel Contreras
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...Olivier DASINI
 
MySQL Connector/J in the Making of Modern Applications
MySQL Connector/J in the Making of Modern ApplicationsMySQL Connector/J in the Making of Modern Applications
MySQL Connector/J in the Making of Modern ApplicationsFilipe Silva
 
A Step by Step Introduction to the MySQL Document Store
A Step by Step Introduction to the MySQL Document StoreA Step by Step Introduction to the MySQL Document Store
A Step by Step Introduction to the MySQL Document StoreDave Stokes
 
MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)Vittorio Cioe
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...Olivier DASINI
 
The New Database Frontier: Harnessing the Cloud
The New Database Frontier: Harnessing the CloudThe New Database Frontier: Harnessing the Cloud
The New Database Frontier: Harnessing the CloudInside Analysis
 
Solution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big DataSolution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big DataInfiniteGraph
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreOracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreMark Swarbrick
 
Con8862 no sql, json and time series data
Con8862   no sql, json and time series dataCon8862   no sql, json and time series data
Con8862 no sql, json and time series dataAnuj Sahni
 

Similar a Looking Inside the MySQL 8.0 Document Store (20)

Oracle Code Roma: NoSQL + SQL = MySQL
Oracle Code Roma:   NoSQL + SQL = MySQLOracle Code Roma:   NoSQL + SQL = MySQL
Oracle Code Roma: NoSQL + SQL = MySQL
 
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Oracle Open World 2018 /  Code One : MySQL 8.0 Document StoreOracle Open World 2018 /  Code One : MySQL 8.0 Document Store
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
 
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
 
pre-FOSDEM MySQL day, February 2018 - MySQL Document Store
pre-FOSDEM MySQL day, February 2018 - MySQL Document Storepre-FOSDEM MySQL day, February 2018 - MySQL Document Store
pre-FOSDEM MySQL day, February 2018 - MySQL Document Store
 
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
 
MySQL Document Store - How to replace a NoSQL database by MySQL without effor...
MySQL Document Store - How to replace a NoSQL database by MySQL without effor...MySQL Document Store - How to replace a NoSQL database by MySQL without effor...
MySQL Document Store - How to replace a NoSQL database by MySQL without effor...
 
Introduction to MySQL Document Store
Introduction to MySQL Document StoreIntroduction to MySQL Document Store
Introduction to MySQL Document Store
 
Why Use an Oracle Database?
Why Use an Oracle Database?Why Use an Oracle Database?
Why Use an Oracle Database?
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQL
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
 
MySQL Connector/J in the Making of Modern Applications
MySQL Connector/J in the Making of Modern ApplicationsMySQL Connector/J in the Making of Modern Applications
MySQL Connector/J in the Making of Modern Applications
 
2020 – A Decade of Change
2020 – A Decade of Change2020 – A Decade of Change
2020 – A Decade of Change
 
A Step by Step Introduction to the MySQL Document Store
A Step by Step Introduction to the MySQL Document StoreA Step by Step Introduction to the MySQL Document Store
A Step by Step Introduction to the MySQL Document Store
 
MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)
 
Oracle NoSQL
Oracle NoSQLOracle NoSQL
Oracle NoSQL
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
 
The New Database Frontier: Harnessing the Cloud
The New Database Frontier: Harnessing the CloudThe New Database Frontier: Harnessing the Cloud
The New Database Frontier: Harnessing the Cloud
 
Solution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big DataSolution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big Data
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreOracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document Store
 
Con8862 no sql, json and time series data
Con8862   no sql, json and time series dataCon8862   no sql, json and time series data
Con8862 no sql, json and time series data
 

Más de Frederic Descamps

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionFrederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsFrederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022Frederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodeFrederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database ServiceFrederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQLFrederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021Frederic Descamps
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDSFrederic Descamps
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...Frederic Descamps
 
MySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsMySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsFrederic Descamps
 

Más de Frederic Descamps (20)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
 
MySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsMySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mds
 

Último

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Looking Inside the MySQL 8.0 Document Store

  • 2. Looking Inside the MySQL Document Store A JSON Document Store with all the benefits of a traditional RDBMS (DEV2902) Frédéric Descamps Community Manager MySQL September 2019 2 / 128
  • 3.   Safe Harbor 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, timing and pricing of any features or functionality described for Oracle's product may change and remains at the sole discretion of Oracle Corporation. Statement in this presentation relating to Oracle's future plans, expectations, beliefs, intentions and ptospects are "forward-looking statements" and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that a ect our business is contained in Oracle's Securities and Exchange Commission (SEC) lings, including our most recent reports on Form 10-K and Form 10-Q under the heading "Risk Factors". These lings are available on the SEC's website or on Oracle's website at h p://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Copyright @ 2019 Oracle and/or its affiliates. 3 / 128
  • 4. about.me/lefred Who am I ? Copyright @ 2019 Oracle and/or its affiliates. 4 / 128
  • 5. Frédéric Descamps @lefred MySQL Evangelist Managing MySQL since 3.23 devops believer living in Belgium 🇧🇪 h ps://lefred.be Copyright @ 2019 Oracle and/or its affiliates. 5 / 128
  • 6. MySQL 8.0 a Document Store with all the benefits of a RDBMS Copyright @ 2019 Oracle and/or its affiliates. 6 / 128
  • 7. Why ? Copyright @ 2019 Oracle and/or its affiliates. 7 / 128
  • 8. Why ? Developers don't really like SQL anymore...   Copyright @ 2019 Oracle and/or its affiliates. 8 / 128
  • 9. Why ? SQL can be complicated and slows down the initial development Copyright @ 2019 Oracle and/or its affiliates. 9 / 128
  • 10. easy operations What do developers want ? Copyright @ 2019 Oracle and/or its affiliates. 10 / 128
  • 11. Use Objects / Documents Developers want just to use objects Copyright @ 2019 Oracle and/or its affiliates. 11 / 128
  • 12. Use Objects / Documents Developers want just to use objects that's why they usually love what DBAs hate the most ORMs !). Copyright @ 2019 Oracle and/or its affiliates. 12 / 128
  • 13. Use Objects / Documents Developers want just to use objects that's why they usually love what DBAs hate the most 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. 13 / 128
  • 14. Use Objects / Documents Developers want just to use objects that's why they usually love what DBAs hate the most 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. 14 / 128
  • 15. MySQL as RDBMS Relational Databases Copyright @ 2019 Oracle and/or its affiliates. 15 / 128
  • 16. Relational Databases Data Integrity Copyright @ 2019 Oracle and/or its affiliates. 16 / 128
  • 17. Relational Databases Data Integrity normalization Copyright @ 2019 Oracle and/or its affiliates. 17 / 128
  • 18. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Copyright @ 2019 Oracle and/or its affiliates. 18 / 128
  • 19. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Atomicity, Consistency, Isolation, Durability Copyright @ 2019 Oracle and/or its affiliates. 19 / 128
  • 20. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Atomicity, Consistency, Isolation, Durability ACID compliant Copyright @ 2019 Oracle and/or its affiliates. 20 / 128
  • 21. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Atomicity, Consistency, Isolation, Durability ACID compliant transactions Copyright @ 2019 Oracle and/or its affiliates. 21 / 128
  • 22. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Atomicity, Consistency, Isolation, Durability ACID compliant transactions SQL Copyright @ 2019 Oracle and/or its affiliates. 22 / 128
  • 23. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Atomicity, Consistency, Isolation, Durability ACID compliant transactions SQL powerfull query language Copyright @ 2019 Oracle and/or its affiliates. 23 / 128
  • 24. MySQL as Document Store NoSQL Databases Copyright @ 2019 Oracle and/or its affiliates. 24 / 128
  • 25. NoSQL or Document Store Schemaless Copyright @ 2019 Oracle and/or its affiliates. 25 / 128
  • 26. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... Copyright @ 2019 Oracle and/or its affiliates. 26 / 128
  • 27. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Copyright @ 2019 Oracle and/or its affiliates. 27 / 128
  • 28. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure Copyright @ 2019 Oracle and/or its affiliates. 28 / 128
  • 29. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects Copyright @ 2019 Oracle and/or its affiliates. 29 / 128
  • 30. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects valid solution when natural data can't be modelized optimaly into a relational model Copyright @ 2019 Oracle and/or its affiliates. 30 / 128
  • 31. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects valid solution when natural data can't be modelized optimaly into a relational model objects persistance without the use of any ORM - mapping oobject-oriented Copyright @ 2019 Oracle and/or its affiliates. 31 / 128
  • 32. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects valid solution when natural data can't be modelized optimaly into a relational model objects persistance without the use of any ORM - mapping oobject-oriented JSON Copyright @ 2019 Oracle and/or its affiliates. 32 / 128
  • 33. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects valid solution when natural data can't be modelized optimaly into a relational model objects persistance without the use of any ORM - mapping oobject-oriented JSON close to frontend Copyright @ 2019 Oracle and/or its affiliates. 33 / 128
  • 34. NoSQL or Document Store Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects valid solution when natural data can't be modelized optimaly into a relational model objects persistance without the use of any ORM - mapping oobject-oriented JSON close to frontend easy to learn Copyright @ 2019 Oracle and/or its affiliates. 34 / 128
  • 35. How DBAs see data Copyright @ 2019 Oracle and/or its affiliates. 35 / 128
  • 36. 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 @ 2019 Oracle and/or its affiliates. 36 / 128
  • 37. What if there was a way to provide both SQL and NoSQL on one stable platform that has proven stability on well know technology with a large Community and a diverse ecosystem ? Copyright @ 2019 Oracle and/or its affiliates. 37 / 128
  • 38. DBMS or NoSQL ? Copyright @ 2019 Oracle and/or its affiliates. 38 / 128
  • 39. DBMS or NoSQL ? Why not both ? Copyright @ 2019 Oracle and/or its affiliates. 39 / 128
  • 40. The MySQL Document Store ! SQL is now optional ?! Copyright @ 2019 Oracle and/or its affiliates. 40 / 128
  • 41. SQL is now optional ?! Copyright @ 2019 Oracle and/or its affiliates. 41 / 128
  • 42. 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 = rapid developement A solution for all Copyright @ 2019 Oracle and/or its affiliates. 42 / 128
  • 43. MySQL Document Store the Solution Copyright @ 2019 Oracle and/or its affiliates. 43 / 128
  • 44. Built on the MySQL JSON Data type and Proven MySQL Server Technology Provides a schema exible JSON Document Store No SQL required No need to de ne all possible a ributes, tables, etc. Uses new X DevAPI Can leverage generated column to extract JSON values into materialized columns that can be indexed for fast SQL searches. Document can be ~1GB It's a column in a row of a table It cannot exceed max_allowed_packet Allows use of modern programming styles No more embedded strings of SQL in your code Easy to read Also works with relational Tables Proven MySQL Technology Copyright @ 2019 Oracle and/or its affiliates. 44 / 128
  • 45. X Protocol Connectors Copyright @ 2019 Oracle and/or its affiliates. 45 / 128
  • 46. X DevAPI We provide connectors for C++, Java, .Net, Node.js, Python, PHP working with Communities to help them supporting it too New MySQL Shell Command Completion Python, JavaScrips & SQL modes Admin functions New Util object A new high-level session concept that can scale from single MySQL Server to a multiple server environment Non-blocking, asynchronous calls follow common language pa erns Supports CRUD operations Copyright @ 2019 Oracle and/or its affiliates. 46 / 128
  • 47. PY JS SQL > MySQL 8.0 Upgrade Checker Auto Completion & Command History Output Formats (table, json, tabs) Prompt Themes Batch Execution 5.7 8.0 JS Document Store X dev API SQL CLI InnoDB Cluster importJSON JSJS Copyright @ 2019 Oracle and/or its affiliates. 47 / 128
  • 48. MySQL Document Store Setup Copyright @ 2019 Oracle and/or its affiliates. 48 / 128
  • 49. Installing MySQL Document Store install MySQL 8.0 Copyright @ 2019 Oracle and/or its affiliates. 49 / 128
  • 50. Installing MySQL Document Store install MySQL 8.0 install MySQL Shell Copyright @ 2019 Oracle and/or its affiliates. 50 / 128
  • 51. Installing MySQL Document Store install MySQL 8.0 install MySQL Shell install MySQL Connector for your programming language Copyright @ 2019 Oracle and/or its affiliates. 51 / 128
  • 52. Installing MySQL Document Store install MySQL 8.0 install MySQL Shell install MySQL Connector for your programming language php-pecl-mysql-xdevapi for PHP mysql-connector-python for Python ... Copyright @ 2019 Oracle and/or its affiliates. 52 / 128
  • 53. Installing MySQL Document Store install MySQL 8.0 install MySQL Shell install MySQL Connector for your programming language php-pecl-mysql-xdevapi for PHP mysql-connector-python for Python ... And nothing else, no need to install anything else or load any plugin, just be sure your rewall allows you to connect through port 33060 (X Protocol). Copyright @ 2019 Oracle and/or its affiliates. 53 / 128
  • 54. Migration from MongoDB to MySQL DS For this example, I will use the well known restaurants collection: Copyright @ 2019 Oracle and/or its affiliates. 54 / 128
  • 55. Migration from MongoDB to MySQL DS For this example, I will use the well known restaurants collection: Copyright @ 2019 Oracle and/or its affiliates. 55 / 128
  • 56. Copyright @ 2019 Oracle and/or its affiliates. 56 / 128
  • 57. Copyright @ 2019 Oracle and/or its affiliates. 57 / 128
  • 58. Let's make a query Copyright @ 2019 Oracle and/or its affiliates. 58 / 128
  • 59. Let's make a query That's too much records to show in here... let's limit it Copyright @ 2019 Oracle and/or its affiliates. 59 / 128
  • 60. Copyright @ 2019 Oracle and/or its affiliates. 60 / 128
  • 61. Some more examples Copyright @ 2019 Oracle and/or its affiliates. 61 / 128
  • 62. Let's add a selection criteria: Copyright @ 2019 Oracle and/or its affiliates. 62 / 128
  • 63. Using IN... Copyright @ 2019 Oracle and/or its affiliates. 63 / 128
  • 64. Syntax slightly different than MongoDB Copyright @ 2019 Oracle and/or its affiliates. 64 / 128
  • 65. Syntax slightly different than MongoDB Copyright @ 2019 Oracle and/or its affiliates. 65 / 128
  • 66. And for developers ? Copyright @ 2019 Oracle and/or its affiliates. 66 / 128
  • 67. And for developers ? $session = mysql_xdevapigetSession("mysqlx://fred:MyP@ssw0rd%@localhost"); $schema = $session->getSchema("docstore"); $collection = $schema->getCollection("restaurants"); $results = $collection-> nd($search)->execute()->fetchAll(); ... foreach ($results as $doc) { echo "<tr><td><a href='?id=${doc[_id]}'>${doc[name]}</a></td>"; echo "<td>${doc[borough]}</td><td>${doc[cuisine]}</td></tr>"; } Copyright @ 2019 Oracle and/or its affiliates. 67 / 128
  • 68. And for developers ? $session = mysql_xdevapigetSession("mysqlx://fred:MyP@ssw0rd%@localhost"); $schema = $session->getSchema("docstore"); $collection = $schema->getCollection("restaurants"); $results = $collection-> nd($search)->execute()->fetchAll(); ... foreach ($results as $doc) { echo "<tr><td><a href='?id=${doc[_id]}'>${doc[name]}</a></td>"; echo "<td>${doc[borough]}</td><td>${doc[cuisine]}</td></tr>"; }   Easy, using only CRUD operations ! Copyright @ 2019 Oracle and/or its affiliates. 68 / 128
  • 69. And for developers ? $session = mysql_xdevapigetSession("mysqlx://fred:MyP@ssw0rd%@localhost"); $schema = $session->getSchema("docstore"); $collection = $schema->getCollection("restaurants"); $results = $collection-> nd($search)->execute()->fetchAll(); ... foreach ($results as $doc) { echo "<tr><td><a href='?id=${doc[_id]}'>${doc[name]}</a></td>"; echo "<td>${doc[borough]}</td><td>${doc[cuisine]}</td></tr>"; }   Easy, using only CRUD operations ! Not a single SQL statement ! Copyright @ 2019 Oracle and/or its affiliates. 69 / 128
  • 70. CRUD operations Copyright @ 2019 Oracle and/or its affiliates. 70 / 128
  • 71. CRUD operations for collections Add a document Copyright @ 2019 Oracle and/or its affiliates. 71 / 128
  • 72. CRUD operations for collections Add a document collection.add({ name: 'fred', age: 42 }) .add({ name: 'dave', age: 23 }) .execute() collection.add([ { name: 'dimo', age: 50 }, { name: 'kenny', age: 25 } ]).execute() Copyright @ 2019 Oracle and/or its affiliates. 72 / 128
  • 73. CRUD operations for collections Modify a document Copyright @ 2019 Oracle and/or its affiliates. 73 / 128
  • 74. CRUD operations for collections Modify a document collection.modify('name = :name') .bind('name', 'fred') .set('age', 43) .sort('name ASC') .limit(1) .execute() collection.modify('name = :name') .bind('name', 'fred') .patch({ age: 43, active: false }) .sort('name DESC') .limit(1) .execute() Copyright @ 2019 Oracle and/or its affiliates. 74 / 128
  • 75. CRUD operations for collections Remove a document Copyright @ 2019 Oracle and/or its affiliates. 75 / 128
  • 76. CRUD operations for collections Remove a document collection.remove('name = :name') .bind('name', 'fred') .sort('age ASC') .limit(1) .execute() Copyright @ 2019 Oracle and/or its affiliates. 76 / 128
  • 77. MySQL Document Store Objects Summary Copyright @ 2019 Oracle and/or its affiliates. 77 / 128
  • 78. All you need to know is here: h ps://dev.mysql.com/doc/x-devapi-userguide/en/crud-operations-overview.html Copyright @ 2019 Oracle and/or its affiliates. 78 / 128
  • 79. we do care about your data MySQL Document Store is Full ACID Compliant Copyright @ 2019 Oracle and/or its affiliates. 79 / 128
  • 80. Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: Copyright @ 2019 Oracle and/or its affiliates. 80 / 128
  • 81. Document Store Full ACID ! It relies on the proven MySQL InnoDB's strength & robustness: innodb_ ush_log_at_trx_commit = 1 Copyright @ 2019 Oracle and/or its affiliates. 81 / 128
  • 82. 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 @ 2019 Oracle and/or its affiliates. 82 / 128
  • 83. 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 @ 2019 Oracle and/or its affiliates. 83 / 128
  • 84. 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 @ 2019 Oracle and/or its affiliates. 84 / 128
  • 85. 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 @ 2019 Oracle and/or its affiliates. 85 / 128
  • 86. MySQL DS Full ACID - Transactions support Copyright @ 2019 Oracle and/or its affiliates. 86 / 128
  • 87. MySQL DS Full ACID - Transactions support Copyright @ 2019 Oracle and/or its affiliates. 87 / 128
  • 88. OK we have Document Store, CRUD and ACID but what makes MySQL Document Store unique ? Copyright @ 2019 Oracle and/or its affiliates. 88 / 128
  • 89. 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. 89 / 128
  • 90. NoSQL as SQL - aggregation Copyright @ 2019 Oracle and/or its affiliates. 90 / 128
  • 91. NoSQL as SQL - aggregation Copyright @ 2019 Oracle and/or its affiliates. 91 / 128
  • 92. NoSQL as SQL - aggregation Copyright @ 2019 Oracle and/or its affiliates. 92 / 128
  • 93. NoSQL or SQL You have the possibility to write clean and neat code: Copyright @ 2019 Oracle and/or its affiliates. 93 / 128
  • 94. NoSQL or SQL You have the possibility to write clean and neat code: $results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll(); Copyright @ 2019 Oracle and/or its affiliates. 94 / 128
  • 95. NoSQL or SQL You have the possibility to write clean and neat code: $results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll(); Or use SQL only when it's really needed: Copyright @ 2019 Oracle and/or its affiliates. 95 / 128
  • 96. NoSQL or SQL You have the possibility to write clean and neat code: $results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll(); Or use SQL only when it's really needed: $results = $session->sql('WITH cte1 AS (SELECT doc->>"$.name" AS name, doc->>"$.cuisine" AS cuisine, (SELECT AVG(score) FROM JSON_TABLE(doc, "$.grades[*]" COLUMNS (score INT PATH "$.score")) AS r) AS avg_score FROM docstore.restaurants) SELECT *, RANK() OVER ( PARTITION BY cuisine ORDER BY avg_score) AS `rank` FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;')->execute(); Copyright @ 2019 Oracle and/or its affiliates. 96 / 128
  • 97. NoSQL or SQL You have the possibility to write clean and neat code: $results = $collection-> nd('cuisine like "italian"')->execute()->fetchAll(); Or use SQL only when it's really needed: $results = $session->sql('WITH cte1 AS (SELECT doc->>"$.name" AS name, doc->>"$.cuisine" AS cuisine, (SELECT AVG(score) FROM JSON_TABLE(doc, "$.grades[*]" COLUMNS (score INT PATH "$.score")) AS r) AS avg_score FROM docstore.restaurants) SELECT *, RANK() OVER ( PARTITION BY cuisine ORDER BY avg_score) AS `rank` FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;')->execute(); All in the same MySQL X Session ! Copyright @ 2019 Oracle and/or its affiliates. 97 / 128
  • 98. You can mix NoSQL & SQL as you want Copyright @ 2019 Oracle and/or its affiliates. 98 / 128
  • 99. Best of Both Worlds: JSON_TABLE What are the maximum 10 ratings ever given to a restaurant? Copyright @ 2019 Oracle and/or its affiliates. 99 / 128
  • 100. Best of Both Worlds: JSON_TABLE What are the maximum 10 ratings ever given to a restaurant? Cool... but my app only process JSON ! Copyright @ 2019 Oracle and/or its affiliates. 100 / 128
  • 101. Best of Both Worlds: JSON_TABLE (2) With JSON output: Copyright @ 2019 Oracle and/or its affiliates. 101 / 128
  • 102. MySQL Document Store And the DBA ? Copyright @ 2019 Oracle and/or its affiliates. 102 / 128
  • 103. Role of the MySQL Document Store DBA ? Copyright @ 2019 Oracle and/or its affiliates. 103 / 128
  • 104. nd the non optimal lookups create the necessary indexes based on the results   Role of the MySQL Document Store DBA ? Copyright @ 2019 Oracle and/or its affiliates. 104 / 128
  • 105. Role of the MySQL Document Store DBA Looking for full table scans: SELECT schema_name, sum_rows_examined, (sum_rows_examined/exec_count) avg_rows_call, format_time(total_latency) tot_lat, exec_count, format_time(total_latency/exec_count) AS latency_per_call, query_sample_text FROM sys.x$statements_with_full_table_scans AS t1 JOIN performance_schema.events_statements_summary_by_digest AS t2 ON t2.digest=t1.digest WHERE schema_name = "docstore" AND query_sample_text LIKE '%select%' ORDER BY (total_latency/exec_count) descG Copyright @ 2019 Oracle and/or its affiliates. 105 / 128
  • 106. Role of the MySQL Document Store DBA Looking for full table scans: SELECT schema_name, sum_rows_examined, (sum_rows_examined/exec_count) avg_rows_call, format_time(total_latency) tot_lat, exec_count, format_time(total_latency/exec_count) AS latency_per_call, query_sample_text FROM sys.x$statements_with_full_table_scans AS t1 JOIN performance_schema.events_statements_summary_by_digest AS t2 ON t2.digest=t1.digest WHERE schema_name = "docstore" AND query_sample_text LIKE '%select%' ORDER BY (total_latency/exec_count) descG More info at h ps://lefred.be/content/mysql-8-0-if-i-should-optimize-only-one-query- on-my-application-which-one-should-it-be/ Copyright @ 2019 Oracle and/or its affiliates. 106 / 128
  • 107. Role of the MySQL Document Store DBA (2) Copyright @ 2019 Oracle and/or its affiliates. 107 / 128
  • 108. Role of the MySQL Document Store DBA (3) Copyright @ 2019 Oracle and/or its affiliates. 108 / 128
  • 109. Role of the MySQL Document Store DBA (4) Getting the Query Explain Plan: Copyright @ 2019 Oracle and/or its affiliates. 109 / 128
  • 110. Role of the MySQL Document Store DBA (4) Getting the Query Explain Plan: It's indeed a full table scan ! What should we do ? Copyright @ 2019 Oracle and/or its affiliates. 110 / 128
  • 111. Role of the MySQL Document Store DBA (5) Create Indexes: Copyright @ 2019 Oracle and/or its affiliates. 111 / 128
  • 112. Role of the MySQL Document Store DBA (5) Create Indexes: For the "old" experienced MySQL DBAs, you can instead use: Copyright @ 2019 Oracle and/or its affiliates. 112 / 128
  • 113. INFO: JSON Notation Shortcut Copyright @ 2019 Oracle and/or its affiliates. 113 / 128
  • 114. Role of the MySQL Document Store DBA (6) Result: Copyright @ 2019 Oracle and/or its affiliates. 114 / 128
  • 115. For the curious: a collection in SQL: Copyright @ 2019 Oracle and/or its affiliates. 115 / 128
  • 116. NEW in MySQL 8.0.17 Multi-valued indexes JSON_CONTAINS() MEMBER OF() new JSON_OVERLAPS() new JSON Schema JSON_SCHEMA_VALID(<json schema>,<json doc>) new JSON_SCHEMA_VALIDATION_REPORT(<json schema>,<json doc>) new Copyright @ 2019 Oracle and/or its affiliates. 116 / 128
  • 117. JSON Multi-Valued Indexes 8.0.17 Copyright @ 2019 Oracle and/or its affiliates. 117 / 128
  • 118. JSON Multi-Valued Indexes 8.0.17 (2) Copyright @ 2019 Oracle and/or its affiliates. 118 / 128
  • 119. JSON Schema Validation 8.0.17 Copyright @ 2019 Oracle and/or its affiliates. 119 / 128
  • 120. JSON Schema Validation (2) 8.0.17 Copyright @ 2019 Oracle and/or its affiliates. 120 / 128
  • 121. JSON Schema Validation (3) 8.0.17 De ne the validation as a constraint: Copyright @ 2019 Oracle and/or its affiliates. 121 / 128
  • 122. JSON Schema Validation (3) 8.0.17 De ne the validation as a constraint: And the result in action: Copyright @ 2019 Oracle and/or its affiliates. 122 / 128
  • 123. what do I gain ? Conclusion Copyright @ 2019 Oracle and/or its affiliates. 123 / 128
  • 124. schemaless exible 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. 124 / 128
  • 127. Thank you ! Copyright @ 2019 Oracle and/or its affiliates. 127 / 128
  • 128. Session Survey Help us make the content even be er. Please complete the session survey in the Mobile App. Copyright @ 2019 Oracle and/or its affiliates. 128 / 128