SlideShare a Scribd company logo
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Using MySQL Shell
High Availability + Document Store
with Python
Cross(X)over between NoSQL and SQL
Ivan Ma
2017-11-04
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes 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 upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
MySQL Document Store Introduction
Components of the MySQL Document Store
The X DevAPI – A modern CRUD App Programming Interface
Documents via SQL
Behind the Scenes – CRUD to SQL Translation
1
2
3
4
5
3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store
Introduction
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Oriented Databases
• Representing complex information, similar to an Object
• JSON (=JavaScript Object Notation)
– Compact, popular and standardized
– Can be represented natively in many languages (JavaScript,
Python etc)
• Other popular encoding formats are XML, YAML etc
What is a Document?
5
{
"_id": "AUT",
"Name": "Austria",
"GNP": 211860,
"IndepYear": 1918,
"demographics": {
"LifeExpectancy": 77.699,
"Population": 8091800
},
"geography": {
"Continent": "Europe",
"Region": "Western Europe",
"SurfaceArea": 83859
}
}
JSON Document Example
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Relational Databases vs Document Store Systems
Relational Model Document Model - JSON
6
id name email city_id
3412 John Smith john@oracle.com 45
id city country_id
45 San Francisco US
customer
city
{
_id: 3412,
name: "John Smith",
email: john@oracle.com,
city: "San Francisco",
country: "US",
orders: [
{date: "2017-08-24", total: 312.20},
{date: "2017-10-02", total: 24.95}
]
}
id id_customer date total
381 3412 2017-08-24 312.20
412 3412 2017-10-02 24.95
shop_order
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
The MySQL Document Store
• Document oriented data storage for MySQL
– Enables working with both, structured and unstructured data
– Exposes new CRUD interface, while keeping SQL
• Standard plugin for MySQL Server (since MySQL 5.7.12)
– Today (2017-10-16 – MySQL 5.7.20 Released)
– MySQL 8.0.3 RC
• Store JSON documents in MySQL
– Through traditional SQL interface
or
– New X DevAPI NoSQL interface (much easier to work with for documents)
7
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Components of the
MySQL Document Store
8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
API / Client
Administration
Server Side
9
MySQL Document Store - Components
MySQL Connectors
MySQL Shell
X Plugin
X DevAPI
X Protocol
MySQL Server
JSON Datatype
New JSON Syntax
New JSON Functions
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• MySQL Server 5.7 or 8.0
• JSON Datatype
• MySQL X Plugin
• Introduces X Protocol for relational- and
document operations
• Maps CRUD operations to standard SQL
(relational tables, JSON datatype and
functions)
• X Protocol
• New MySQL client protocol based on top of
industry standard (Protobuf)
• Works for both, CRUD and SQL operations
• X DevAPI
• New, modern, async developer API for CRUD
and SQL operations on top of X Protocol
• Introduces Collections as new Schema obj.
• MySQL Shell
• Offers interactive X DevAPI mode for app
prototyping
• MySQL Connectors
• Support for X DevAPI and X Session
10
MySQL Document Store – Components
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 11
X Plugin
33060
MySQL Shell
X Protocol
JavaScript / Python
Node.js Application
MySQL Connector/Node.js
...
X DevAPI
X DevAPI
Windows Application
MySQL Connector/Net X DevAPI
MySQL Server
MySQL Server MySQL Server
MySQL Router
MySQL Router
X Plugin
33060
X Plugin
33060
MySQL
InnoDB
cluster
MySQL Document Store
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store running on InnoDB Cluster
• Document Store is tightly connected to InnoDB Cluster
– Main goals: Ease-of-use & Scalability
• Document Store opens an easier path to massive write scale-out
– Sharding with the relational model is hard
– Self contained documents can be sharded much easier
12
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Connector
Application
MySQL Connector
Application
MySQL Shell
MySQL Connector
Application
MySQL Connector
Application
Running Doc Store on MySQL InnoDB Cluster
MySQL
InnoDB
cluster
MySQL Enterprise Monitor
…
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 14
Live Demo
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
The X DevAPI –
A modern CRUD App Programming Interface
15
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• CRUD stands for the following 4 basic operations
– CREATE
– READ
– UPDATE
– DELETE
CRUD
Confidential – Oracle
16
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Examples
• session.get_schemas()
• mydb = session.get_schema(‘world_x’)
• mydb.get_collections()
17
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Examples
• session.get_schemas()
• mydb = session.get_schema(‘world_x’)
• mydb.get_collections()
• mydb.help()
18
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
More examples with DOC operation with MySQL Shell
• mydb.countryinfo.find()
• mydb.create_collectin(‘mytest’);
• mydb.mytest.add( …..)
• mydb.mytest.find()
19
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• The Collection object represents a collection of JSON Documents
Example: python
products = db.create_collection('products');
Collections
Confidential – Oracle
20
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• Add is used to add new JSON Documents to a Collection
Example:
products.add({"_id": 123, "name": "Vacuum Cleaner", "model": "UH20040", "brand":
"Hoover", "price": 79.99}).execute();
products.add({"_id": 124, "name": "Ninja Master Prep", "brand": "Ninja", "model": "QB900B",
"price": 34.88, "material": "Plastic", "color": "Silver"}).execute();
CRUD: Add
Confidential – Oracle
21
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• Find is used to retrieve JSON Documents from a collection
Example:
products.find("price > 10 and price < 100").fields([”_id", "name", "price"]).sort(["name"]).execute();
CRUD: Find
Confidential – Oracle
22
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• Modify is used to update existing JSON Documents of a Collection
Example:
products.modify(”_id = 123").set("dimensions.weight", 50).execute();
CRUD: Modify
Confidential – Oracle
23
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• Remove is used to delete JSON Documents from a Collection
Example:
products.remove("_id = 123");
CRUD: Remove
Confidential – Oracle
24
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• JavaScript / Node.js – Connector/Node.js 8.0.8-dmr
• Get it from npm or https://dev.mysql.com/downloads/connector/nodejs/
• API Reference: https://dev.mysql.com/doc/dev/connector-nodejs/
• C#/.NET – Connector/Net 8.0.9-dmr
• Get it from NuGet or http://dev.mysql.com/downloads/connector/net/
• API Reference: http://dev.mysql.com/doc/dev/connector-net
• Java – Connector/J 8.0.8-dmr
• Get it from http://dev.mysql.com/downloads/connector/j/
• API Reference: https://dev.mysql.com/doc/dev/connector-j/
25
Supported Languages
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• Python – Connector/Python 8.0.5-dmr
• Get it from http://dev.mysql.com/downloads/connector/python/
• API Reference: https://dev.mysql.com/doc/dev/connector-python/
• C++ – Connector/C++ 8.0.6-dmr
• Get it from https://dev.mysql.com/downloads/connector/cpp/
• API Reference: https://dev.mysql.com/doc/dev/connector-cpp/devapi_ref.html
• PHP – MySQL native driver for PHP (soon)
26
Supported Languages
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store - X DevAPI
• X DevAPI Users Guide
– https://dev.mysql.com/doc/x-devapi-userguide/en/
• Using MySQL as a Document Store
– https://dev.mysql.com/doc/refman/5.7/en/document-store.html
27
More information
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Get ready to try the
MySQL Document Store
28
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Getting Ready
• Fast application prototyping using MySQL Shell
– We will write a simple Document Store application in the MySQL Shell
– We will create MySQL InnoDB Cluster of 3 nodes
• Python creating MySQL InnoDB Cluster
• Python to create document store on MySQL InnoDB Cluster
– Accessing Document using CRUD
– Accessing Document using SQL
What is the goal of the demo?
29
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 30
Live Demo
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Documents via SQL
31
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Storage with SQL
• Allows storage of JSON data in a MySQL table column
• Validations on INSERT/UPDATE
• Internal binary storage format allows fast key lookups inside documents
• Use inline JSON in SQL expressions (compare JSON values etc.)
CREATE TABLE mytable (
id INT PRIMARY KEY,
data JSON,
…);
JSON Datatype
Confidential – Oracle
32
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Storage with SQL
• JSON data manipulation in SQL
• Construct JSON values (JSON_OBJECT(), JSON_ARRAY())
• Extract information from JSON objects and arrays (JSON_EXTRACT())
• Modify JSON values (JSON_SET(), JSON_INSERT() etc.)
• Inline JSON Path Syntax to reference values inside JSON data in SQL
– [[schema.]table.]column->'$.field.array[0]'
JSON Functions
Confidential – Oracle
33
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Storage with SQL
• Virtual columns allow indexes on JSON fields
– Create a virtual column to "look into" a JSON document
– Create index on the virtual column
• Foreign keys can also be created on virtual columns
Indexing JSON Data
Confidential – Oracle
34
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Storage with SQL
id name email city_id
3412 John Smith john@oracle.com 45
Use Case: Relational to JSON Data
Confidential – Oracle
35
id city country_id
45 San Francisco US
{
id: 3412,
name: "John Smith",
email: john@oracle.com,
city: "San Francisco",
country: "US"
}
customer
city
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Storage with SQL
Use Case: Relational to JSON Data
Confidential – Oracle
36
SELECT JSON_OBJECT('id', cu.id,
'name', cu.name,
'email', cu.email,
'city', ci.city) as customer
FROM customer cu
JOIN city ci ON ci.id = cu.city_id
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Document Storage with SQL
Use Case: Query JSON Data via SQL
Confidential – Oracle
37
SELECT doc->'$.id' as id,
doc->'$.name' as name,
doc->'$.email' as email
FROM customer
WHERE doc->'$.city' = 'San Francisco'
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store
Behind the Scenes
38
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
How it Works
• Applications use DevAPI connectors to write database operations in native
code (instead of SQL)
• Connector translates DevAPI operations to X protocol document requests
• X Plugin translates document requests to SQL
• Results sent back to application as JSON documents
Confidential – Oracle
39
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 40
MySQL Document Store – How it works
• Existing applications are not touched
– Developers adopt DocStore only if they want to
• X Protocol allows SQL and CRUD
– SQL: SELECT * FROM myTable WHERE id = 12;
– X DevAPI: db.myTable.find("id=12");
• Directly hooked into the optimizer
– Bypass MySQL connection handling
Storage
Optimizer
MySQL
Connection
handling
X Plugin
MySQL Server 5.7 & 8.0
330633060
MySQL Shell
Existing Application
MySQL Connector/ODBC
SQL
Result
Classic MySQL ProtocolX Protocol
JavaScript / Python
Node.js Application
MySQL C/Node.js
...
X DevAPI
X DevAPI
Windows Application
MySQL Connector/Net X DevAPI
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
How it Works: Mapping to SQL
CREATE TABLE `test`.`mycoll` (
doc JSON,
_id VARCHAR(32)
GENERATED ALWAYS AS (doc->>'$._id') STORED
PRIMARY KEY
) CHARSET utf8mb4;
mycollection = create_collection('mycollection')
Confidential – Oracle
41
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
How it Works: Mapping to SQL
INSERT INTO `test`.`mycoll` (doc)
VALUES (
JSON_OBJECT('_id','663807fe367ee6114e0e5458bdac28bf',
'test',1234)
);
mycollection.add({'test': 1234})
Confidential – Oracle
42
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
How it Works: Mapping to SQL
SELECT doc
FROM `test`.`mycoll`
WHERE (JSON_EXTRACT(doc,'$.test') > 100);
mycollection.find("test > 100")
Confidential – Oracle
43
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store
Summary and Take Away
44
• New, modern way to develop database applications
• Combine best of relational and document oriented models
• MySQL InnoDB Cluster – Future proof for HA and scale-out deployments
• Blogs: mysqlserverteam.com/category/docstore/
• https://dev.mysql.com/doc/refman/5.7/en/mysql-shell-tutorial-python.html
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Thank you!
45
20171104 hk-py con-mysql-documentstore_v1
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 47
Ad

More Related Content

What's hot (20)

How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
Mark Swarbrick
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
Morgan Tocker
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
Morgan Tocker
 
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The Dolphin
Olivier DASINI
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
Olivier DASINI
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
Ivan Ma
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
Olivier DASINI
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
Matt Lord
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
Olivier DASINI
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
Mario Beck
 
How to upgrade like a boss to MySQL 8.0 - PLE19
How to upgrade like a boss to MySQL 8.0 -  PLE19How to upgrade like a boss to MySQL 8.0 -  PLE19
How to upgrade like a boss to MySQL 8.0 - PLE19
Alkin Tezuysal
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
Mario Beck
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
Mario Beck
 
Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019
Alkin Tezuysal
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
Olivier DASINI
 
replic8 - Replication in MySQL 8
replic8 - Replication in MySQL 8replic8 - Replication in MySQL 8
replic8 - Replication in MySQL 8
Sven Sandberg
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
Ted Wennmark
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8
Olivier DASINI
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demo
Keith Hollman
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
Mark Swarbrick
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
Morgan Tocker
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
Morgan Tocker
 
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The Dolphin
Olivier DASINI
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
Olivier DASINI
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
Ivan Ma
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
Olivier DASINI
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
Matt Lord
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
Olivier DASINI
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
Mario Beck
 
How to upgrade like a boss to MySQL 8.0 - PLE19
How to upgrade like a boss to MySQL 8.0 -  PLE19How to upgrade like a boss to MySQL 8.0 -  PLE19
How to upgrade like a boss to MySQL 8.0 - PLE19
Alkin Tezuysal
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
Mario Beck
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
Mario Beck
 
Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019
Alkin Tezuysal
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
Olivier DASINI
 
replic8 - Replication in MySQL 8
replic8 - Replication in MySQL 8replic8 - Replication in MySQL 8
replic8 - Replication in MySQL 8
Sven Sandberg
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8
Olivier DASINI
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demo
Keith Hollman
 

Viewers also liked (20)

Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL Fabric
Mats Kindahl
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Ontico
 
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
Mats Kindahl
 
Exploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better TogetherExploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better Together
ObjectRocket
 
Strip your TEXT fields
Strip your TEXT fieldsStrip your TEXT fields
Strip your TEXT fields
Gabriela Ferrara
 
Coding like a girl - DjangoCon
Coding like a girl - DjangoConCoding like a girl - DjangoCon
Coding like a girl - DjangoCon
Gabriela Ferrara
 
Sharding using MySQL and PHP
Sharding using MySQL and PHPSharding using MySQL and PHP
Sharding using MySQL and PHP
Mats Kindahl
 
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
LaravelSP - MySQL 5.7: introdução ao JSON Data TypeLaravelSP - MySQL 5.7: introdução ao JSON Data Type
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
Gabriela Ferrara
 
MySQL 5.7 - 
Tirando o Máximo Proveito
MySQL 5.7 - 
Tirando o Máximo ProveitoMySQL 5.7 - 
Tirando o Máximo Proveito
MySQL 5.7 - 
Tirando o Máximo Proveito
Gabriela Ferrara
 
LAMP: Desenvolvendo além do trivial
LAMP: Desenvolvendo além do trivialLAMP: Desenvolvendo além do trivial
LAMP: Desenvolvendo além do trivial
Gabriela Ferrara
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
José Moreno
 
Mongodb
MongodbMongodb
Mongodb
Apurva Vyas
 
Strip your TEXT fields - Exeter Web Feb/2016
Strip your TEXT fields - Exeter Web Feb/2016Strip your TEXT fields - Exeter Web Feb/2016
Strip your TEXT fields - Exeter Web Feb/2016
Gabriela Ferrara
 
[스마트스터디]MongoDB 의 역습
[스마트스터디]MongoDB 의 역습[스마트스터디]MongoDB 의 역습
[스마트스터디]MongoDB 의 역습
smartstudy_official
 
MySQL Enterprise Cloud
MySQL Enterprise Cloud MySQL Enterprise Cloud
MySQL Enterprise Cloud
Mark Swarbrick
 
MySQL Cluster Whats New
MySQL Cluster Whats NewMySQL Cluster Whats New
MySQL Cluster Whats New
Mark Swarbrick
 
The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016
Colin Charles
 
SunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQLSunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQL
Gabriela Ferrara
 
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 
Laravel 5 and SOLID
Laravel 5 and SOLIDLaravel 5 and SOLID
Laravel 5 and SOLID
Igor Talevski
 
Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL Fabric
Mats Kindahl
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Ontico
 
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
Mats Kindahl
 
Exploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better TogetherExploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better Together
ObjectRocket
 
Coding like a girl - DjangoCon
Coding like a girl - DjangoConCoding like a girl - DjangoCon
Coding like a girl - DjangoCon
Gabriela Ferrara
 
Sharding using MySQL and PHP
Sharding using MySQL and PHPSharding using MySQL and PHP
Sharding using MySQL and PHP
Mats Kindahl
 
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
LaravelSP - MySQL 5.7: introdução ao JSON Data TypeLaravelSP - MySQL 5.7: introdução ao JSON Data Type
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
Gabriela Ferrara
 
MySQL 5.7 - 
Tirando o Máximo Proveito
MySQL 5.7 - 
Tirando o Máximo ProveitoMySQL 5.7 - 
Tirando o Máximo Proveito
MySQL 5.7 - 
Tirando o Máximo Proveito
Gabriela Ferrara
 
LAMP: Desenvolvendo além do trivial
LAMP: Desenvolvendo além do trivialLAMP: Desenvolvendo além do trivial
LAMP: Desenvolvendo além do trivial
Gabriela Ferrara
 
Strip your TEXT fields - Exeter Web Feb/2016
Strip your TEXT fields - Exeter Web Feb/2016Strip your TEXT fields - Exeter Web Feb/2016
Strip your TEXT fields - Exeter Web Feb/2016
Gabriela Ferrara
 
[스마트스터디]MongoDB 의 역습
[스마트스터디]MongoDB 의 역습[스마트스터디]MongoDB 의 역습
[스마트스터디]MongoDB 의 역습
smartstudy_official
 
MySQL Enterprise Cloud
MySQL Enterprise Cloud MySQL Enterprise Cloud
MySQL Enterprise Cloud
Mark Swarbrick
 
MySQL Cluster Whats New
MySQL Cluster Whats NewMySQL Cluster Whats New
MySQL Cluster Whats New
Mark Swarbrick
 
The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016
Colin Charles
 
SunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQLSunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQL
Gabriela Ferrara
 
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 
Ad

Similar to 20171104 hk-py con-mysql-documentstore_v1 (20)

Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDevelop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPI
Dave Stokes
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
Olivier DASINI
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIMySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
Rui Quelhas
 
MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017
MySQL Brasil
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document Store
Rui Quelhas
 
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
Cloud Native Day Tel Aviv
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JSMySQL Document Store and Node.JS
MySQL Document Store and Node.JS
Reggie Burnett
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
Miguel Araújo
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
OracleMySQL
 
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
 
Python and the MySQL Document Store
Python and the MySQL Document StorePython and the MySQL Document Store
Python and the MySQL Document Store
Jesper Wisborg Krogh
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
Ivan Ma
 
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
 
Introduction to MySQL Document Store
Introduction to MySQL Document StoreIntroduction to MySQL Document Store
Introduction to MySQL Document Store
Frederic Descamps
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
Matt Lord
 
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
Dave Stokes
 
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
Dave Stokes
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
Olivier DASINI
 
Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019
Dave Stokes
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDevelop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPI
Dave Stokes
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
Olivier DASINI
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIMySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
Rui Quelhas
 
MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017
MySQL Brasil
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document Store
Rui Quelhas
 
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
Cloud Native Day Tel Aviv
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JSMySQL Document Store and Node.JS
MySQL Document Store and Node.JS
Reggie Burnett
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
Miguel Araújo
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
OracleMySQL
 
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
 
Python and the MySQL Document Store
Python and the MySQL Document StorePython and the MySQL Document Store
Python and the MySQL Document Store
Jesper Wisborg Krogh
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
Ivan Ma
 
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
 
Introduction to MySQL Document Store
Introduction to MySQL Document StoreIntroduction to MySQL Document Store
Introduction to MySQL Document Store
Frederic Descamps
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
Matt Lord
 
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
Dave Stokes
 
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
Dave Stokes
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
Olivier DASINI
 
Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019
Dave Stokes
 
Ad

More from Ivan Ma (14)

Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
Ivan Ma
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
Ivan Ma
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
Ivan Ma
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
Ivan Ma
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Ivan Ma
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
Ivan Ma
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
Ivan Ma
 
Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07
Ivan Ma
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
Ivan Ma
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
Ivan Ma
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
Ivan Ma
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
Ivan Ma
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
Ivan Ma
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
Ivan Ma
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
Ivan Ma
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
Ivan Ma
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Ivan Ma
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
Ivan Ma
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
Ivan Ma
 
Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07
Ivan Ma
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
Ivan Ma
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
Ivan Ma
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
Ivan Ma
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
Ivan Ma
 

Recently uploaded (20)

AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 

20171104 hk-py con-mysql-documentstore_v1

  • 1. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Using MySQL Shell High Availability + Document Store with Python Cross(X)over between NoSQL and SQL Ivan Ma 2017-11-04
  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes 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 upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda MySQL Document Store Introduction Components of the MySQL Document Store The X DevAPI – A modern CRUD App Programming Interface Documents via SQL Behind the Scenes – CRUD to SQL Translation 1 2 3 4 5 3
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store Introduction 4
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Oriented Databases • Representing complex information, similar to an Object • JSON (=JavaScript Object Notation) – Compact, popular and standardized – Can be represented natively in many languages (JavaScript, Python etc) • Other popular encoding formats are XML, YAML etc What is a Document? 5 { "_id": "AUT", "Name": "Austria", "GNP": 211860, "IndepYear": 1918, "demographics": { "LifeExpectancy": 77.699, "Population": 8091800 }, "geography": { "Continent": "Europe", "Region": "Western Europe", "SurfaceArea": 83859 } } JSON Document Example
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Relational Databases vs Document Store Systems Relational Model Document Model - JSON 6 id name email city_id 3412 John Smith [email protected] 45 id city country_id 45 San Francisco US customer city { _id: 3412, name: "John Smith", email: [email protected], city: "San Francisco", country: "US", orders: [ {date: "2017-08-24", total: 312.20}, {date: "2017-10-02", total: 24.95} ] } id id_customer date total 381 3412 2017-08-24 312.20 412 3412 2017-10-02 24.95 shop_order
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | The MySQL Document Store • Document oriented data storage for MySQL – Enables working with both, structured and unstructured data – Exposes new CRUD interface, while keeping SQL • Standard plugin for MySQL Server (since MySQL 5.7.12) – Today (2017-10-16 – MySQL 5.7.20 Released) – MySQL 8.0.3 RC • Store JSON documents in MySQL – Through traditional SQL interface or – New X DevAPI NoSQL interface (much easier to work with for documents) 7
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Components of the MySQL Document Store 8
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | API / Client Administration Server Side 9 MySQL Document Store - Components MySQL Connectors MySQL Shell X Plugin X DevAPI X Protocol MySQL Server JSON Datatype New JSON Syntax New JSON Functions
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | • MySQL Server 5.7 or 8.0 • JSON Datatype • MySQL X Plugin • Introduces X Protocol for relational- and document operations • Maps CRUD operations to standard SQL (relational tables, JSON datatype and functions) • X Protocol • New MySQL client protocol based on top of industry standard (Protobuf) • Works for both, CRUD and SQL operations • X DevAPI • New, modern, async developer API for CRUD and SQL operations on top of X Protocol • Introduces Collections as new Schema obj. • MySQL Shell • Offers interactive X DevAPI mode for app prototyping • MySQL Connectors • Support for X DevAPI and X Session 10 MySQL Document Store – Components
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 11 X Plugin 33060 MySQL Shell X Protocol JavaScript / Python Node.js Application MySQL Connector/Node.js ... X DevAPI X DevAPI Windows Application MySQL Connector/Net X DevAPI MySQL Server MySQL Server MySQL Server MySQL Router MySQL Router X Plugin 33060 X Plugin 33060 MySQL InnoDB cluster MySQL Document Store
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store running on InnoDB Cluster • Document Store is tightly connected to InnoDB Cluster – Main goals: Ease-of-use & Scalability • Document Store opens an easier path to massive write scale-out – Sharding with the relational model is hard – Self contained documents can be sharded much easier 12
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Connector Application MySQL Connector Application MySQL Shell MySQL Connector Application MySQL Connector Application Running Doc Store on MySQL InnoDB Cluster MySQL InnoDB cluster MySQL Enterprise Monitor …
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 14 Live Demo
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | The X DevAPI – A modern CRUD App Programming Interface 15
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • CRUD stands for the following 4 basic operations – CREATE – READ – UPDATE – DELETE CRUD Confidential – Oracle 16
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Examples • session.get_schemas() • mydb = session.get_schema(‘world_x’) • mydb.get_collections() 17
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Examples • session.get_schemas() • mydb = session.get_schema(‘world_x’) • mydb.get_collections() • mydb.help() 18
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | More examples with DOC operation with MySQL Shell • mydb.countryinfo.find() • mydb.create_collectin(‘mytest’); • mydb.mytest.add( …..) • mydb.mytest.find() 19
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • The Collection object represents a collection of JSON Documents Example: python products = db.create_collection('products'); Collections Confidential – Oracle 20
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • Add is used to add new JSON Documents to a Collection Example: products.add({"_id": 123, "name": "Vacuum Cleaner", "model": "UH20040", "brand": "Hoover", "price": 79.99}).execute(); products.add({"_id": 124, "name": "Ninja Master Prep", "brand": "Ninja", "model": "QB900B", "price": 34.88, "material": "Plastic", "color": "Silver"}).execute(); CRUD: Add Confidential – Oracle 21
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • Find is used to retrieve JSON Documents from a collection Example: products.find("price > 10 and price < 100").fields([”_id", "name", "price"]).sort(["name"]).execute(); CRUD: Find Confidential – Oracle 22
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • Modify is used to update existing JSON Documents of a Collection Example: products.modify(”_id = 123").set("dimensions.weight", 50).execute(); CRUD: Modify Confidential – Oracle 23
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • Remove is used to delete JSON Documents from a Collection Example: products.remove("_id = 123"); CRUD: Remove Confidential – Oracle 24
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • JavaScript / Node.js – Connector/Node.js 8.0.8-dmr • Get it from npm or https://dev.mysql.com/downloads/connector/nodejs/ • API Reference: https://dev.mysql.com/doc/dev/connector-nodejs/ • C#/.NET – Connector/Net 8.0.9-dmr • Get it from NuGet or http://dev.mysql.com/downloads/connector/net/ • API Reference: http://dev.mysql.com/doc/dev/connector-net • Java – Connector/J 8.0.8-dmr • Get it from http://dev.mysql.com/downloads/connector/j/ • API Reference: https://dev.mysql.com/doc/dev/connector-j/ 25 Supported Languages
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • Python – Connector/Python 8.0.5-dmr • Get it from http://dev.mysql.com/downloads/connector/python/ • API Reference: https://dev.mysql.com/doc/dev/connector-python/ • C++ – Connector/C++ 8.0.6-dmr • Get it from https://dev.mysql.com/downloads/connector/cpp/ • API Reference: https://dev.mysql.com/doc/dev/connector-cpp/devapi_ref.html • PHP – MySQL native driver for PHP (soon) 26 Supported Languages
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store - X DevAPI • X DevAPI Users Guide – https://dev.mysql.com/doc/x-devapi-userguide/en/ • Using MySQL as a Document Store – https://dev.mysql.com/doc/refman/5.7/en/document-store.html 27 More information
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Get ready to try the MySQL Document Store 28
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Getting Ready • Fast application prototyping using MySQL Shell – We will write a simple Document Store application in the MySQL Shell – We will create MySQL InnoDB Cluster of 3 nodes • Python creating MySQL InnoDB Cluster • Python to create document store on MySQL InnoDB Cluster – Accessing Document using CRUD – Accessing Document using SQL What is the goal of the demo? 29
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 30 Live Demo
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Documents via SQL 31
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Storage with SQL • Allows storage of JSON data in a MySQL table column • Validations on INSERT/UPDATE • Internal binary storage format allows fast key lookups inside documents • Use inline JSON in SQL expressions (compare JSON values etc.) CREATE TABLE mytable ( id INT PRIMARY KEY, data JSON, …); JSON Datatype Confidential – Oracle 32
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Storage with SQL • JSON data manipulation in SQL • Construct JSON values (JSON_OBJECT(), JSON_ARRAY()) • Extract information from JSON objects and arrays (JSON_EXTRACT()) • Modify JSON values (JSON_SET(), JSON_INSERT() etc.) • Inline JSON Path Syntax to reference values inside JSON data in SQL – [[schema.]table.]column->'$.field.array[0]' JSON Functions Confidential – Oracle 33
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Storage with SQL • Virtual columns allow indexes on JSON fields – Create a virtual column to "look into" a JSON document – Create index on the virtual column • Foreign keys can also be created on virtual columns Indexing JSON Data Confidential – Oracle 34
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Storage with SQL id name email city_id 3412 John Smith [email protected] 45 Use Case: Relational to JSON Data Confidential – Oracle 35 id city country_id 45 San Francisco US { id: 3412, name: "John Smith", email: [email protected], city: "San Francisco", country: "US" } customer city
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Storage with SQL Use Case: Relational to JSON Data Confidential – Oracle 36 SELECT JSON_OBJECT('id', cu.id, 'name', cu.name, 'email', cu.email, 'city', ci.city) as customer FROM customer cu JOIN city ci ON ci.id = cu.city_id
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Document Storage with SQL Use Case: Query JSON Data via SQL Confidential – Oracle 37 SELECT doc->'$.id' as id, doc->'$.name' as name, doc->'$.email' as email FROM customer WHERE doc->'$.city' = 'San Francisco'
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store Behind the Scenes 38
  • 39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | How it Works • Applications use DevAPI connectors to write database operations in native code (instead of SQL) • Connector translates DevAPI operations to X protocol document requests • X Plugin translates document requests to SQL • Results sent back to application as JSON documents Confidential – Oracle 39
  • 40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 40 MySQL Document Store – How it works • Existing applications are not touched – Developers adopt DocStore only if they want to • X Protocol allows SQL and CRUD – SQL: SELECT * FROM myTable WHERE id = 12; – X DevAPI: db.myTable.find("id=12"); • Directly hooked into the optimizer – Bypass MySQL connection handling Storage Optimizer MySQL Connection handling X Plugin MySQL Server 5.7 & 8.0 330633060 MySQL Shell Existing Application MySQL Connector/ODBC SQL Result Classic MySQL ProtocolX Protocol JavaScript / Python Node.js Application MySQL C/Node.js ... X DevAPI X DevAPI Windows Application MySQL Connector/Net X DevAPI
  • 41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | How it Works: Mapping to SQL CREATE TABLE `test`.`mycoll` ( doc JSON, _id VARCHAR(32) GENERATED ALWAYS AS (doc->>'$._id') STORED PRIMARY KEY ) CHARSET utf8mb4; mycollection = create_collection('mycollection') Confidential – Oracle 41
  • 42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | How it Works: Mapping to SQL INSERT INTO `test`.`mycoll` (doc) VALUES ( JSON_OBJECT('_id','663807fe367ee6114e0e5458bdac28bf', 'test',1234) ); mycollection.add({'test': 1234}) Confidential – Oracle 42
  • 43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | How it Works: Mapping to SQL SELECT doc FROM `test`.`mycoll` WHERE (JSON_EXTRACT(doc,'$.test') > 100); mycollection.find("test > 100") Confidential – Oracle 43
  • 44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store Summary and Take Away 44 • New, modern way to develop database applications • Combine best of relational and document oriented models • MySQL InnoDB Cluster – Future proof for HA and scale-out deployments • Blogs: mysqlserverteam.com/category/docstore/ • https://dev.mysql.com/doc/refman/5.7/en/mysql-shell-tutorial-python.html
  • 45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Thank you! 45
  • 47. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 47