SlideShare a Scribd company logo
MySQL como
Document Store
suporte a JSON
Airton Lastori
airton.lastori@oracle.com
Julho-2016
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DBA Dev Gerencial
Quem?
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Nunca usou
NoSQL
Usa NoSQL apenas
em apps não-
críticas
NoSQL em apps
críticas
Quem?
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Agenda
1. MySQL e seu legado
2. SQL vs NoSQL – quando usar
3. Funcionalidades NoSQL no MySQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Agenda
1. MySQL e seu legado
2. SQL vs NoSQL – quando usar
3. Funcionalidades NoSQL no MySQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Grandes usuários MySQL
6
Web, Cloud, Distribuído e Embarcado…
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 7
Muitas foram start ups há poucos
anos, começaram e cresceram com
MySQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 8
http://db-engines.com/en/ranking_trend (mar-2016)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
A Web
Oracle Confidential – Internal/Restricted/Highly Restricted 9
Dados massivos, problemas Big Data
Altíssima escala
Sempre online
Estratégia: hardwares commodity em nuvem + software livre
Modelo relacional: difícil escalar e implementar alta
disponibilidade em nuvem de hw commodity
www.leavcom.com/pdf/NoSQL.pdf
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 10
NoSQL = Não-relacional
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 11
http://db-engines.com/en/ranking_categories
183NoSQL
12categorias
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 12
Web = gatilho para o surgimento das
tecnologias NoSQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Usa MySQL como NoSQL
eng.uber.com/schemaless-part-one
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Usa MySQL como NoSQL
eng.uber.com/schemaless-part-one
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 15
Se o software tem mais tempo de
desenvolvimento e é largamente
utilizado, menor a probabilidade de
falhar em funções básicas.
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
“We had an unexpected loss of data on
nearly every technology we used at
one time or another, except MySQL.”
– Pinterest Engineering
Oracle Confidential – Internal/Restricted/Highly Restricted 16
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Evolução da escalabilidade vertical do MySQL
Read-only Read-write
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle elevando o nível
Um MySQL cada vez melhor
2x Engineering Staff
3x QA Staff
2x Support Staff
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Edition
Suporte + Base de Conhecimento + Hot Backup + Monitor + Oracle EM + Workbench + Plug-ins
Escalabilidade
Autenticação
Firewall
Auditoria
novo TDE
Criptografia
MySQL Enterprise Monitor
Oracle EM for MySQL
Plug-ins
Suporte
Hot
Backup
Monitor &
Workbench
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Agenda
1. MySQL e seu legado
2. SQL vs NoSQL – quando usar
3. Funcionalidades NoSQL no MySQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Vários modelos de dados
• 1960 - navigacional
– Hierárquico
– Network
• 1970 - SQL/relacional
• 1990 - Orientado a Objetos
– em parte, absorvido pelos SGBDRs
• 2000 – NoSQL
– o modelo relacional não resolve bem todos os problemas
– apenas um Hype? será absorvido pelos SGBDRs?
Oracle Confidential – Internal/Restricted/Highly Restricted 21
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 22
SQL = implementação do modelo relacional
NoSQL = tudo que não é relacional
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL
• Integridade dos dados
– Schema, Normalização, Constraints (ex. FKs)
• ACID, transações
• SQL
– Linguagem otimizável de consulta
– Diga o que quer, deixe o resto com o BD
– Agilidade nas consultas de dados estruturados,
principalmente médio e longo prazo
NoSQL
• Schemaless
– agilidade no desenvolvimento inicial
– estruturas de dados flexíveis
• JSON, arrays aninhadas
• Alguns usos realmente bons
– hierarquias , campos customizados, etc
– persistir objetos sem ORMs
– proximidade com frontend (Javascript)
• Fácil de aprender e usar
Oracle Confidential – Internal/Restricted/Highly Restricted 23
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Schemaless
• key-value
• document
• wide column
• graph
• Etc
• Muda o modelo lógico, a visão do usuário
– Outras APIs de acesso = Not Only SQL
– Em muitos casos, simplifica a vida do desenvolvedor (do DBA, nem tanto...)
Oracle Confidential – Internal/Restricted/Highly Restricted 24
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 25
Relacional vs Documento
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
É possível combinar os dois mundos?
• Ter ambos schema e schemaless no mesmo stack?
• Uma solução que marque todos checkboxes:
26
Developers
[ x ] Schemaless
[ x ] Rapid Prototyping/Simpler APIs
[ x ] Document Model
Operations
[ x ] Performance Management/Visibility
[ x ] Robust Replication, Backup, Restore
[ x ] Comprehensive Tooling Ecosystem
Business Owner
[ x ] Don’t lose my data = ACID transactions
[ x ] Capture all my data = Extensible/Schemaless
[ x ] Products On Schedule/Time to Market = Rapid Development
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Um database flexível
– Mão-de-obra com conhecimentos
profundos
– Estável
– Custos efecientes e controlados
– Fácil mover dados entre instâncias
– Menos Drivers
– Menos Ferramentas
– SQL funciona, CRUD funciona
– Operacional e Analítico juntos
Muitos databases diferentes
– Requer repertório maior de
habilidades, dificulta encontrar mão de
obra com conhecimentos profundos
– Muitos Drivers
– Muitas Ferramentas
– Mais esforço para integrar,
compartilhar e mover dados
– Muito mais trabalho
– Separação muitas vezes desnecessária
de Operacional e Analítico
Por que combinar em um único database?
27
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Agenda
1. MySQL e seu legado
2. SQL vs NoSQL – quando usar
3. Funcionalidades NoSQL no MySQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 29
Suporte ao modelo chave-valor via memcached
imasters.com.br/banco-de-dados/mysql-e-nosql-memcached-plugin
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 30
MySQL com memcached
+1 000 000 QPS
*X86 48 cores
http://dimitrik.free.fr/blog/archives/2013/11/mysql-performance-over-1m-qps-with-
innodb-memcached-plugin-in-mysql-57.html
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Whats New? MySQL 5.7.12+
• New Server Features
– Native JSON datatype and storage
– Generated Columns with Indexing
– Over 20+ Native JSON functions
– New X Protocol
• New Document APIs
– SQL and NoSQL/Document CRUD APIs will cross all Connectors
• For BOTH Collections of Documents and Relational Tables
– Initial DMR M1 includes Node.js, Java and .NET
• New Interactive Shell – with Javascript, Python, SQL modes
31
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Whats New? MySQL 5.7.12+
• New Server Features
– Native JSON datatype and storage
– Generated Columns with Indexing
– Over 20+ Native JSON functions
– New X Protocol
• New Document APIs
– SQL and NoSQL/Document CRUD APIs will cross all Connectors
• For BOTH Collections of Documents and Relational Tables
– Initial DMR M1 includes Node.js, Java and .NET
• New Interactive Shell – with Javascript, Python, SQL modes
32
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 33
Exemplo CRUD
MySQL 5.7.12
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
CREATE
mysql> CREATE DATABASE json_test;
mysql> USE json_test;
mysql> CREATE TABLE product_info (product JSON);
mysql> INSERT INTO product_info VALUES ('
{
"product_id" : 9,
"size" : "M",
"color" : "red",
"fabric" : "cotton"
}
');
Query OK, 1 row affected (0.01 sec)
34
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
CREATE
mysql> INSERT INTO product_info VALUES ('
{
"product_id" : 14,
"size" : "S",
"price" : 15.0
}
');
Query OK, 1 row affected (0.01 sec)
35
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
READ
mysql> SELECT * FROM product_info;
+--------------------------------------------------------------------+
| product |
+--------------------------------------------------------------------+
| {"size": "M", "color": "red", "fabric": "cotton", "product_id": 9} |
| {"size": "S", "price": 15, "product_id": 14} |
+--------------------------------------------------------------------+
2 rows in set (0.00 sec)
36
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
READ
mysql> SELECT * FROM product_info WHERE product->"$.product_id"=14;
+----------------------------------------------+
| product |
+----------------------------------------------+
| {"size": "S", "price": 15, "product_id": 14} |
+----------------------------------------------+
1 row in set (0.00 sec)
37
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
UPDATE
mysql> UPDATE product_info SET product = '{"size": "L", "price": 15,
"product_id": 14}' WHERE product->"$.product_id"=14;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> SELECT * FROM product_info WHERE product->"$.product_id"=14;
+--------------------------------------------------------------------+
| product |
+--------------------------------------------------------------------+
| {"size": "M", "color": "red", "fabric": "cotton", "product_id": 9} |
| {"size": "L", "price": 15, "product_id": 14} |
+--------------------------------------------------------------------+
2 rows in set (0.00 sec)
38
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DELETE
mysql> DELETE FROM product_info WHERE product->"$.product_id"=14;
Query OK, 1 row affected (0.01 sec)
mysql> SELECT * FROM product_info;
+--------------------------------------------------------------------+
| product |
+--------------------------------------------------------------------+
| {"size": "M", "color": "red", "fabric": "cotton", "product_id": 9} |
+--------------------------------------------------------------------+
1 row in set (0.00 sec)
39
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Vantagens sobre tipos TEXT/VARCHAR
1. Validação
2. Eficiência no armazenamento físico
Formato binário otimizado que permite um acesso mais rápido aos elementos de matrizes
41
INSERT INTO product_info VALUES ('texto que não é JSON válido');
ERROR 3140 (22032): Invalid JSON text: "Invalid value." at
position 1 in value for column 'product_info.product'.
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Testes com dados reais
• San Francisco OpenData
• 206K objetos JSON
• Importado de https://github.com/zemirco/sf-city-lots-json + ajustes
42
CREATE TABLE features (
id INT NOT NULL auto_increment primary key,
feature JSON NOT NULL
);
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 43
{
"type":"Feature",
"geometry":{
"type":"Polygon",
"coordinates":[
[
[-122.42200352825247,37.80848009696725,0],
[-122.42207601332528,37.808835019815085,0],
[-122.42110217434865,37.808803534992904,0],
[-122.42106256906727,37.80860105681814,0],
[-122.42200352825247,37.80848009696725,0]
]
]
},
"properties":{
"TO_ST":"0",
"BLKLOT":"0001001",
"STREET":"UNKNOWN",
"FROM_ST":"0",
"LOT_NUM":"001",
"ST_TYPE":null,
"ODD_EVEN":"E",
"BLOCK_NUM":"0001",
"MAPBLKLOT":"0001001"
}
}
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Comparação de Performance: JSON vs TEXT
44
# tipo JSON
SELECT DISTINCT
feature->"$.type" as json_extract
FROM features;
+--------------+
| json_extract |
+--------------+
| "Feature" |
+--------------+
1 row in set (1.25 sec)
# tipo TEXT
SELECT DISTINCT
feature->"$.type" as json_extract
FROM features;
+--------------+
| json_extract |
+--------------+
| "Feature" |
+--------------+
1 row in set (12.85 sec)
JSON 10x mais rápido que TEXT numa busca full scan
(sem índice, 206K documentos)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Generated Columns
45
id my_integer my_integer_plus_one
1 10 11
2 20 21
3 30 31
4 40 41
UPDATE t1 SET my_integer_plus_one = 10 WHERE id = 1;
ERROR 3105 (HY000): The value specified for generated column
'my_integer_plus_one' in table 't1' is not allowed.
Coluna atualizada automaticamente
com base na definição CREATE.
Somente leitura, é claro!
CREATE TABLE t1 (
id INT NOT NULL PRIMARY KEY auto_increment,
my_integer INT,
my_integer_plus_one INT AS (my_integer + 1)
);
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Indexando via Generated Columns
46
ALTER TABLE features ADD feature_type VARCHAR(30) AS (feature->"$.type");
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE features ADD INDEX (feature_type);
Query OK, 0 rows affected (0.73 sec)
Records: 0 Duplicates: 0 Warnings: 0
SELECT DISTINCT feature_type FROM features;
+--------------+
| feature_type |
+--------------+
| "Feature" |
+--------------+
1 row in set (0.06 sec)
Down from 1.25 sec to 0.06
sec
Creates index only. Does
not modify table rows.
Meta data change only
(FAST). Does not need to
touch table.
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Virtual vs. Stored Generated Columns Performance
• Approximate worst case scenario via a table scan:
47
SELECT DISTINCT feature_type FROM
features;
+--------------+
| feature_type |
+--------------+
| "Feature" |
+--------------+
VIRTUAL-TEXT (9.89 sec)
STORED-TEXT (0.22 sec)
VIRTUAL-JSON (0.85 sec)
STORED-JSON (0.24 sec)
Clarification: Since indexes are materialized (stored) themselves, the real-life case for STORED
is when generating the column is computationally expensive and you can not use indexes
effectively.
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Indexing Options Available
48
STORED VIRTUAL
Primary and Secondary
BTREE, Fulltext, GIS
Mixed with fields
Requires table rebuild
Not Online
Secondary Only
BTREE Only
Mixed with fields
No table rebuild
INSTANT Alter
Faster Insert
Bottom Line: Unless you need a PRIMARY KEY, FULLTEXT or GIS index VIRTUAL is probably better.
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Compression Performance (16K Page)
49
May compress well - Schemaless means that the keys are repeated in each of
the documents; repetition improves compression performance
MySQL 5.7 also supports 32KB and 64KB pages (improved compression)
SELECT name, ((file_size-allocated_size)*100)/file_size as compressed_pct
from information_schema.INNODB_SYS_TABLESPACES WHERE name like
'test/features';
+---------------+----------------+
| name | compressed_pct |
+---------------+----------------+
| test/features | 59.2634 |
+---------------+----------------+
1 row in set (0.01 sec)
Using real-life data set from
earlier (16K Page)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 50
Funções JSON: além do CRUD
JSON_ARRAY_APPEND()
JSON_ARRAY_INSERT()
JSON_ARRAY()
JSON_CONTAINS_PATH()
JSON_CONTAINS()
JSON_DEPTH()
JSON_EXTRACT()
JSON_INSERT()
JSON_KEYS()
JSON_LENGTH()
JSON_MERGE()
JSON_OBJECT()
JSON_QUOTE()
JSON_REMOVE()
JSON_REPLACE()
JSON_SEARCH()
JSON_SET()
JSON_TYPE()
JSON_UNQUOTE()
JSON_VALID()
https://dev.mysql.com/doc/refman/5.7/en/json-functions.html
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
JSON_EXTRACT()
51
mysql> SELECT DISTINCT JSON_EXTRACT(feature, '$.type') FROM features;
+---------------------------------+
| JSON_EXTRACT(feature, '$.type') |
+---------------------------------+
| "Feature" |
+---------------------------------+
1 row in set (1.22 sec)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Unquote JSON String
mysql> SELECT DISTINCT JSON_UNQUOTE(feature->"$.type") AS feature_type
FROM features;
+-----------------+
| feature_type |
+-----------------+
| Feature |
+-----------------+
1 row in set (1.22 sec)
52
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
JSON Array Creation
53
SELECT JSON_ARRAY(id,
feature->"$.properties.STREET",
feature->'$.type") AS json_array
FROM features ORDER BY RAND() LIMIT 3;
+-------------------------------+
| json_array |
+-------------------------------+
| [65298, "10TH", "Feature"] |
| [122985, "08TH", "Feature"] |
| [172884, "CURTIS", "Feature"] |
+-------------------------------+
3 rows in set (2.66 sec)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
JSON_REPLACE
54
SELECT JSON_REPLACE(feature, '$.type', JSON_ARRAY('feature', 'bug')) as
json_object FROM features LIMIT 1;
+--------------------------------------------------------+
| json_object |
+--------------------------------------------------------+
| {"type": ["feature", "bug"], "geometry": {"type": ..}} |
+--------------------------------------------------------+
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
JSON Object Creation
55
SELECT JSON_OBJECT('id', id,
'street', feature->"$.properties.STREET",
'type', feature->"$.type"
) AS json_object
FROM features ORDER BY RAND() LIMIT 3;
+--------------------------------------------------------+
| json_object |
+--------------------------------------------------------+
| {"id": 122976, "type": "Feature", "street": "RAUSCH"} |
| {"id": 148698, "type": "Feature", "street": "WALLACE"} |
| {"id": 45214, "type": "Feature", "street": "HAIGHT"} |
+--------------------------------------------------------+
3 rows in set (3.11 sec)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 56
Funções JSON
JSON_ARRAY_APPEND()
JSON_ARRAY_INSERT()
JSON_ARRAY()
JSON_CONTAINS_PATH()
JSON_CONTAINS()
JSON_DEPTH()
JSON_EXTRACT()
JSON_INSERT()
JSON_KEYS()
JSON_LENGTH()
JSON_MERGE()
JSON_OBJECT()
JSON_QUOTE()
JSON_REMOVE()
JSON_REPLACE()
JSON_SEARCH()
JSON_SET()
JSON_TYPE()
JSON_UNQUOTE()
JSON_VALID()
https://dev.mysql.com/doc/refman/5.7/en/json-functions.html
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Whats New?MySQL 5.7.12+
• New Server Features
– Native JSON datatype and storage
– Generated Columns with Indexing
– Over 20+ Native JSON functions
– New X Protocol
• New Document APIs
– SQL and NoSQL/Document CRUD APIs will cross all Connectors
• For BOTH Collections of Documents and Relational Tables
– Initial DMR M1 includes Node.js, Java and .NET
• New Interactive Shell – with Javascript, Python, SQL modes
57
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Arquitetura
58
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 © 2015 Oracle and/or its affiliates. All rights reserved. |
XDev API
• Foco: facilidade de uso
• Abstração sobre SQL para operações
CRUD
• Add
• Find
• Modify
• Remove
• Sort
• Create Index
• X Sessions & Node Sessions
– abstração da conexão com BD
• Atualização dos conectores
– Connector/J
– Connector/Net
– Connector/Node.js
Oracle Confidential – Internal/Restricted/Highly Restricted 59
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 60
CRUD: Documento vs Relacional
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 61
MySQL Shell
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 63
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 64
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 65
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Coluna
• Mais integridade no schema,
independente da aplicação
• Schema torna a aplicação mais fácil de
manter no longo prazo, pois há maior
controle nas mudanças
– Espera-se uma maior qualidade dos dados
– Permite aplicação de algumas validações
automáticas sobre os dados
JSON
• Mais liberdade para representar dados
(ex. Campos custom)
• Denormalização natural, registro auto-
contido (ex. facilita escalabilidade
horizontal via sharding)
• Protótipos rápidos, comece armazenar
dados imediatamente
• Menor preocupação na definição de
Tipos de Dados
• Menos dor-de-cabeça para aplicar
mudanças no modelo de dados
Oracle Confidential – Internal/Restricted/Highly Restricted 66
Coluna ou JSON? Você escolhe!
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Modelo híbrido: Schema + Schemaless
67
CREATE TABLE product_info_hybrid (
product_id INT NOT NULL PRIMARY KEY,
description VARCHAR(60) NOT NULL,
vendor VARCHAR(30) NOT NULL,
price FLOAT NOT NULL,
attributes JSON NOT NULL
);
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Sumário
1. O movimento NoSQL é de grande relevância e tem os
gigantes da Web como protagonistas
2. MySQL continua muito relevante na Web com a
vantagem de ser extremamente popular e maduro
3. Novas funcionalidades Document Store do MySQL são
exemplo de como bancos relacionais podem abraçar o
NoSQL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Links úteis para seguir com os testes
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
69
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Obrigado!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
@MySQLBR meetup.com/MySQL-BRfacebook.com/MySQLBR
pt.planet.mysql.com
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Perguntas?
MySQL como Document Store
Contato:
airton.lastori@oracle.com
twitter.com/mysqlbr
facebook.com/mysqlbr
MySQL 5.7 como Document Store

More Related Content

What's hot

MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
Olivier DASINI
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
Olivier DASINI
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
Mario Beck
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
Olivier DASINI
 
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
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
Mario Beck
 
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
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
Mark Swarbrick
 
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
 
devops Days Belgium Ghent 2016
devops Days Belgium Ghent 2016devops Days Belgium Ghent 2016
devops Days Belgium Ghent 2016
Frederic Descamps
 
InnoDb Vs NDB Cluster
InnoDb Vs NDB ClusterInnoDb Vs NDB Cluster
InnoDb Vs NDB Cluster
Mark Swarbrick
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
Andrew Morgan
 
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
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
Mario Beck
 
MySQL Manchester TT - MySQL Enterprise Edition
MySQL Manchester TT - MySQL Enterprise EditionMySQL Manchester TT - MySQL Enterprise Edition
MySQL Manchester TT - MySQL Enterprise Edition
Mark Swarbrick
 
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
 
OpenStack & MySQL
OpenStack & MySQLOpenStack & MySQL
OpenStack & MySQL
MySQL Brasil
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
Mario Beck
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
Frederic Descamps
 

What's hot (20)

MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
 
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...
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
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
 
devops Days Belgium Ghent 2016
devops Days Belgium Ghent 2016devops Days Belgium Ghent 2016
devops Days Belgium Ghent 2016
 
InnoDb Vs NDB Cluster
InnoDb Vs NDB ClusterInnoDb Vs NDB Cluster
InnoDb Vs NDB Cluster
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
 
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)
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
MySQL Manchester TT - MySQL Enterprise Edition
MySQL Manchester TT - MySQL Enterprise EditionMySQL Manchester TT - MySQL Enterprise Edition
MySQL Manchester TT - MySQL Enterprise Edition
 
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
 
OpenStack & MySQL
OpenStack & MySQLOpenStack & MySQL
OpenStack & MySQL
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 

Similar to MySQL 5.7 como Document Store

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 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
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
Ted Wennmark
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
Andrew Morgan
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Frazer Clement
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of Choice
Mark Swarbrick
 
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 for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
Ben Krug
 
MySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime TimeMySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime Time
Arnab Ray
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
Andrew Morgan
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Toon Koppelaars
 
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
Manuel Contreras
 
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
MySQL's NoSQL  -- Texas Linuxfest August 22nd 2015MySQL's NoSQL  -- Texas Linuxfest August 22nd 2015
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
Dave Stokes
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
Abel Flórez
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
Ryusuke Kajiyama
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
Geir Høydalsvik
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp
 

Similar to MySQL 5.7 como Document Store (20)

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 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...
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
 
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
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of Choice
 
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 for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime TimeMySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime Time
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
 
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
 
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
MySQL's NoSQL  -- Texas Linuxfest August 22nd 2015MySQL's NoSQL  -- Texas Linuxfest August 22nd 2015
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 

More from MySQL Brasil

MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017
MySQL Brasil
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
MySQL Brasil
 
MySQL 8.0.1 DMR
MySQL 8.0.1 DMRMySQL 8.0.1 DMR
MySQL 8.0.1 DMR
MySQL Brasil
 
Alta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL EnterpriseAlta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL Enterprise
MySQL Brasil
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17
MySQL Brasil
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQL
MySQL Brasil
 
Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016
MySQL Brasil
 
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHPAlta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
MySQL Brasil
 
Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15
MySQL Brasil
 
Estratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQLEstratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQL
MySQL Brasil
 
Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15
MySQL Brasil
 
Serviços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e JavaServiços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e Java
MySQL Brasil
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
MySQL Brasil
 
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
MySQL Brasil
 
Desenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQLDesenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQL
MySQL Brasil
 
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
MySQL Brasil
 
Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014
MySQL Brasil
 
MySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de ProdutoMySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de Produto
MySQL Brasil
 
Alta-disponibilidade com MySQL
Alta-disponibilidade com MySQLAlta-disponibilidade com MySQL
Alta-disponibilidade com MySQL
MySQL Brasil
 
MySQL Enterprise Edition Portfolio
MySQL Enterprise Edition PortfolioMySQL Enterprise Edition Portfolio
MySQL Enterprise Edition Portfolio
MySQL Brasil
 

More from MySQL Brasil (20)

MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
MySQL 8.0.1 DMR
MySQL 8.0.1 DMRMySQL 8.0.1 DMR
MySQL 8.0.1 DMR
 
Alta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL EnterpriseAlta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL Enterprise
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQL
 
Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016
 
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHPAlta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
 
Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15
 
Estratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQLEstratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQL
 
Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15
 
Serviços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e JavaServiços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e Java
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
 
Desenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQLDesenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQL
 
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
 
Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014
 
MySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de ProdutoMySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de Produto
 
Alta-disponibilidade com MySQL
Alta-disponibilidade com MySQLAlta-disponibilidade com MySQL
Alta-disponibilidade com MySQL
 
MySQL Enterprise Edition Portfolio
MySQL Enterprise Edition PortfolioMySQL Enterprise Edition Portfolio
MySQL Enterprise Edition Portfolio
 

Recently uploaded

Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
alexjohnson7307
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
Anant Gupta
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
kumarjarun2010
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Zilliz
 
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
Edge AI and Vision Alliance
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 

Recently uploaded (20)

Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
 
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 

MySQL 5.7 como Document Store

  • 1. MySQL como Document Store suporte a JSON Airton Lastori airton.lastori@oracle.com Julho-2016
  • 2. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DBA Dev Gerencial Quem?
  • 3. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Nunca usou NoSQL Usa NoSQL apenas em apps não- críticas NoSQL em apps críticas Quem?
  • 4. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 1. MySQL e seu legado 2. SQL vs NoSQL – quando usar 3. Funcionalidades NoSQL no MySQL
  • 5. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 1. MySQL e seu legado 2. SQL vs NoSQL – quando usar 3. Funcionalidades NoSQL no MySQL
  • 6. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Grandes usuários MySQL 6 Web, Cloud, Distribuído e Embarcado…
  • 7. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 7 Muitas foram start ups há poucos anos, começaram e cresceram com MySQL
  • 8. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 8 http://db-engines.com/en/ranking_trend (mar-2016)
  • 9. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | A Web Oracle Confidential – Internal/Restricted/Highly Restricted 9 Dados massivos, problemas Big Data Altíssima escala Sempre online Estratégia: hardwares commodity em nuvem + software livre Modelo relacional: difícil escalar e implementar alta disponibilidade em nuvem de hw commodity www.leavcom.com/pdf/NoSQL.pdf
  • 10. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 10 NoSQL = Não-relacional
  • 11. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 11 http://db-engines.com/en/ranking_categories 183NoSQL 12categorias
  • 12. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 12 Web = gatilho para o surgimento das tecnologias NoSQL
  • 13. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Usa MySQL como NoSQL eng.uber.com/schemaless-part-one
  • 14. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Usa MySQL como NoSQL eng.uber.com/schemaless-part-one
  • 15. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 15 Se o software tem mais tempo de desenvolvimento e é largamente utilizado, menor a probabilidade de falhar em funções básicas.
  • 16. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | “We had an unexpected loss of data on nearly every technology we used at one time or another, except MySQL.” – Pinterest Engineering Oracle Confidential – Internal/Restricted/Highly Restricted 16
  • 17. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Evolução da escalabilidade vertical do MySQL Read-only Read-write
  • 18. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle elevando o nível Um MySQL cada vez melhor 2x Engineering Staff 3x QA Staff 2x Support Staff
  • 19. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Edition Suporte + Base de Conhecimento + Hot Backup + Monitor + Oracle EM + Workbench + Plug-ins Escalabilidade Autenticação Firewall Auditoria novo TDE Criptografia MySQL Enterprise Monitor Oracle EM for MySQL Plug-ins Suporte Hot Backup Monitor & Workbench
  • 20. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 1. MySQL e seu legado 2. SQL vs NoSQL – quando usar 3. Funcionalidades NoSQL no MySQL
  • 21. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Vários modelos de dados • 1960 - navigacional – Hierárquico – Network • 1970 - SQL/relacional • 1990 - Orientado a Objetos – em parte, absorvido pelos SGBDRs • 2000 – NoSQL – o modelo relacional não resolve bem todos os problemas – apenas um Hype? será absorvido pelos SGBDRs? Oracle Confidential – Internal/Restricted/Highly Restricted 21
  • 22. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 22 SQL = implementação do modelo relacional NoSQL = tudo que não é relacional
  • 23. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL • Integridade dos dados – Schema, Normalização, Constraints (ex. FKs) • ACID, transações • SQL – Linguagem otimizável de consulta – Diga o que quer, deixe o resto com o BD – Agilidade nas consultas de dados estruturados, principalmente médio e longo prazo NoSQL • Schemaless – agilidade no desenvolvimento inicial – estruturas de dados flexíveis • JSON, arrays aninhadas • Alguns usos realmente bons – hierarquias , campos customizados, etc – persistir objetos sem ORMs – proximidade com frontend (Javascript) • Fácil de aprender e usar Oracle Confidential – Internal/Restricted/Highly Restricted 23
  • 24. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Schemaless • key-value • document • wide column • graph • Etc • Muda o modelo lógico, a visão do usuário – Outras APIs de acesso = Not Only SQL – Em muitos casos, simplifica a vida do desenvolvedor (do DBA, nem tanto...) Oracle Confidential – Internal/Restricted/Highly Restricted 24
  • 25. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 25 Relacional vs Documento
  • 26. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | É possível combinar os dois mundos? • Ter ambos schema e schemaless no mesmo stack? • Uma solução que marque todos checkboxes: 26 Developers [ x ] Schemaless [ x ] Rapid Prototyping/Simpler APIs [ x ] Document Model Operations [ x ] Performance Management/Visibility [ x ] Robust Replication, Backup, Restore [ x ] Comprehensive Tooling Ecosystem Business Owner [ x ] Don’t lose my data = ACID transactions [ x ] Capture all my data = Extensible/Schemaless [ x ] Products On Schedule/Time to Market = Rapid Development
  • 27. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Um database flexível – Mão-de-obra com conhecimentos profundos – Estável – Custos efecientes e controlados – Fácil mover dados entre instâncias – Menos Drivers – Menos Ferramentas – SQL funciona, CRUD funciona – Operacional e Analítico juntos Muitos databases diferentes – Requer repertório maior de habilidades, dificulta encontrar mão de obra com conhecimentos profundos – Muitos Drivers – Muitas Ferramentas – Mais esforço para integrar, compartilhar e mover dados – Muito mais trabalho – Separação muitas vezes desnecessária de Operacional e Analítico Por que combinar em um único database? 27
  • 28. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 1. MySQL e seu legado 2. SQL vs NoSQL – quando usar 3. Funcionalidades NoSQL no MySQL
  • 29. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 29 Suporte ao modelo chave-valor via memcached imasters.com.br/banco-de-dados/mysql-e-nosql-memcached-plugin
  • 30. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 30 MySQL com memcached +1 000 000 QPS *X86 48 cores http://dimitrik.free.fr/blog/archives/2013/11/mysql-performance-over-1m-qps-with- innodb-memcached-plugin-in-mysql-57.html
  • 31. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Whats New? MySQL 5.7.12+ • New Server Features – Native JSON datatype and storage – Generated Columns with Indexing – Over 20+ Native JSON functions – New X Protocol • New Document APIs – SQL and NoSQL/Document CRUD APIs will cross all Connectors • For BOTH Collections of Documents and Relational Tables – Initial DMR M1 includes Node.js, Java and .NET • New Interactive Shell – with Javascript, Python, SQL modes 31
  • 32. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Whats New? MySQL 5.7.12+ • New Server Features – Native JSON datatype and storage – Generated Columns with Indexing – Over 20+ Native JSON functions – New X Protocol • New Document APIs – SQL and NoSQL/Document CRUD APIs will cross all Connectors • For BOTH Collections of Documents and Relational Tables – Initial DMR M1 includes Node.js, Java and .NET • New Interactive Shell – with Javascript, Python, SQL modes 32
  • 33. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 33 Exemplo CRUD MySQL 5.7.12
  • 34. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | CREATE mysql> CREATE DATABASE json_test; mysql> USE json_test; mysql> CREATE TABLE product_info (product JSON); mysql> INSERT INTO product_info VALUES (' { "product_id" : 9, "size" : "M", "color" : "red", "fabric" : "cotton" } '); Query OK, 1 row affected (0.01 sec) 34
  • 35. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | CREATE mysql> INSERT INTO product_info VALUES (' { "product_id" : 14, "size" : "S", "price" : 15.0 } '); Query OK, 1 row affected (0.01 sec) 35
  • 36. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | READ mysql> SELECT * FROM product_info; +--------------------------------------------------------------------+ | product | +--------------------------------------------------------------------+ | {"size": "M", "color": "red", "fabric": "cotton", "product_id": 9} | | {"size": "S", "price": 15, "product_id": 14} | +--------------------------------------------------------------------+ 2 rows in set (0.00 sec) 36
  • 37. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | READ mysql> SELECT * FROM product_info WHERE product->"$.product_id"=14; +----------------------------------------------+ | product | +----------------------------------------------+ | {"size": "S", "price": 15, "product_id": 14} | +----------------------------------------------+ 1 row in set (0.00 sec) 37
  • 38. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | UPDATE mysql> UPDATE product_info SET product = '{"size": "L", "price": 15, "product_id": 14}' WHERE product->"$.product_id"=14; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> SELECT * FROM product_info WHERE product->"$.product_id"=14; +--------------------------------------------------------------------+ | product | +--------------------------------------------------------------------+ | {"size": "M", "color": "red", "fabric": "cotton", "product_id": 9} | | {"size": "L", "price": 15, "product_id": 14} | +--------------------------------------------------------------------+ 2 rows in set (0.00 sec) 38
  • 39. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DELETE mysql> DELETE FROM product_info WHERE product->"$.product_id"=14; Query OK, 1 row affected (0.01 sec) mysql> SELECT * FROM product_info; +--------------------------------------------------------------------+ | product | +--------------------------------------------------------------------+ | {"size": "M", "color": "red", "fabric": "cotton", "product_id": 9} | +--------------------------------------------------------------------+ 1 row in set (0.00 sec) 39
  • 40. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Vantagens sobre tipos TEXT/VARCHAR 1. Validação 2. Eficiência no armazenamento físico Formato binário otimizado que permite um acesso mais rápido aos elementos de matrizes 41 INSERT INTO product_info VALUES ('texto que não é JSON válido'); ERROR 3140 (22032): Invalid JSON text: "Invalid value." at position 1 in value for column 'product_info.product'.
  • 41. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Testes com dados reais • San Francisco OpenData • 206K objetos JSON • Importado de https://github.com/zemirco/sf-city-lots-json + ajustes 42 CREATE TABLE features ( id INT NOT NULL auto_increment primary key, feature JSON NOT NULL );
  • 42. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 43 { "type":"Feature", "geometry":{ "type":"Polygon", "coordinates":[ [ [-122.42200352825247,37.80848009696725,0], [-122.42207601332528,37.808835019815085,0], [-122.42110217434865,37.808803534992904,0], [-122.42106256906727,37.80860105681814,0], [-122.42200352825247,37.80848009696725,0] ] ] }, "properties":{ "TO_ST":"0", "BLKLOT":"0001001", "STREET":"UNKNOWN", "FROM_ST":"0", "LOT_NUM":"001", "ST_TYPE":null, "ODD_EVEN":"E", "BLOCK_NUM":"0001", "MAPBLKLOT":"0001001" } }
  • 43. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Comparação de Performance: JSON vs TEXT 44 # tipo JSON SELECT DISTINCT feature->"$.type" as json_extract FROM features; +--------------+ | json_extract | +--------------+ | "Feature" | +--------------+ 1 row in set (1.25 sec) # tipo TEXT SELECT DISTINCT feature->"$.type" as json_extract FROM features; +--------------+ | json_extract | +--------------+ | "Feature" | +--------------+ 1 row in set (12.85 sec) JSON 10x mais rápido que TEXT numa busca full scan (sem índice, 206K documentos)
  • 44. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Generated Columns 45 id my_integer my_integer_plus_one 1 10 11 2 20 21 3 30 31 4 40 41 UPDATE t1 SET my_integer_plus_one = 10 WHERE id = 1; ERROR 3105 (HY000): The value specified for generated column 'my_integer_plus_one' in table 't1' is not allowed. Coluna atualizada automaticamente com base na definição CREATE. Somente leitura, é claro! CREATE TABLE t1 ( id INT NOT NULL PRIMARY KEY auto_increment, my_integer INT, my_integer_plus_one INT AS (my_integer + 1) );
  • 45. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Indexando via Generated Columns 46 ALTER TABLE features ADD feature_type VARCHAR(30) AS (feature->"$.type"); Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 ALTER TABLE features ADD INDEX (feature_type); Query OK, 0 rows affected (0.73 sec) Records: 0 Duplicates: 0 Warnings: 0 SELECT DISTINCT feature_type FROM features; +--------------+ | feature_type | +--------------+ | "Feature" | +--------------+ 1 row in set (0.06 sec) Down from 1.25 sec to 0.06 sec Creates index only. Does not modify table rows. Meta data change only (FAST). Does not need to touch table.
  • 46. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Virtual vs. Stored Generated Columns Performance • Approximate worst case scenario via a table scan: 47 SELECT DISTINCT feature_type FROM features; +--------------+ | feature_type | +--------------+ | "Feature" | +--------------+ VIRTUAL-TEXT (9.89 sec) STORED-TEXT (0.22 sec) VIRTUAL-JSON (0.85 sec) STORED-JSON (0.24 sec) Clarification: Since indexes are materialized (stored) themselves, the real-life case for STORED is when generating the column is computationally expensive and you can not use indexes effectively.
  • 47. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Indexing Options Available 48 STORED VIRTUAL Primary and Secondary BTREE, Fulltext, GIS Mixed with fields Requires table rebuild Not Online Secondary Only BTREE Only Mixed with fields No table rebuild INSTANT Alter Faster Insert Bottom Line: Unless you need a PRIMARY KEY, FULLTEXT or GIS index VIRTUAL is probably better.
  • 48. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Compression Performance (16K Page) 49 May compress well - Schemaless means that the keys are repeated in each of the documents; repetition improves compression performance MySQL 5.7 also supports 32KB and 64KB pages (improved compression) SELECT name, ((file_size-allocated_size)*100)/file_size as compressed_pct from information_schema.INNODB_SYS_TABLESPACES WHERE name like 'test/features'; +---------------+----------------+ | name | compressed_pct | +---------------+----------------+ | test/features | 59.2634 | +---------------+----------------+ 1 row in set (0.01 sec) Using real-life data set from earlier (16K Page)
  • 49. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 50 Funções JSON: além do CRUD JSON_ARRAY_APPEND() JSON_ARRAY_INSERT() JSON_ARRAY() JSON_CONTAINS_PATH() JSON_CONTAINS() JSON_DEPTH() JSON_EXTRACT() JSON_INSERT() JSON_KEYS() JSON_LENGTH() JSON_MERGE() JSON_OBJECT() JSON_QUOTE() JSON_REMOVE() JSON_REPLACE() JSON_SEARCH() JSON_SET() JSON_TYPE() JSON_UNQUOTE() JSON_VALID() https://dev.mysql.com/doc/refman/5.7/en/json-functions.html
  • 50. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | JSON_EXTRACT() 51 mysql> SELECT DISTINCT JSON_EXTRACT(feature, '$.type') FROM features; +---------------------------------+ | JSON_EXTRACT(feature, '$.type') | +---------------------------------+ | "Feature" | +---------------------------------+ 1 row in set (1.22 sec)
  • 51. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Unquote JSON String mysql> SELECT DISTINCT JSON_UNQUOTE(feature->"$.type") AS feature_type FROM features; +-----------------+ | feature_type | +-----------------+ | Feature | +-----------------+ 1 row in set (1.22 sec) 52
  • 52. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | JSON Array Creation 53 SELECT JSON_ARRAY(id, feature->"$.properties.STREET", feature->'$.type") AS json_array FROM features ORDER BY RAND() LIMIT 3; +-------------------------------+ | json_array | +-------------------------------+ | [65298, "10TH", "Feature"] | | [122985, "08TH", "Feature"] | | [172884, "CURTIS", "Feature"] | +-------------------------------+ 3 rows in set (2.66 sec)
  • 53. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | JSON_REPLACE 54 SELECT JSON_REPLACE(feature, '$.type', JSON_ARRAY('feature', 'bug')) as json_object FROM features LIMIT 1; +--------------------------------------------------------+ | json_object | +--------------------------------------------------------+ | {"type": ["feature", "bug"], "geometry": {"type": ..}} | +--------------------------------------------------------+
  • 54. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | JSON Object Creation 55 SELECT JSON_OBJECT('id', id, 'street', feature->"$.properties.STREET", 'type', feature->"$.type" ) AS json_object FROM features ORDER BY RAND() LIMIT 3; +--------------------------------------------------------+ | json_object | +--------------------------------------------------------+ | {"id": 122976, "type": "Feature", "street": "RAUSCH"} | | {"id": 148698, "type": "Feature", "street": "WALLACE"} | | {"id": 45214, "type": "Feature", "street": "HAIGHT"} | +--------------------------------------------------------+ 3 rows in set (3.11 sec)
  • 55. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 56 Funções JSON JSON_ARRAY_APPEND() JSON_ARRAY_INSERT() JSON_ARRAY() JSON_CONTAINS_PATH() JSON_CONTAINS() JSON_DEPTH() JSON_EXTRACT() JSON_INSERT() JSON_KEYS() JSON_LENGTH() JSON_MERGE() JSON_OBJECT() JSON_QUOTE() JSON_REMOVE() JSON_REPLACE() JSON_SEARCH() JSON_SET() JSON_TYPE() JSON_UNQUOTE() JSON_VALID() https://dev.mysql.com/doc/refman/5.7/en/json-functions.html
  • 56. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Whats New?MySQL 5.7.12+ • New Server Features – Native JSON datatype and storage – Generated Columns with Indexing – Over 20+ Native JSON functions – New X Protocol • New Document APIs – SQL and NoSQL/Document CRUD APIs will cross all Connectors • For BOTH Collections of Documents and Relational Tables – Initial DMR M1 includes Node.js, Java and .NET • New Interactive Shell – with Javascript, Python, SQL modes 57
  • 57. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Arquitetura 58 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
  • 58. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | XDev API • Foco: facilidade de uso • Abstração sobre SQL para operações CRUD • Add • Find • Modify • Remove • Sort • Create Index • X Sessions & Node Sessions – abstração da conexão com BD • Atualização dos conectores – Connector/J – Connector/Net – Connector/Node.js Oracle Confidential – Internal/Restricted/Highly Restricted 59
  • 59. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 60 CRUD: Documento vs Relacional
  • 60. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 61 MySQL Shell
  • 61. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 63
  • 62. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 64
  • 63. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 65
  • 64. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Coluna • Mais integridade no schema, independente da aplicação • Schema torna a aplicação mais fácil de manter no longo prazo, pois há maior controle nas mudanças – Espera-se uma maior qualidade dos dados – Permite aplicação de algumas validações automáticas sobre os dados JSON • Mais liberdade para representar dados (ex. Campos custom) • Denormalização natural, registro auto- contido (ex. facilita escalabilidade horizontal via sharding) • Protótipos rápidos, comece armazenar dados imediatamente • Menor preocupação na definição de Tipos de Dados • Menos dor-de-cabeça para aplicar mudanças no modelo de dados Oracle Confidential – Internal/Restricted/Highly Restricted 66 Coluna ou JSON? Você escolhe!
  • 65. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Modelo híbrido: Schema + Schemaless 67 CREATE TABLE product_info_hybrid ( product_id INT NOT NULL PRIMARY KEY, description VARCHAR(60) NOT NULL, vendor VARCHAR(30) NOT NULL, price FLOAT NOT NULL, attributes JSON NOT NULL );
  • 66. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Sumário 1. O movimento NoSQL é de grande relevância e tem os gigantes da Web como protagonistas 2. MySQL continua muito relevante na Web com a vantagem de ser extremamente popular e maduro 3. Novas funcionalidades Document Store do MySQL são exemplo de como bancos relacionais podem abraçar o NoSQL
  • 67. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Links úteis para seguir com os testes 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 69
  • 68. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Obrigado! Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
  • 69. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | @MySQLBR meetup.com/MySQL-BRfacebook.com/MySQLBR pt.planet.mysql.com
  • 70. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Perguntas? MySQL como Document Store Contato: airton.lastori@oracle.com twitter.com/mysqlbr facebook.com/mysqlbr