SlideShare a Scribd company logo
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
重新認識MySQL-融合SQL和NoSQL
兩個世界於一爐的MySQL 5.7
梶山隆輔(EN)及 馬楚成(ZH)
2016-08-21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Copyright © 2015, 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.
2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
新! MySQL Shell – 主要功能
• 多語言 - 的JavaScript,Python中和SQL語言
• 支持文檔和關係模型
• 互動和批次處理模式
• 三個結果的格式 - TABLE,JSON,Tab分隔,
• API
– Sessions
– Schemas
– Collections
– Tables
集成开发和管理命令行管理程序
3
– CRUD on Tables and Collections
– SQL execution
– Result Processing
– Parameter Binding
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
新! Documentation
• Developer Guides
• Examples
• LINKS HERE
新樣式 - 重點在開發人員
4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The Workshop
• Install Virtualbox (Latest Version)
• VM
– 201608COSCUPDocStore.ova
– IMPORT to the VirtualBox
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Disable
• USB
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Network
• DHCP (HOST-ONLY) e.g. 192.168.56.102
– Check your IP if needed
– # ip addr
• Adapter 2 (Bridge)
– Disable (Not used in Lab)
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Using putty / ssh client
• Using putty or ssh client to login to the OS
• User name : root
• Password : password
• Folder : /opt/mysql/solution (The main Lab Folder)
• For ALL operations, use mysql user. (Do not use root user)
– # su - mysql
8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lab 01 : JSON
• Folder : /opt/mysql/solution/12-JSON
CREATE DATABASE if not exists mytest;
CREATE TABLE if not exists mytest.widgets (
id int(10) NOT NULL AUTO_INCREMENT,
widget JSON NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
9
INSERT INTO mytest.widgets (widget) VALUES
('{"series": 1}'),('{"series": 7}'),('{"series": 3}'),
('{"series": 4}'),('{"series": 10}'),('{"series": 2}'),
('{"series": 6}'),('{"series": 5}'),('{"series": 8}'),
('{"series": 11}');
select count(*) from mytest.widgets;
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JSON - SELECT
• select JSON_TYPE('["a","b", 1]');
• select JSON_TYPE('"hello"');
• select JSON_EXTRACT('{"series": 4}','$.series');
• select JSON_EXTRACT('[10,20, [30, 40]]','$[1]');
• select JSON_EXTRACT('[10,20, [30, 40]]','$[2]');
• SELECT JSON_EXTRACT('[10,20, [30, 40]]', '$[1]', '$[0]');
• SELECT JSON_EXTRACT('[10,20, [30, 40]]', '$[2][*]');
• select JSON_ARRAY('a', 1, NOW());
• select JSON_OBJECT('key1',1, 'key2', 'abc', 'key3', '["a","b", 1]');
• SELECT JSON_MERGE('["a",1]', '{"key": "value"}');
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JSON - SELECT
• select JSON_EXTRACT(widget, "$.series") from mytest.widgets;
• select widget->"$.series" from mytest.widgets ;
• select widget->>"$.series" from mytest.widgets ;
• select JSON_EXTRACT('{"name":"My Object",
"numbers":[2,4,6,8,10,12,14,16,18,20]}',"$.numbers[1]");
• select JSON_TYPE( '[{"price":10,"name":"hello"},
{"price":12,"name":"hello2"},{"price":16,"name":"hello3"},
{"price":18,"name":"hello4"}]' );
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
GENERATED COLUMN
• alter table mytest.features add
feature_type varchar(30)
as
(feature->"$.type") { VIRTUAL | STORED};
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
IMPORT (LOAD DATA) JSON to table
• Check properties.json
• load data infile '/opt/mysql/solution/12-JSON/properties.json' into table
mytest.features (feature);
06-import.sh
13
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Connectors and Driver
MySQL (+ Document Store)架构
14
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
memcached
Client
memcache
Protocol
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 15
Find row(s) with Name =
‘Aruba’ andGNP = 828
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 16
alter table mytest01 add myname varchar(30) as (json_extract(doc, "$.myname") );
alter table mytest01 add mycompany varchar(30) as (json_extract(doc, "$.mycompany") );
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 17
alter table mytest01 add unique key mytest01_myname (myname);
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lab02- MySQL Document Store (工作坊)
• VM已準備
– MySQL 5.7.14
– MySQL Shell 1.0.4
– Nodejs and Connector
• 1. 安裝MySQLX插件
• 2. Starting MySQL Shell (mysqlsh) login session
• 3. Loading Sample Database “world_x”
• 4. Schema, Collection, Tables, Query using MySQL Shell
• 5. Creating New Collection and Inserting Data ( in Transaction mode)
• 6. ErrorHandling
• 7. Adding Generated Column to Collection
18
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
1. X-Plugin安裝
• install plugin mysqlx soname 'mysqlx.so';
• Create a “LOCKED” user “mysqlxyss@localhost”
– CREATE USER IF NOT EXISTS mysqlxsys@localhost IDENTIFIED WITH
– mysql_native_password AS 'password' ACCOUNT LOCK;
– GRANT SELECT ON mysql.user TO mysqlxsys@localhost;
– GRANT SUPER ON *.* TO mysqlxsys@localhost;
00-installx.sh
19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
2. Starting MySQL Shell (mysqlsh) login session
• Command (mysqlsh)
• mysqlsh --uroot --h127.0.0.1 --P33060
– mysql-js> help
• Quit mysqlsh
– mysql-js> quit
• Showing the session
– mysql-js>session
01-login.sh
20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
2. XSession & NodeSession
• mysql-js> var mysqlx = require(‘mysqlx’).mysqlx;
• mysql-js> var xsession = mysqlx.getSession(‘root:pwd@localhost:33060’);
• mysql-js> var nsession = mysqlx.getNodeSession(‘root:pwd@localhost:33060’);
• nsession.sql(‘use test’);
• nsession.sql(‘select 1’);
21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
3. Loading ‘world_x’ sample database
• Download from URL : http://dev.mysql.com/doc/index-other.html
‘world_x’
• 03-createWorldX.sh
– mysql -uroot -h127.0.0.1 < /opt/mysql/packages/world_x-db/world_x.sql
http://dev.mysql.com/doc/index-other.html
22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
4. Schema, Collection, Tables using MySQL Shell
• var myworld_x = session.getSchema('world_x');
• var mytables = myworld_x.getTables();
• var mycollections = myworld_x.getCollections();
• print("Schema : " , myworld_x);
• print("Tables :" , mytables);
• print("Collections :" , mycollections);
04a-printSTC.sh (Print Schema, Tables, Collection)
23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
4. Query Collection / Table
• print("Table : City [SELECT]");
• myworld_x.City.select().limit(5).execute();
• print("Collection : CountryInfo [FIND]");
• myworld_x.CountryInfo.find().limit(1);
• print("Collection : CountryInfo [FIND - condition GNP > 1000 and Name like 'A%']");
• myworld_x.CountryInfo.find("GNP > 1000 and Name like 'A%'").limit(1);
04c-query.sh
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
5. Creating Collection and Transaction Data
• var myworld_x = session.getSchema('world_x');
• try {
• var myt = myworld_x.getCollection('mytest01') ;
• session.dropCollection('world_x', 'mytest01');
• } catch (err) {
• print("[INFO] Collection not found : mytest01");
• }
• try {
– var myColl = myworld_x.createCollection('mytest01');
– ….
11-createCollection.sh
25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
5. Creating Collection and Transaction Data
• session.startTransaction();
• try {
• myColl.add({name: 'Jack', age: 15, height: 1.76, weight: 69.4}).execute();
• myColl.add({name: 'Susanne', age: 24, height: 1.65}).execute();
• myColl.add({name: 'Mike', age: 39, height: 1.9, weight: 74.3}).execute();
• // Commit the transaction if everything went well
• session.commit();
• print('Data inserted successfully.');
• } catch (err) {
session.rollback();
• }
Transaction Data
26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
6. Error Handling
• Try, Catch, Finally
• ./13-errorHandling.sh
13-errorHandling.sh
27
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
6. Error Handling
• Try, Catch, Finally (passing root as user)
• ./13-errorHandling.sh root
13-errorHandling.sh
28
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
6. Error Handling
• Try, Catch, Finally (passing root as user and world_x as database)
• ./13-errorHandling.sh root world_x
13-errorHandling.sh
29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 30
Listing Schemas
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 31
Javascript var
Defining allsch to be
assigned with schemas
list
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 32
HELP
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 33
Status
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 34
Assign var db as the
schema pointing to
“world_x”
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 35
Listing rows (Limit to
only 1 row)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 36
Find row(s) with Name
= ‘Aruba’
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 37
Find row(s) with Name =
‘Aruba’ andGNP = 828
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 38
Create a new Collection
“mytest01”
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 39
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 41
alter table mytest01 add myname varchar(30) as (json_extract(doc, "$.myname") );
alter table mytest01 add mycompany varchar(30) as (json_extract(doc, "$.mycompany") );
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 42
alter table mytest01 add unique key mytest01_myname (myname);
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 43
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 44
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 45
20160821 coscup-my sql57docstorelab01

More Related Content

What's hot

[OSC 2020 Osaka] MySQL"超"入門
[OSC 2020 Osaka] MySQL"超"入門[OSC 2020 Osaka] MySQL"超"入門
[OSC 2020 Osaka] MySQL"超"入門
Ryusuke Kajiyama
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSON
Morgan Tocker
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
Keith Hollman
 
MySQL 5.6 Updates
MySQL 5.6 UpdatesMySQL 5.6 Updates
MySQL 5.6 Updates
Dave Stokes
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
Oleksii(Alexey) Porytskyi
 
MySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. RyengMySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. Ryeng
郁萍 王
 
Oracle Veritabanı Yönetimi
Oracle Veritabanı YönetimiOracle Veritabanı Yönetimi
Oracle Veritabanı Yönetimi
Orhan ERIPEK
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
Mark Leith
 
Posscon my sql56
Posscon my sql56Posscon my sql56
Posscon my sql56
Dave Stokes
 
MySQL Monitoring 101
MySQL Monitoring 101MySQL Monitoring 101
MySQL Monitoring 101
Ronald Bradford
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
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
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014Dave Stokes
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
Mark Leith
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
Mark Leith
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
Mark Swarbrick
 
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...Geir Høydalsvik
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features Summary
Olivier DASINI
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourRonald Bradford
 
The MySQL SYS Schema
The MySQL SYS SchemaThe MySQL SYS Schema
The MySQL SYS Schema
Mark Leith
 

What's hot (20)

[OSC 2020 Osaka] MySQL"超"入門
[OSC 2020 Osaka] MySQL"超"入門[OSC 2020 Osaka] MySQL"超"入門
[OSC 2020 Osaka] MySQL"超"入門
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSON
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
 
MySQL 5.6 Updates
MySQL 5.6 UpdatesMySQL 5.6 Updates
MySQL 5.6 Updates
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
 
MySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. RyengMySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. Ryeng
 
Oracle Veritabanı Yönetimi
Oracle Veritabanı YönetimiOracle Veritabanı Yönetimi
Oracle Veritabanı Yönetimi
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
Posscon my sql56
Posscon my sql56Posscon my sql56
Posscon my sql56
 
MySQL Monitoring 101
MySQL Monitoring 101MySQL Monitoring 101
MySQL Monitoring 101
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features Summary
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
 
The MySQL SYS Schema
The MySQL SYS SchemaThe MySQL SYS Schema
The MySQL SYS Schema
 

Viewers also liked

Mongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availabilityMongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availability
agiamas
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
Ivan Ma
 
Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07
Ivan Ma
 
MySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitationsMySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitations
Jean-François Gagné
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
Bogdan Kecman
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
Nuno Carvalho
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
Frederic Descamps
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
Matt Lord
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
Ulf Wendel
 

Viewers also liked (10)

Mongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availabilityMongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availability
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
 
Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07
 
MySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitationsMySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitations
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 

Similar to 20160821 coscup-my sql57docstorelab01

20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
Ivan Ma
 
MySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoMySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demo
Keith Hollman
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
Mario Beck
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
GeneXus
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
Tommy Lee
 
1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan
Ivan Tu
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
Mysql User Camp
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
Miguel Araújo
 
Ohio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQLOhio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQL
Dave Stokes
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
 
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRsMySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
Mayank Prasad
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
Tommy Lee
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
Women in Technology Poland
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
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
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasia
Mayank Prasad
 
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
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
Bruno Borges
 
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
 

Similar to 20160821 coscup-my sql57docstorelab01 (20)

20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
MySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoMySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demo
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
 
1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
 
Ohio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQLOhio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQL
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRsMySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
 
Python and the MySQL Document Store
Python and the MySQL Document StorePython and the MySQL Document Store
Python and the MySQL Document Store
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasia
 
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
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
 
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
 

More from 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
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
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
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing
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
 
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
 
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
 
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
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1Ivan 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
 

More from Ivan Ma (12)

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
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
 
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
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
 
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
 
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
 
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
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
 

Recently uploaded

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 

20160821 coscup-my sql57docstorelab01

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 重新認識MySQL-融合SQL和NoSQL 兩個世界於一爐的MySQL 5.7 梶山隆輔(EN)及 馬楚成(ZH) 2016-08-21 Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
  • 2. Copyright © 2015, 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. 2
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 新! MySQL Shell – 主要功能 • 多語言 - 的JavaScript,Python中和SQL語言 • 支持文檔和關係模型 • 互動和批次處理模式 • 三個結果的格式 - TABLE,JSON,Tab分隔, • API – Sessions – Schemas – Collections – Tables 集成开发和管理命令行管理程序 3 – CRUD on Tables and Collections – SQL execution – Result Processing – Parameter Binding
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 新! Documentation • Developer Guides • Examples • LINKS HERE 新樣式 - 重點在開發人員 4
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The Workshop • Install Virtualbox (Latest Version) • VM – 201608COSCUPDocStore.ova – IMPORT to the VirtualBox 5
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Disable • USB 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Network • DHCP (HOST-ONLY) e.g. 192.168.56.102 – Check your IP if needed – # ip addr • Adapter 2 (Bridge) – Disable (Not used in Lab) 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Using putty / ssh client • Using putty or ssh client to login to the OS • User name : root • Password : password • Folder : /opt/mysql/solution (The main Lab Folder) • For ALL operations, use mysql user. (Do not use root user) – # su - mysql 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Lab 01 : JSON • Folder : /opt/mysql/solution/12-JSON CREATE DATABASE if not exists mytest; CREATE TABLE if not exists mytest.widgets ( id int(10) NOT NULL AUTO_INCREMENT, widget JSON NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB; 9 INSERT INTO mytest.widgets (widget) VALUES ('{"series": 1}'),('{"series": 7}'),('{"series": 3}'), ('{"series": 4}'),('{"series": 10}'),('{"series": 2}'), ('{"series": 6}'),('{"series": 5}'),('{"series": 8}'), ('{"series": 11}'); select count(*) from mytest.widgets;
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | JSON - SELECT • select JSON_TYPE('["a","b", 1]'); • select JSON_TYPE('"hello"'); • select JSON_EXTRACT('{"series": 4}','$.series'); • select JSON_EXTRACT('[10,20, [30, 40]]','$[1]'); • select JSON_EXTRACT('[10,20, [30, 40]]','$[2]'); • SELECT JSON_EXTRACT('[10,20, [30, 40]]', '$[1]', '$[0]'); • SELECT JSON_EXTRACT('[10,20, [30, 40]]', '$[2][*]'); • select JSON_ARRAY('a', 1, NOW()); • select JSON_OBJECT('key1',1, 'key2', 'abc', 'key3', '["a","b", 1]'); • SELECT JSON_MERGE('["a",1]', '{"key": "value"}'); 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | JSON - SELECT • select JSON_EXTRACT(widget, "$.series") from mytest.widgets; • select widget->"$.series" from mytest.widgets ; • select widget->>"$.series" from mytest.widgets ; • select JSON_EXTRACT('{"name":"My Object", "numbers":[2,4,6,8,10,12,14,16,18,20]}',"$.numbers[1]"); • select JSON_TYPE( '[{"price":10,"name":"hello"}, {"price":12,"name":"hello2"},{"price":16,"name":"hello3"}, {"price":18,"name":"hello4"}]' ); 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | GENERATED COLUMN • alter table mytest.features add feature_type varchar(30) as (feature->"$.type") { VIRTUAL | STORED}; 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | IMPORT (LOAD DATA) JSON to table • Check properties.json • load data infile '/opt/mysql/solution/12-JSON/properties.json' into table mytest.features (feature); 06-import.sh 13
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Connectors and Driver MySQL (+ Document Store)架构 14 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 memcached Client memcache Protocol
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 15 Find row(s) with Name = ‘Aruba’ andGNP = 828
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 16 alter table mytest01 add myname varchar(30) as (json_extract(doc, "$.myname") ); alter table mytest01 add mycompany varchar(30) as (json_extract(doc, "$.mycompany") );
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 17 alter table mytest01 add unique key mytest01_myname (myname);
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Lab02- MySQL Document Store (工作坊) • VM已準備 – MySQL 5.7.14 – MySQL Shell 1.0.4 – Nodejs and Connector • 1. 安裝MySQLX插件 • 2. Starting MySQL Shell (mysqlsh) login session • 3. Loading Sample Database “world_x” • 4. Schema, Collection, Tables, Query using MySQL Shell • 5. Creating New Collection and Inserting Data ( in Transaction mode) • 6. ErrorHandling • 7. Adding Generated Column to Collection 18
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 1. X-Plugin安裝 • install plugin mysqlx soname 'mysqlx.so'; • Create a “LOCKED” user “mysqlxyss@localhost” – CREATE USER IF NOT EXISTS mysqlxsys@localhost IDENTIFIED WITH – mysql_native_password AS 'password' ACCOUNT LOCK; – GRANT SELECT ON mysql.user TO mysqlxsys@localhost; – GRANT SUPER ON *.* TO mysqlxsys@localhost; 00-installx.sh 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 2. Starting MySQL Shell (mysqlsh) login session • Command (mysqlsh) • mysqlsh --uroot --h127.0.0.1 --P33060 – mysql-js> help • Quit mysqlsh – mysql-js> quit • Showing the session – mysql-js>session 01-login.sh 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 2. XSession & NodeSession • mysql-js> var mysqlx = require(‘mysqlx’).mysqlx; • mysql-js> var xsession = mysqlx.getSession(‘root:pwd@localhost:33060’); • mysql-js> var nsession = mysqlx.getNodeSession(‘root:pwd@localhost:33060’); • nsession.sql(‘use test’); • nsession.sql(‘select 1’); 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 3. Loading ‘world_x’ sample database • Download from URL : http://dev.mysql.com/doc/index-other.html ‘world_x’ • 03-createWorldX.sh – mysql -uroot -h127.0.0.1 < /opt/mysql/packages/world_x-db/world_x.sql http://dev.mysql.com/doc/index-other.html 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 4. Schema, Collection, Tables using MySQL Shell • var myworld_x = session.getSchema('world_x'); • var mytables = myworld_x.getTables(); • var mycollections = myworld_x.getCollections(); • print("Schema : " , myworld_x); • print("Tables :" , mytables); • print("Collections :" , mycollections); 04a-printSTC.sh (Print Schema, Tables, Collection) 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 4. Query Collection / Table • print("Table : City [SELECT]"); • myworld_x.City.select().limit(5).execute(); • print("Collection : CountryInfo [FIND]"); • myworld_x.CountryInfo.find().limit(1); • print("Collection : CountryInfo [FIND - condition GNP > 1000 and Name like 'A%']"); • myworld_x.CountryInfo.find("GNP > 1000 and Name like 'A%'").limit(1); 04c-query.sh 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 5. Creating Collection and Transaction Data • var myworld_x = session.getSchema('world_x'); • try { • var myt = myworld_x.getCollection('mytest01') ; • session.dropCollection('world_x', 'mytest01'); • } catch (err) { • print("[INFO] Collection not found : mytest01"); • } • try { – var myColl = myworld_x.createCollection('mytest01'); – …. 11-createCollection.sh 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 5. Creating Collection and Transaction Data • session.startTransaction(); • try { • myColl.add({name: 'Jack', age: 15, height: 1.76, weight: 69.4}).execute(); • myColl.add({name: 'Susanne', age: 24, height: 1.65}).execute(); • myColl.add({name: 'Mike', age: 39, height: 1.9, weight: 74.3}).execute(); • // Commit the transaction if everything went well • session.commit(); • print('Data inserted successfully.'); • } catch (err) { session.rollback(); • } Transaction Data 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 6. Error Handling • Try, Catch, Finally • ./13-errorHandling.sh 13-errorHandling.sh 27
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 6. Error Handling • Try, Catch, Finally (passing root as user) • ./13-errorHandling.sh root 13-errorHandling.sh 28
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 6. Error Handling • Try, Catch, Finally (passing root as user and world_x as database) • ./13-errorHandling.sh root world_x 13-errorHandling.sh 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 30 Listing Schemas
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 31 Javascript var Defining allsch to be assigned with schemas list
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 32 HELP
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 33 Status
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 34 Assign var db as the schema pointing to “world_x”
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 35 Listing rows (Limit to only 1 row)
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 36 Find row(s) with Name = ‘Aruba’
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 37 Find row(s) with Name = ‘Aruba’ andGNP = 828
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 38 Create a new Collection “mytest01”
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 39
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 41 alter table mytest01 add myname varchar(30) as (json_extract(doc, "$.myname") ); alter table mytest01 add mycompany varchar(30) as (json_extract(doc, "$.mycompany") );
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 42 alter table mytest01 add unique key mytest01_myname (myname);
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 43
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 44
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 45