Upload
mysql-brasil
View
343
Download
4
Tags:
Embed Size (px)
DESCRIPTION
O MySQL é o banco de dados open source mais popular do mundo, usado em grandes sites, games, aplicações mobile e embarcadas. Há várias opções de arquiteturas e APIs, oferecendo enorme flexibilidade, escalabilidade e alta-disponibilidade. Instale e comece a usar em menos de 15min.
Citation preview
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1
Airton Lastori [email protected]
14-mar-2013
MySQL para Desenvolvedores de Games
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 2
@MySQLBR
meetup.com/MySQL-BR
facebook.com/MySQLBR
MySQLBR
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 3
Alguns clientes MySQL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 4
Alguns clientes MySQL
fonte: alexa.com/topsites 30-jan-2013
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 5
Alguns clientes MySQL
mysql.com/customers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 6
Alguns clientes MySQL
mysql.com/customers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 7
MySQL: casos de sucesso
+ de 20 indústrias
mysql.com/customers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 8
Indústria: Games
mysql.com/customers/industry/?id=83
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 9
Seu game precisa de um SGBD?
Qual o tipo de distribuição do game?
Download, Streaming, Online, Mobile...
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 10
Quase todos tipos de games modernos
necessitam de um sistema robusto de
armazenamento de dados
Dependendo da distribuição, o banco de dados pode ser
embarcado, centralizado ou distribuído.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 11
Game sem UI
MySQLgame
mysqlgame.com
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 12
Como escolher um SGBD?
Desafio de desenvolvedor #1
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 13
…pense nos requisitos não funcionais…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 14
Na escolha da solução, considerar...
Escalabilidade, performance, disponibilidade,
estabilidade, segurança, simplicidade, flexibilidade,
custo total de propriedade, conhecimento da equipe...
Ah! Não esqueça da fase de produção, dos DBAs...
ferramentas, suporte, rotinas de manutenção.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 15
MySQL para desenvolvedores
Portfolio
Ambiente de desenvolvimento
Escalabilidade e Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 16
MySQL para desenvolvedores
Portfolio
Ambiente de desenvolvimento
Escalabilidade e Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 17
MySQL Database Community Server
MySQL Cluster
MySQL Workbench
MySQL Connectors
MySQL Proxy
Documentação não GPL
Forums, Lists, Bugs, Blogs…
Compromisso Oracle com MySQL Community Portfólio disponível para download e uso sob GPL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 18
Conectores: amplo suporte a várias linguagens
Oracle
• Connector/ODBC
• Connector/Net (ADO.NET)
• Connector/Python
• Connector/J (JDBC)
• Connector/C (C API)
• Connector/C++ (C++ API)
Comunidade
• PHP
• Perl
• Ruby
• TCL
• Eiffel
• …
dev.mysql.com/doc/refman/5.5/en/connectors-apis.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 19
Oracle Premier Lifetime Support
Oracle Product Certifications/Integrations
MySQL Enterprise High Availability
MySQL Enterprise Security
MySQL Enterprise Scalability
MySQL Enterprise Backup
MySQL Enterprise Monitor/Query Analyzer
MySQL Workbench
MySQL Enterprise Edition Maior produtividade e mitigação de riscos
MySQL Enterprise Audit
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 20
MySQL para desenvolvedores
Portfolio
Ambiente de desenvolvimento
Escalabilidade e Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 21
Desafio de desenvolvedor #2
Instalação básica, ambiente de
desenvolvimento…
...em 15 minutos, ou menos!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 22
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 23
mysql.com/downloads/mysql
No Linux ou Mac, prefira os binários
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 24
Client mysql / mysql.exe
Server mysqld / mysqld.exe
Cliente-Servidor
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 25
Iniciar ou Parar o servidor MySQL no Windows
…ou via MySQL Notifier
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 26
Iniciar ou Parar o servidor MySQL no Linux
/usr/local/mysql/bin> mysqld_safe --defaults-file=/etc/my.cnf &
/usr/local/mysql/bin> mysqladmin shutdown
Parar:
Iniciar:
dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 27
Primeira conexão
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -uroot -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 28
Teste via MySQL Workbench 1/2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 29
Teste via MySQL Workbench 2/2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 30
App + Connector JDBC, ODBC, .Net, PHP, Python, Perl, Ruby, Native C API…
Server mysqld / mysqld.exe
Cliente-Servidor
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 31
Desafio de desenvolvedor #3
Hello World…
...em Java
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 32
Adicione o driver MySQL ao CLASSPATH caminho completo do .jar
C:\>set CLASSPATH
CLASSPATH=.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip;C:\Program
Files\MySQL\mysql-connector-java-5.1.22\mysql-connector-java-5.1.22-bin.jar
Confira:
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 33
HelloMysql.java 1/2
import java.sql.*;
public class HelloMysql {
public static void main(String args[]){
System.out.println("Tentando conectar ao MySQL...");
try {
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/mysql";
String usuario = "root";
String senha = "root";
Connection con = DriverManager.getConnection(url, usuario, senha);
System.out.println("URL: " + url);
System.out.println("Connection: " + con);
Continua…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 34
HelloMysql.java 2/2 Statement stmt = con.createStatement(); //objeto Statement
ResultSet rs; //objeto ResultSet
rs = stmt.executeQuery("SELECT * FROM world.country");
System.out.println("Ola mundo!");
while(rs.next()){
String nomePais = rs.getString("Name");
System.out.print(nomePais + ", ");
}//end while
con.close();
} catch( Exception e ) {
e.printStackTrace();
}//end catch
}//end main
}//end class HelloMysql PRONTO!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 35
java HelloMysql C:\tutorial>javac HelloMysql.java
C:\tutorial>java HelloMysql
Tentando conectar ao MySQL...
URL: jdbc:mysql://localhost:3306/mysql
Connection: com.mysql.jdbc.JDBC4Connection@ed07f45
Ola mundo!
Aruba, Afghanistan, Angola, Anguilla, Albania, Andorra, Netherlands Antilles, Un
ited Arab Emirates, Argentina, Armenia, American Samoa, Antarctica, French South
ern territories, Antigua and Barbuda, Australia, Austria, Azerbaijan, Burundi, B
elgium, Benin, Burkina Faso, Bangladesh, Bulgaria, Bahrain, Bahamas, Bosnia and
Herzegovina, Belarus, Belize, Bermuda, Bolivia, Brazil, Barbados, Brunei, Bhutan
…
ietnam, Vanuatu, Wallis and Futuna, Samoa, Yemen, Yugoslavia, South Africa, Zamb
ia, Zimbabwe,
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 36
Próximo passo: documentação
Reference Manual
1. Tutorial
2. SQL Syntax
3. Connectors & APIs, Memcached
4. Functions, Views, Stored Programs
5. Optimization
dev.mysql.com/doc/refman/5.5/en/index.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 37
MySQL para desenvolvedores
Portfolio
Ambiente de desenvolvimento
Escalabilidade e Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 38
Desafio do desenvolvedor #4
Projetar uma solução para
disponibilidade 24x7…
...a famosa alta-disponibilidade
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 39
% 9 9 9 9 35 dias 4 days 50 min 5 min 8 horas
Replicação
Clustering &
Virtualização
Clustering &
Redundância
Geográfica
ISPs &
Corporativo
On-Line
Services
eCommerce
Telecoms, Militar
. 9 4 dias
Cu
sto
& C
om
ple
xid
ad
e
Alta-Disponibilidade
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 40
Aplicação
Master Slave
• Modelo assíncrono (padrão)
• Modelo semi-síncrono (a partir da versão 5.5)
Escritas & Leituras
Replicação MySQL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 41
Aplicação
Master Slave
• Master down
• Slave promovido para Master
Escritas & Leituras
MySQL failover
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 42
Replicação
Clustering &
Virtualização
Clustering &
Redundância
Geográfica
Replicação
DRBD
Cu
sto
& C
om
ple
xid
ad
e
Alta-Disponibilidade
% 9 9 9 9 35 dias 4 days 50 min 5 min 8 horas
eCommerce
Telecoms, Militar
. 9 4 dias
ISPs &
Corporativo
On-Line
Services
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 43
Soluções certificadas MySQL HA: resumo
mysql.com/why-mysql/white-papers/mysql_wp_ha_strategy_guide.php
MySQL 5.6
Replication
Windows
Cluster
Solaris
Cluster
Oracle VM
Template DRBD
MySQL
Cluster
Nível de disponibilidade 99.9% 99.95% 99.99% 99.99% 99.99% 99.999%
Auto-Failover ✔ ✔ ✔ ✔ ✔ ✔
Sem perda de dados durante
failover ✔
Semi-Sync ✔ ✔ ✔ ✔ ✔
Plataformas suportadas All Windows Solaris Linux Linux All
Modo de clusterização Master +
Slaves
Active /
Passive
Active /
Passive
Active /
Passive
Active /
Passive
Multi-
Master
Dispensa Shared Storage ✔ ✖ ✖ ✖ ✔ ✔
Ponto único de suporte ✔ ✖ ✔ ✔ ✔ ✔
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 44
Desafio do desenvolvedor #5
Projetar uma solução que possa
crescer para comportar milhões
de usuários…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 45
Scale Out
• Adicionar mais servidores para
aumentar performance
• MySQL adota esta abordagem
em sistemas altamente
escaláveis em hardware
commodity (Intel / AMD)
Scale Up
• Trocar por hardware mais
poderoso, adicionar memória,
CPU
• Outras soluções normalmente
usam hardware proprietário
(SMP)
Escalabilidade: horizontal vs vertical
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 46
2008
até 4 CPU
MySQL 5.0
MySQL AB
até 16 CPU
MySQL 5.1
Sun
até 32 CPU
MySQL 5.5
Oracle
até 48 CPU
MySQL 5.6
Evolução da escalabilidade do MySQL
2009 2010 2013
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 50
Replicação MySQL: escalando LEITURAS
• Divisão de leituras e escritas (R/W Split)
• É possível adicionar mais slaves, dividir a carga
Leituras
Aplicação
Master Slave
Escritas & Leituras
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 51
Data Node 1
Data Node 2
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 52
Data Node 1
Data Node 2
F1
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 53
Data Node 1
Data Node 2
F1
F3
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 54
Data Node 1
Data Node 2
F1
F3
Data Node 3
Data Node 4
F2
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 55
Data Node 1
Data Node 2
F1
F3
Data Node 3
Data Node 4
F2
F4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 56
Desafios do desenvolvedor #4 + #5
É possível combinar alta-
disponibilidade e escalabilidade?
...assim como Facebook, Twitter, Youtube
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 57
Data Node 1
Data Node 2
F1
F1
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 58
Data Node 1
Data Node 2
F1 F3
F1
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1 F3
Data Sharding + Replicação
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 59
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2
F2
Table T1
P2
P3
P4
P1
Alta-Disponibilidade: Replicação Síncrona
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 60
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2 F4
F4 F2
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 61
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2 F4
F4 F2
Gro
up
1
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Gro
up
2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 62
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2 F4
F4 F2
Gro
up
1
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Gro
up
2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 64
MySQL Cluster
• Arquitetura shared-nothing in-memory parallel
• Modelo relacional ACID, SQL
Carrier Grade Database
• 99.999% de disponibilidade
• Self-healing, failover abaixo de 1 segundo Alta Disponibilidade
• Performance em tempo real para altas cargas
• Latência baixa e preditiva Alta Performance
• Elasticidade, crescimento incremental
• Escalabilidade linear, distribuition aware Escalabilidade
• Open Source, hardware commodity
• APIs NoSQL (C++, Java, Memcached, Node.js) Open Source
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 65
Alguns Clientes MySQL Cluster
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 66
Alguns Clientes MySQL Cluster
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 67
MySQL Cluster Data Nodes
Data Layer
Clients
Application Layer
Management
MySQL Cluster: auto-sharding
Table T1
P2
P3
P4
P1 F1
F3
F3
F1 F2
F4
F4
F2
Management
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 68
Os mesmos dados
acessados
simultaneamente
através de interfaces
SQL e NoSQL
APIs de Acesso aos Dados
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 69
•2 milhões usuários, com 30.000 novos
usuários por dia
•10.000 usuários concorrentes
•10.000 Transações Por Segundo
•99.999% uptime
“The MySQL support service has
been essential in helping us for
troubleshooting and giving
recommendations for the production
cluster.” Carlos Morales (DBA), Playfulplay.com
blogs.oracle.com/MySQL/entry/mysql_cluster_powers_el_chavo
Caso de sucesso
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 70
MySQL Cluster Auto-Install (beta)
Simples de instalar e provisionar clusters multi-node
Complementa MySQL Cluster Manager no gerenciamento de cliclo de vida
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 71
1. Download MCM/Cluster edelivery.oracle.com:
2. Unzip e execute o comando:
MySQL Cluster Manager Para testes em uma única máquina
C:\MySQL\mcm\bin> mcmd –bootstrap
MySQL Cluster Manager 1.1.2 started
Connect to MySQL Cluster Manager by running “C:\MySQL\mcm\bin\mcm" -a NOVA:1862
Configuring default cluster 'mycluster'...
Starting default cluster 'mycluster'...
Cluster 'mycluster' started successfully
ndb_mgmd NOVA:1186
ndbd NOVA
ndbd NOVA
mysqld NOVA:3306
mysqld NOVA:3307
ndbapi *
Connect to the database by running “C:\MySQL\mcm\cluster\bin\mysql" -h NOVA -P 3306 -u root
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 72
Mais sobre como começar com MySQL Cluster
Whitepaper:
MySQL Cluster Evaluation Guide
February 2012
mysql.com/why-mysql/white-papers/mysql-
cluster-evaluation-guide/
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 73
Exemplos Memcached API
On-demand Webinar:
NoSQL Memcached API for MySQL Cluster
22 August 2012
mysql.com/news-and-events/on-demand-webinars/display-od-723.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 74
Exemplos JavaScript / Node.js API
Blog:
Tutorial Getting Started with the NoSQL JavaScript / Node.js API for
MySQL Cluster
10 June 2012
blogs.oracle.com/MySQL/entry/tutorial_getting_started_with_the
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 75
Sumário
O MySQL é o banco de dados open source mais popular do
mundo, usado em grandes sites, games, aplicações mobile e
embarcadas.
Há várias opções de arquiteturas e APIs, oferecendo enorme
flexibilidade, escalabilidade e alta-disponibilidade.
Instale e comece a usar em menos de 15min. Use e abuse da
documentação!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 76
@MySQLBR
meetup.com/MySQL-BR
facebook.com/MySQLBR
Obrigado!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 77
Perguntas?
MySQL para Desenvolvedores
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 78
Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl
Connection Pool, SQL Interface, Parser, Optimizer, Caches Enterprise Management
Services and Utilities
Backup & Recovery
Monitor
Workbench
Utilities
mysqld
Clients and Apps
Arquitetura MySQL Server
Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc…
Filesystems, Files and Logs Data, Index, Redo, Undo, Binary, Error, Slow
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 79
Storage Engines
MyISAM InnoDB NDB Cluster
Transações ✖ ✔ ✔
Nível de Lock Tabela Linha Linha
Replicação Assíncrona ou
Semi-síncrona
Assíncrona ou
Semi-síncrona Síncrona, Multi-master
Foreign Keys ✖ ✔ a partir da v7.3
Full-text indexes ✔ a partir da v5.6 ✖
Compressão de dados somente Leitura ✔ ✖
Caches somente Índices Dados e Índices Dados e Índices
Suporte Geospacial Tipos de Dados e Índices somente Tipos de Dados somente Tipos de Dados
Limite de armazenamento 256TB 64TB 384EB
dev.mysql.com/doc/refman/5.5/en/storage-engines.html