SlideShare a Scribd company logo
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL as a Document Store
Mario Beck
MySQL Sales Consulting Manager EMEA
mario.beck@oracle.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following 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.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
MySQL Document Store
MySQL Future
1
2
3
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
MySQL Document Store
MySQL Future
1
2
4
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Today’s Challenges
• Developers want to move faster
• Time to market has a premium value
• Rapid prototyping, iterate fast…
5
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
InnoDB Storage Engine
mysqld process
Advantages of SQL and NoSQL
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
SQL
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Our Objective: Leverage the Infrastructure
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7
Clients and Applications
InnoDB Storage Engine
mysqld process
Firewall
Audit
Encryption
Authentication
Online Backup
Monitoring
Integration
Support
3rd Party Tools
3rd Party Tools
3rd Party Tools
3rd Party Tools
3rd Party Tools
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
SQL
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
NEW! MySQL Document Store
• Native JSON Documents in MySQL 5.7
– Schema-less Document Storage
• X Protocol (MySQL 5.7.12 DMR)
– Implemented by X Plugin to Extend MySQL Server as a Document Store
• X Dev API
– SQL and Document CRUD Operations
– Implemented in Connector/Node.js, Connector/J, Connector/Net
• MySQL Shell
– Javascript, Python, SQL modes
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Indexing JSON data
• Use Functional Indexes,
• STORED and VIRTUAL types are supported
9
CREATE TABLE employees (data JSON);
ALTER TABLE employees
ADD COLUMN name VARCHAR(30) AS (JSON_UNQUOTE(data->”$.name”)) VIRTUAL,
ADD INDEX name_idx (name);
SELECT data FROM employees WHERE name = ”Simone”;
SELECT data FROM employees WHERE JSON_UNQUOTE(data->”$.name”) = ”Simone”;
• Column – generated from the expression – extracts attribute
• Index on virtual column
• Optimizer uses index automatically
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Architecture
10
MySQL
Plugins
X Protocol Plugin Memcached Plugin
Core
X ProtocolStd Protocol
X Protocol
33060
Std Protocol
3306
SQL API CRUD API
X and Std
Protocols
MySQL
Shell
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
New! MySQL X DevAPI
• Modern: fluent API, method chaining
• Stateless sessions enable transparent scaling to multi-server environments
• SQL support
• CRUD for Collections of Documents and Tables
– Documents as simple basic domain objects
– Search expressions match SQL SELECT expressions
• Implemented in MySQL Shell & MySQL Connectors
– NEW! MySQL Connector/node.js
– MySQL Connector/J
– MySQL Connector/Net
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
New! MySQL Shell
• Integrated Development and Administration Shell
• Exposes New X DevAPI
• Multi-Language scripting
– JavaScript, Python, and SQL
• Configurable results formats
– Traditional Table, JSON, Tab Separated
1
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13
tomas@localhost $ mysqlsh --uri root@localhost/test
Creating an X Session to root@localhost:33060/test
Enter password:
Default schema `test` accessible through db.
…
Currently in JavaScript mode. Use sql to switch to SQL mode and execute queries.
mysql-js> db.createCollection("posts");
<Collection:posts>
mysql-js> db.posts.add({"title":"Hello World", "text":"First post!"})
Query OK, 1 item affected (0.03 sec)
mysql-js> db.posts.find("title = 'Hello World'").sort(["title"]);
[
{
"_id": "8202bda28206e611140b3229389b6526",
"text": "First post!",
"title": "Hello World"
}
]
1 document in set (0.01 sec)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 14
Under the Hood
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 15
Collections are tables
Tables with:
- JSON column
- Generated Column
Create a Collection
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Under The Hood II
16
• X-Plugin translates CRUD -> SQL
• No code changes in core parts of MYSQL
Create Document (CRUD)
Look inside general-log
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Under The Hood III
17
Read Document (CRUD)
Look inside general-log
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CRUD Operations – NoSQL/Document and SQL/Relational
Operation Document Relational
Create Collection.add() Table.insert()
Read Collection.find() Table.select()
Update Collection.modify() Table.update()
Delete Collection.remove() Table.delete()
18
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CRUD Operations
NoSQL/Document
Javascript Java
C#NodeJS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CRUD Operations in php
NoSQL/Document
/* open a new connection */
$session = mysql_xdevapigetSession("localhost","root", "secretpwd");
/* CREATE a new collection and document*/
$schema = $session->getSchema("products");
$collection = $schema->createCollection("best_products");
$product = array('name' => 'superdent', ' quantity' => 42);
$collection->add($product)->execute();
/* READ documents */
$largestock = $collection->find()->sort(“quantity desc")->limit(3)->execute();
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CRUD Operations in php
NoSQL/Document
/* UPDATE a document*/
$collection->modify("name like 'SuperDent'")->set(“quantity", 15)->execute();
$collection->modify("name like :pr_name")->bind(["pr_name" => $productName])->
set(“quantity", 15)->execute();
$collection->modify(“quantity < 10")->set("comment", "order more")->execute();
/* DELETE documents */
$collection->remove("name like 'Super%'")->execute();
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CRUD Operations
SQL/Relational
22
Javascript Java
C#NodeJS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
MySQL Document Store
MySQL Future
1
2
23
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Vision
24
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
“Be the most popular open source
database for scale-out”
25
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
“Be the most popular open source
database for scale-out”
26
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
3 MySQL will focus on three things.
27
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 28
Scale-Out
Ease-of-Use
Out-of-Box
Solution
MySQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29
Ease-of-Use
• Download, Install, HA & Scale-Out in 15 minutes
• Single Interface for Everything MySQL
• Easy to Setup, Scale-Out, Manage & Monitor
• Excellent Quality
MySQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30
Out-of-Box Solution
• Integrated Solution vs. Individual Components
• Designed & Developed Together
• Tested & Delivered Together
• Managed & Monitored Together
MySQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 31
Scale-Out
• Maintain World-Class Performance
• Rock Solid, Server-Side HA With Auto-Failover
• Read Scale-Out With Replication
• Write Scale-Out With Sharding
MySQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
4 Rollout will happen in four steps.
32
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 33
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – 4 Steps
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Introducing …
34
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 35
Scale-Out
High Performance
Ease-of-Use
Built-in HA
Out-of-Box Solution
Everything Integrated
MySQL
InnoDB
cluster
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36
A single product: MySQL
• All components created together
• Tested together
• Packaged together
Flexible and Modern
• C++ 11
• Protocol Buffers
• Developer friendly
MySQL InnoDB Cluster – Goals
Easy to use
• A single client: MySQL Shell
• Easy packaging
• Homogenous servers
Scale-out
• Sharded clusters
• Federated system of N replica sets
• Each replica set manages a shard
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL
InnoDB
cluster
MySQL InnoDB Cluster – Architecture - S2
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
Group Replication
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
MySQL InnoDB Cluster – Architecture - S3 MySQL
InnoDB
cluster
Read-Only Slaves
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
ReplicaSet(Shard1)
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
HA
ReplicaSet(Shard2)
S1 S2 S3
M
M M
H
ReplicaSet(Shard3)
MySQL Connector
Application
MySQL Router
MySQL InnoDB Cluster – Architecture - S4 MySQL
InnoDB
cluster
…
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell – Deploy MySQL Instances
shell> mysqlsh
mysql-js> dba.deployLocalInstance(3306)
mysql-js> dba.deployInstance(‘hanode2:3306’)
mysql-js> dba.deployInstance(‘hanode3:3306’)
40
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell – Create an InnoDB Cluster
mysql-js> connect root@hanode1:3306
mysql-js> cluster = dba.createCluster(‘NewAppCluster')
mysql-js> cluster.addInstance('root@hanode2:3306')
mysql-js> cluster.addInstance('root@hanode3:3306')
41
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell – Add a MySQL Router
shell> mysqlrouter --bootstrap hanode1:3306
shell> mysqlrouter &
shell> mysqlsh --uri root@localhost:6446
42
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
InnoDB Storage Engine
mysqld process
Advantages of SQL and NoSQL
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
SQL
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 43
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Our Objective: Leverage the Infrastructure
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 44
Clients and Applications
InnoDB Storage Engine
mysqld process
Firewall
Audit
Encryption
Authentication
Online Backup
Monitoring
Integration
Support
3rd Party Tools
3rd Party Tools
3rd Party Tools
3rd Party Tools
3rd Party Tools
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
SQL
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Our Objective: Empower Application Developers
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 45
Clients and Applications
InnoDB Storage Engine
mysqld process
Firewall
Audit
Encryption
Authentication
Online Backup
Monitoring
Integration
Support
3rd Party Tools
3rd Party Tools
3rd Party Tools
3rd Party Tools
3rd Party Tools
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
SQL
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Resources
Topic Link(s)
MySQL as a Document Database http://dev.mysql.com/doc/refman/5.7/en/document-database.html
MySQL Shell http://dev.mysql.com/doc/refman/5.7/en/mysql-shell.html
http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-javascript.html
http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-python.html
X Dev API http://dev.mysql.com/doc/x-devapi-userguide/en/
X Plugin http://dev.mysql.com/doc/refman/5.7/en/x-plugin.html
MySQL JSON http://mysqlserverteam.com/tag/json/
https://dev.mysql.com/doc/refman/5.7/en/json.html
https://dev.mysql.com/doc/refman/5.7/en/json-functions.html
46
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Thank you!

More Related Content

What's hot

MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
Olivier DASINI
 
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 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
 
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
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
Mario Beck
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
Morgan Tocker
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
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 Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
Mario Beck
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
Matt Lord
 
MySQL Enterprise Edition Overview
MySQL Enterprise Edition OverviewMySQL Enterprise Edition Overview
MySQL Enterprise Edition Overview
Mario Beck
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
Olivier DASINI
 
MySQL Security
MySQL SecurityMySQL Security
MySQL Security
Mario Beck
 
MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on Replication
Mario Beck
 
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 @ the University Of Nottingham
MySQL @ the University Of NottinghamMySQL @ the University Of Nottingham
MySQL @ the University Of Nottingham
Mark Swarbrick
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
Ted Wennmark
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
Ted Wennmark
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
Mark Swarbrick
 
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
 

What's hot (20)

MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
 
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
 
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
 
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...
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL Enterprise Edition Overview
MySQL Enterprise Edition OverviewMySQL Enterprise Edition Overview
MySQL Enterprise Edition Overview
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
 
MySQL Security
MySQL SecurityMySQL Security
MySQL Security
 
MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on Replication
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
MySQL @ the University Of Nottingham
MySQL @ the University Of NottinghamMySQL @ the University Of Nottingham
MySQL @ the University Of Nottingham
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
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
 

Similar to MySQL Document Store

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
 
RMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New FeaturesRMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New Features
Dave Stokes
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
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 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 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
 
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
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
Bruno Borges
 
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 HA
MySQL HAMySQL HA
MySQL HA
Ted Wennmark
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
MySQL Brasil
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Manuel Contreras
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
Tommy Lee
 
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...Geir Høydalsvik
 
MySQL 8 loves JavaScript
MySQL 8 loves JavaScript MySQL 8 loves JavaScript
MySQL 8 loves JavaScript
Sanjay Manwani
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17
MySQL Brasil
 
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
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016Geir Høydalsvik
 
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
 

Similar to MySQL Document Store (20)

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
 
RMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New FeaturesRMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New Features
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
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
 
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
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
 
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.
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
 
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
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
 
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
MySQL 8 loves JavaScript
MySQL 8 loves JavaScript MySQL 8 loves JavaScript
MySQL 8 loves JavaScript
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17
 
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
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
 
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 ?
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

MySQL Document Store

  • 1. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | MySQL as a Document Store Mario Beck MySQL Sales Consulting Manager EMEA mario.beck@oracle.com
  • 2. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following 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.
  • 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Program Agenda MySQL Document Store MySQL Future 1 2 3
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Program Agenda MySQL Document Store MySQL Future 1 2 4
  • 5. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Today’s Challenges • Developers want to move faster • Time to market has a premium value • Rapid prototyping, iterate fast… 5
  • 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | InnoDB Storage Engine mysqld process Advantages of SQL and NoSQL NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation SQL Complex queries with joins ACID transactions Well defined schemas Rich set of tools Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6
  • 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Our Objective: Leverage the Infrastructure Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7 Clients and Applications InnoDB Storage Engine mysqld process Firewall Audit Encryption Authentication Online Backup Monitoring Integration Support 3rd Party Tools 3rd Party Tools 3rd Party Tools 3rd Party Tools 3rd Party Tools NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation SQL Complex queries with joins ACID transactions Well defined schemas Rich set of tools
  • 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | NEW! MySQL Document Store • Native JSON Documents in MySQL 5.7 – Schema-less Document Storage • X Protocol (MySQL 5.7.12 DMR) – Implemented by X Plugin to Extend MySQL Server as a Document Store • X Dev API – SQL and Document CRUD Operations – Implemented in Connector/Node.js, Connector/J, Connector/Net • MySQL Shell – Javascript, Python, SQL modes
  • 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Indexing JSON data • Use Functional Indexes, • STORED and VIRTUAL types are supported 9 CREATE TABLE employees (data JSON); ALTER TABLE employees ADD COLUMN name VARCHAR(30) AS (JSON_UNQUOTE(data->”$.name”)) VIRTUAL, ADD INDEX name_idx (name); SELECT data FROM employees WHERE name = ”Simone”; SELECT data FROM employees WHERE JSON_UNQUOTE(data->”$.name”) = ”Simone”; • Column – generated from the expression – extracts attribute • Index on virtual column • Optimizer uses index automatically
  • 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Architecture 10 MySQL Plugins X Protocol Plugin Memcached Plugin Core X ProtocolStd Protocol X Protocol 33060 Std Protocol 3306 SQL API CRUD API X and Std Protocols MySQL Shell
  • 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | New! MySQL X DevAPI • Modern: fluent API, method chaining • Stateless sessions enable transparent scaling to multi-server environments • SQL support • CRUD for Collections of Documents and Tables – Documents as simple basic domain objects – Search expressions match SQL SELECT expressions • Implemented in MySQL Shell & MySQL Connectors – NEW! MySQL Connector/node.js – MySQL Connector/J – MySQL Connector/Net
  • 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | New! MySQL Shell • Integrated Development and Administration Shell • Exposes New X DevAPI • Multi-Language scripting – JavaScript, Python, and SQL • Configurable results formats – Traditional Table, JSON, Tab Separated 1
  • 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13 tomas@localhost $ mysqlsh --uri root@localhost/test Creating an X Session to root@localhost:33060/test Enter password: Default schema `test` accessible through db. … Currently in JavaScript mode. Use sql to switch to SQL mode and execute queries. mysql-js> db.createCollection("posts"); <Collection:posts> mysql-js> db.posts.add({"title":"Hello World", "text":"First post!"}) Query OK, 1 item affected (0.03 sec) mysql-js> db.posts.find("title = 'Hello World'").sort(["title"]); [ { "_id": "8202bda28206e611140b3229389b6526", "text": "First post!", "title": "Hello World" } ] 1 document in set (0.01 sec)
  • 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 14 Under the Hood
  • 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 15 Collections are tables Tables with: - JSON column - Generated Column Create a Collection
  • 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Under The Hood II 16 • X-Plugin translates CRUD -> SQL • No code changes in core parts of MYSQL Create Document (CRUD) Look inside general-log
  • 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Under The Hood III 17 Read Document (CRUD) Look inside general-log
  • 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | CRUD Operations – NoSQL/Document and SQL/Relational Operation Document Relational Create Collection.add() Table.insert() Read Collection.find() Table.select() Update Collection.modify() Table.update() Delete Collection.remove() Table.delete() 18
  • 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | CRUD Operations NoSQL/Document Javascript Java C#NodeJS
  • 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | CRUD Operations in php NoSQL/Document /* open a new connection */ $session = mysql_xdevapigetSession("localhost","root", "secretpwd"); /* CREATE a new collection and document*/ $schema = $session->getSchema("products"); $collection = $schema->createCollection("best_products"); $product = array('name' => 'superdent', ' quantity' => 42); $collection->add($product)->execute(); /* READ documents */ $largestock = $collection->find()->sort(“quantity desc")->limit(3)->execute();
  • 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | CRUD Operations in php NoSQL/Document /* UPDATE a document*/ $collection->modify("name like 'SuperDent'")->set(“quantity", 15)->execute(); $collection->modify("name like :pr_name")->bind(["pr_name" => $productName])-> set(“quantity", 15)->execute(); $collection->modify(“quantity < 10")->set("comment", "order more")->execute(); /* DELETE documents */ $collection->remove("name like 'Super%'")->execute();
  • 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | CRUD Operations SQL/Relational 22 Javascript Java C#NodeJS
  • 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Program Agenda MySQL Document Store MySQL Future 1 2 23
  • 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Vision 24
  • 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | “Be the most popular open source database for scale-out” 25
  • 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | “Be the most popular open source database for scale-out” 26
  • 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 3 MySQL will focus on three things. 27
  • 28. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 28 Scale-Out Ease-of-Use Out-of-Box Solution MySQL
  • 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29 Ease-of-Use • Download, Install, HA & Scale-Out in 15 minutes • Single Interface for Everything MySQL • Easy to Setup, Scale-Out, Manage & Monitor • Excellent Quality MySQL
  • 30. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30 Out-of-Box Solution • Integrated Solution vs. Individual Components • Designed & Developed Together • Tested & Delivered Together • Managed & Monitored Together MySQL
  • 31. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 31 Scale-Out • Maintain World-Class Performance • Rock Solid, Server-Side HA With Auto-Failover • Read Scale-Out With Replication • Write Scale-Out With Sharding MySQL
  • 32. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4 Rollout will happen in four steps. 32
  • 33. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 33 Read Scale-Out Async Replication + Auto Failover Write Scale-Out Sharding S1 S2 S3 S4 MySQL Vision – 4 Steps Timeline MySQL Document Store Relational & Document Model MySQL HA Out-Of-Box HA
  • 34. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Introducing … 34
  • 35. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 35 Scale-Out High Performance Ease-of-Use Built-in HA Out-of-Box Solution Everything Integrated MySQL InnoDB cluster
  • 36. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36 A single product: MySQL • All components created together • Tested together • Packaged together Flexible and Modern • C++ 11 • Protocol Buffers • Developer friendly MySQL InnoDB Cluster – Goals Easy to use • A single client: MySQL Shell • Easy packaging • Homogenous servers Scale-out • Sharded clusters • Federated system of N replica sets • Each replica set manages a shard
  • 37. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | MySQL InnoDB cluster MySQL InnoDB Cluster – Architecture - S2 M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA Group Replication
  • 38. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | S1 S2 S3 S4 S… M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA MySQL InnoDB Cluster – Architecture - S3 MySQL InnoDB cluster Read-Only Slaves
  • 39. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | S1 S2 S3 S4 S… M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA ReplicaSet(Shard1) S1 S2 S3 S4 S… M M M MySQL Connector Application MySQL Router HA ReplicaSet(Shard2) S1 S2 S3 M M M H ReplicaSet(Shard3) MySQL Connector Application MySQL Router MySQL InnoDB Cluster – Architecture - S4 MySQL InnoDB cluster …
  • 40. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | MySQL Shell – Deploy MySQL Instances shell> mysqlsh mysql-js> dba.deployLocalInstance(3306) mysql-js> dba.deployInstance(‘hanode2:3306’) mysql-js> dba.deployInstance(‘hanode3:3306’) 40
  • 41. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | MySQL Shell – Create an InnoDB Cluster mysql-js> connect root@hanode1:3306 mysql-js> cluster = dba.createCluster(‘NewAppCluster') mysql-js> cluster.addInstance('root@hanode2:3306') mysql-js> cluster.addInstance('root@hanode3:3306') 41
  • 42. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | MySQL Shell – Add a MySQL Router shell> mysqlrouter --bootstrap hanode1:3306 shell> mysqlrouter & shell> mysqlsh --uri root@localhost:6446 42
  • 43. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | InnoDB Storage Engine mysqld process Advantages of SQL and NoSQL NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation SQL Complex queries with joins ACID transactions Well defined schemas Rich set of tools Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 43
  • 44. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Our Objective: Leverage the Infrastructure Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 44 Clients and Applications InnoDB Storage Engine mysqld process Firewall Audit Encryption Authentication Online Backup Monitoring Integration Support 3rd Party Tools 3rd Party Tools 3rd Party Tools 3rd Party Tools 3rd Party Tools NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation SQL Complex queries with joins ACID transactions Well defined schemas Rich set of tools
  • 45. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Our Objective: Empower Application Developers Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 45 Clients and Applications InnoDB Storage Engine mysqld process Firewall Audit Encryption Authentication Online Backup Monitoring Integration Support 3rd Party Tools 3rd Party Tools 3rd Party Tools 3rd Party Tools 3rd Party Tools NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation SQL Complex queries with joins ACID transactions Well defined schemas Rich set of tools
  • 46. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Resources Topic Link(s) MySQL as a Document Database http://dev.mysql.com/doc/refman/5.7/en/document-database.html MySQL Shell http://dev.mysql.com/doc/refman/5.7/en/mysql-shell.html http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-javascript.html http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-python.html X Dev API http://dev.mysql.com/doc/x-devapi-userguide/en/ X Plugin http://dev.mysql.com/doc/refman/5.7/en/x-plugin.html MySQL JSON http://mysqlserverteam.com/tag/json/ https://dev.mysql.com/doc/refman/5.7/en/json.html https://dev.mysql.com/doc/refman/5.7/en/json-functions.html 46
  • 47. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Thank you!