SlideShare a Scribd company logo
<Insert Picture Here>




Tutorial MySQL com Java
                                Airton Lastori
                          airton.lastori@oracle.com

                                         08-out-2012
Alguns clientes MySQL




 Web & Enterprise           OEM & ISVs



                    Cloud

                     2
Várias Indústrias




             mysql.com/customers

                       3
Quando usar MySQL?




        4
Resumo: onde o MySQL se encaixa
• Novas aplicações e aplicações customizadas Ad-hoc
    •   principalmente arquitetura Web (ex. Linux+Apache+MySQL+Java)
    •   arquiteturas inovadoras, NoSQL (versão 5.6 e Cluster 7.2)
• Aplicações híbridas
    •   expansão de sistemas legados
    •   MySQL como front-end e Oracle DB como back-end
• Online e SaaS
    •   E-commerce/OLTP e pagamentos digitais
    •   Gerenciamento de Conteúdo (CMS)
    •   Redes Sociais, mensagens e colaboração
    •   Games Sociais e MMO
    •   Gerenciamento de Sessão e Autenticação do usuário
• Datamarts e Relatórios Departamentais
• SMS, e-marketing, Infra Telecom, Infra TI
• Embarcadas

                                            5
MySQL em Aplicações Enterprise

                                         Aplicações Corporativas de Missão Crítica
Importancia/Complexidade



                                                   Finanças Globais, ERP, SCM, CRM, HR



                                                Aplicações Críticas para o Negócio
                                                   Impacto no negócio, Interdepartamentais



                                                             Aplicações Operacionais
                                                               De suporte, Departamentais




                           Corporativo                 Departamental
                                               6
Quando custa o MySQL?




          7
Portfolio Open Source (GPL)


• MySQL Database (Community Server)         5.5.27 GA e 5.6.6 DMR

• MySQL Cluster (NDB Community) 7.2.7 GA
• MySQL Workbench Community Edition              5.2.40 GA
   • MySQL Utilities (em Python)
• MySQL Connectors
   • ODBC, Java, .Net, C, C++, PHP, OpenOffice
• MySQL Proxy 0.8.2 Alpha
• Documentação: livre para uso, não coberto pela GPL
• Forums
                  dev.mysql.com/downloads

                              8
MySQL Enterprise Edition.
Indicado para empresas ou pessoas físicas que pretendem
aumentar produtividade, diminuir riscos e explorar mais
a fundo e aumentar as capacidades do MySQL.

                             Oracle Premier
                            Lifetime Support
              MySQL Enterprise              Oracle Product
                  Security            Certifications/Integrations

         MySQL Enterprise                        MySQL Enterprise
              Audit                            Monitor/Query Analyzer

   MySQL Enterprise                                   MySQL Enterprise
      Scalability                                         Backup

 MySQL Enterprise
                                                         MySQL Workbench
  High Availability
Arquitetura do MySQL
MySQL Database
     Performance, Confiabilidade, Facilidade de Uso
                                                Gerenciamento
      Suporte às mais
                                                eficiente e multi-
      conhecidas
                                                thread de sessões
      plataformas/linguagens
      de desenvolvimento


Parsing completo
DML+DDL,
otimizador,
baseado em custo,
caching de queries
e resultados



 Várias opções de
 Storage Engine
 para necessidades
 específicas das
 aplicações

                                                Opções flexíveis de
                                                logging e
                                                armazenamento
                                                físico
InnoDB no MySQL
- Storage Engine mais utilizado
    - aplicações Web 2.0
    - aplicações de varejo
    - aplicações de entretenimento & mídia
-   ACID, transacional
-   Crash recovery
-   Integridade referencial
-   Suporta altos níveis de usuários concorrentes
-   No MySQL versão 5.5
    - padrão
    - otimizado para hardware multi-core, multi-thread e SOs
Como instalar o MySQL?
MySQL Installer for Windows
• Interface gráfica nativa do
  Windows
• Todos produtos MySQL para
  desenvolvimento em UM único
  pacote
   •   MySQL Database
   •   MySQL Connectors
   •   MySQL Workbench e exemplos de
       modelos
   •   Exemplos de bancos de dados
   •   Documentação
• Alta integração de produtos,
  download sob demanda,
  funcionalidades de atualização
MySQL Installer for Windows
   Selecione


                  Atualize


                               Configure




mysql.com/downloads
No Linux ou Mac, prefira os binários




       mysql.com/downloads/mysql
Tutorial MySQL em 10 minutos




slideshare.net/MySQLBR/mysql-em-10min-alexandre-almeida-hti-tecnologia
No Linux ou Mac, instale também o
Connector/J




    mysql.com/downloads/connector/j
Teste via MySQL Workbench 1/2
Teste via MySQL Workbench 2/2
Teste via MySQL Client
(opcional)

C:Program FilesMySQLMySQL Server 5.5bin>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>
Administre via MySQL Workbench 1/3
Administre via MySQL Workbench 2/3
Administre via MySQL Workbench 3/3
Parar ou Iniciar o servidor MySQL
(opcional)




Ou via MySQL Notifier
Tudo certo com seu ambiente Java? 1/2
Instalar e configurar JDK e path

oracle.com/technetwork/java/javase/downloads
Tudo certo com seu ambiente Java? 2/2
JDK e path configurados

C:Program FilesMySQLMySQL Server 5.5bin>java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)


C:Program FilesMySQLMySQL Server 5.5bin>javac
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging inf
...o
Hello world MySQL!
Adicione o driver MySQL ao CLASSPATH
caminho completo do .jar




Confira:
C:>set CLASSPATH
CLASSPATH=.;C:Program Files (x86)Javajre6libextQTJava.zip;C:Program Files
MySQLmysql-connector-java-5.1.22mysql-connector-java-5.1.22-bin.jar
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…
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

                                                                  FIM!
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
, Bouvet Island, Botswana, Central African Republic, Canada, Cocos (Keeling) Isl
ands, Switzerland, Chile, China, Côte d’Ivoire, Cameroon, Congo, The Democrati
c Republic of the, Congo, Cook Islands, Colombia, Comoros, Cape Verde, Costa Ric
a, Cuba, Christmas Island, Cayman Islands, Cyprus, Czech Republic, Germany, Djib
…
ietnam, Vanuatu, Wallis and Futuna, Samoa, Yemen, Yugoslavia, South Africa, Zamb
ia, Zimbabwe,
Revisão: Conceitos importantes

• Como conectar o Java ao MySQL

• Entender o CLASSPATH




                         34
Revisão: conectando o Java ao MySQL

• O driver JDBC é chamado MySQL Connector/J
   • Desenvolvido pela Oracle sob licença GPL
• Driver Type IV (todo java, nativo)
• Disponível para baixar em:
    • Software
        • dev.mysql.com/downloads/connector/j
        • Maven, Ivy
        • Many Linux and BSD distributions
    • Documentation
        • dev.mysql.com/doc/refman/5.5/en/connector-j.html




                                35
Revisão: Entendendo o CLASPATH

• O classpath é o local onde o Java procura por código
  compilado (biblioteca)
• Há locais padrão para o classpath
     • WEB-INF/lib, WEB-INF/classes in webapps
     • $JRE_HOME/lib/ext
• Quando estiver desenvolvendo ou implantando evite
  estes locais
     • $JRE_HOME/lib/ext
     • Application-server-wide
        • e.g. $CATALINA_HOME/lib
• Se possível deixe este trabalho para sua IDE


                           36
Crie um usuário no MySQL.




            37
Criando usuário
      public User createUser(Connection c, String                   } catch (SQLException sqlEx) {
login, String firstName, String lastName, String
                                                                           // handle it, it's not a concern outside
credentials) {
                                                         of persistence
           PreparedStatement p = null;                              } finally {
           try {                                                           try {
                 p = c.prepareStatement("INSERT
                                                                                   if (p != null) { p.close(); };
INTO user (login, first_name, last_name,
passwd_hash) VALUES (?, ?, ?, ?)");                                        } catch (SQLException sqlEx) {
                    p.setString(1, login);                                         // can't do anything here, log?
                    p.setString(2, firstName);                             }
               ResultSet rs =                                       }
p.getGeneratedKeys();                                         }
                    rs.next();
                    long id = rs.getLong(1);
                    PersistentUser user = new
PersistentUser();                                                            Estes tipos de
                    user.setId(id);                                     acesso é conhecido
                    return user;
                                                                         como Raw JDBC…

                                                    38
Arquitetando para o sucesso
        com MySQL!

          Applications start small
          If they’re successful, they don’t stay that way
Arquitetando para o Sucesso
Um Anti-Pattern

                                  Presentation
                                                    Presentation
                               Presentation
                     Presentation
                      Presentation               Presentation
                  Presentation    Presentation
                                    Presentation
   BusinessLogic               Presentation Presentation
                          Presentation
                  BusinessLogic                    BusinessLogic
                                         Presentation
                                        Presentation
               BusinessLogic          BusinessLogic BusinessLogic
                                                   BusinessLogic
                         BusinessLogicBusinessLogic        Persistence
           BusinessLogic        Persistence                        Persistence
                          BusinessLogic              Persistence
                  BusinessLogic              BusinessLogic
  Persistence
                  BusinessLogic BusinessLogic              Persistence
                         Persistence
                                Persistence                        Persistence
                                   BusinessLogic     Persistence
  Persistence                                                       Persistence
                         Persistence Persistence                            Persistence
                                                             Persistence
          Persistence
                                  Persistence




                                           40
Arquitetando para o Sucesso
    Um Anti-Pattern
Quero usar uma lógica daqui…
                                  Presentation
                                                      Presentation
                                 Presentation
                       Presentation
                        Presentation
                    Presentation    Presentation
                                      Presentation
                                                   Presentation
                                                                         …aplicar aqui…
     BusinessLogic               Presentation Presentation
                            Presentation
                    BusinessLogic                    BusinessLogic
                                           Presentation
                                          Presentation
                 BusinessLogic          BusinessLogic BusinessLogic
                                                     BusinessLogic
                           BusinessLogicBusinessLogic        Persistence          …no contexto
             BusinessLogic        Persistence                        Persistence
                            BusinessLogic              Persistence                           desta
                    BusinessLogic              BusinessLogic
    Persistence
                    BusinessLogic BusinessLogic              Persistence                 trasação.
                           Persistence
                                  Persistence                        Persistence
                                     BusinessLogic     Persistence
    Persistence                                                       Persistence
                           Persistence Persistence                            Persistence
                                                               Persistence
            Persistence
                                    Persistence




                                                 41
Arquitetando para o Sucesso
Comece limpo


                Presentation




               Business Logic




                Persistence




                      42
Arquitetando para o Sucesso
       Comece limpo


                       Presentation


Transactions




                      Business Logic




                       Persistence




                             43
Arquitetando para o Sucesso
          Comece limpo


                          Presentation


Transactions




                         Business Logic


Caching



                          Persistence




                                44
Arquitetando para o Sucesso
          Comece limpo


                          Presentation    } Test this

Transactions




                         Business Logic   } Test this

Caching



                          Persistence     } Test this



                                45
Arquitetando para o Sucesso
Use ferramentas adequadas

• Using Maven to manage the depedencies/build

• Using SpringFramework
    • Dependency Injection
    • Templates/Boilerplate/Integration

• Uma boa IDE: NetBeans, Eclipse




                               46
Arquitetura em Camadas
    Exemplo Criar Usuário
         @Override
     public User createUser(String login, String firstName, String lastName, String credentials) {
         jdbcTemplate.update("INSERT INTO user (login, first_name, last_name, passwd_hash)
VALUES (?, ?, ?, ?)", login, firstName, lastName, credentials);


           long id = jdbcTemplate.queryForLong("SELECT LAST_INSERT_ID()");


           PersistentUser user = new PersistentUser();
           user.setId(id);
           user.setLogin(login);
           user.setFirstName(firstName);
           user.setLastName(lastName);
           user.setCredentials(credentials);


           return user;
     }


                                                     47
Como era no Raw JDBC
      public User createUser(Connection c, String                   } catch (SQLException sqlEx) {
login, String firstName, String lastName, String
                                                                           // handle it, it's not a concern outside
credentials) {
                                                         of persistence
           PreparedStatement p = null;                              } finally {
           try {                                                           try {
                 p = c.prepareStatement("INSERT
                                                                                   if (p != null) { p.close(); };
INTO user (login, first_name, last_name,
passwd_hash) VALUES (?, ?, ?, ?)");                                        } catch (SQLException sqlEx) {
                    p.setString(1, login);                                         // can't do anything here, log?
                    p.setString(2, firstName);                             }
               ResultSet rs =                                       }
p.getGeneratedKeys();                                         }
                    rs.next();
                    long id = rs.getLong(1);
                    PersistentUser user = new
PersistentUser();                                                            Estes tipos de
                    user.setId(id);                                     acesso é conhecido
                    return user;
                                                                         como Raw JDBC…

                                                    48
Resolvendo erros comuns
      com MySQL!



           65
Class not found

• java.lang.ClassNotFoundException:
 com.mysql.jdbc.Driver
   • The driver is not in your CLASSPATH
   • Standalone applications with framework-managed
     CLASSPATH help with this, i.e WEB-INF/lib, or mvn or ant-
     managed CLASSPATH




                              66
No Suitable Driver

• SQLException: No suitable driver
    • Check your URL, compare to the documentation at
     http://dev.mysql.com/doc/refman/5.1/en/connector-j.html


• Your URL should look something like
 jdbc:mysql://host:port/database[...]




                              67
Out of Memory

• java.lang.OutOfMemoryError when reading results
    • Your result set is too large, Connector/J buffers results by
      default
    • Most use cases don’t require large result sets
    • Those that do, process in chunks via SELECT ... LIMIT, or
      Statement.setFetchSize(Integer.MIN_VALUE)
• Heap dump shows many statement, result set
 instances
    • Not closing resources on every code path
    • Frameworks help prevent this
    • Plumb try {} catch {} finally {} throughout your code (yuck!)


                                  68
Communications Exceptions
• "The last packet sent successfully to the server was 0
 milliseconds ago. The driver has not received any packets
 from the server."
   • Your server was started with --skip-networking or --bind-
     address=127.0.0.1 and your client is remote to the server

• “The last packet successfully received from the server was
 25899 milliseconds ago.The last packet sent successfully to
 the server was 25899 milliseconds ago, which is longer than
 the server configured value of 'wait_timeout'”
   • Connections are sitting idle too long in your pool
   • Configure your pool to evict idle connections before
     wait_timeout would expire
   • Don’t let connections idle much more than the amount of
     time it takes to create a new one under worst-case

                                 69
Devo migrar para MySQL?




           70
MySQL Migration Tool                              Novo!

• Wizard para migração de tabelas e dados:
  • MS-SQL Server 2000, 2005, 2008 e 2012.
  • SGBDs em geral via ODBC
  • Mapeamento personalizado (opcional)
  • Integrado ao Workbench open source e gratuito

Download:
mysql.com/downloads
Documentação:
dev.mysql.com/doc/workbench/en/wb-migration.html

                          71
72
Próximos passos com MySQL




            73
Referências
• Use MySQL with Java
 http://dev.mysql.com/usingmysql/java/


• Read Connector/J User Manual
 http://dev.mysql.com/doc/refman/5.5/en/connector-j.html


• Download MySQL 5.5
 http://www.mysql.com/downloads/mysql/


• Download Free MySQL White Papers
 http://dev.mysql.com/why-mysql/white-papers/


• View MySQL Training Courses
 http://mysql.com/training


                                   74
MySQL Treinamento e Certificação

       Treinamentos
  MySQL DBA           MySQLDeveloper                Certificações
MySQL Boot Camp        MySQL Boot Camp
  Accelerated            Accelerated

MySQL Performance     MySQL Performance
 Tuning Boot Camp      Tuning Boot Camp
    Accelerated           Accelerated

MySQL for Begginers   MySQL for Begginers

MySQL for Database     MySQL and PHP
  Administrators      Developing Dynamic
                       Web Applicationg
MySQL Performance
     Tuning           MySQL for Developers

   MySQL High          MySQL Advanced
    Availability       Stored Procedures

  MySQL Cluster
                                                                    Opcional
                                                                    Necessário
                             education.oracle.com

                                             75
Obrigado!




@MySQLBR    facebook.com/MySQLBR   meetup.com/MySQL-BR



                     76

More Related Content

What's hot

Кирилл Латыш "ERP on Websockets"
Кирилл Латыш "ERP on Websockets"Кирилл Латыш "ERP on Websockets"
Кирилл Латыш "ERP on Websockets"
Fwdays
 
Better Data Persistence on Android
Better Data Persistence on AndroidBetter Data Persistence on Android
Better Data Persistence on Android
Eric Maxwell
 
JBoss Training and Consultation by experienced professional
JBoss Training and Consultation by experienced professionalJBoss Training and Consultation by experienced professional
JBoss Training and Consultation by experienced professional
Faisal Khan
 
Mysql Introduction
Mysql IntroductionMysql Introduction
Mysql Introduction
hemant meena
 
Rajab Davudov - Android Database
Rajab Davudov - Android DatabaseRajab Davudov - Android Database
Rajab Davudov - Android Database
Rashad Aliyev
 
Save data in to sqlite
Save data in to sqliteSave data in to sqlite
Save data in to sqlite
Junifar hidayat
 
2014 Pre-MSc-IS-6 Presentation Layer
2014 Pre-MSc-IS-6 Presentation Layer2014 Pre-MSc-IS-6 Presentation Layer
2014 Pre-MSc-IS-6 Presentation Layer
andreasmartin
 
BITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and InstallationBITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and Installation
BITS
 
Databases and NodeJS
Databases and NodeJSDatabases and NodeJS
Databases and NodeJS
Riza Fahmi
 
Apache Cassandra Ignite Presentation
Apache Cassandra Ignite PresentationApache Cassandra Ignite Presentation
Apache Cassandra Ignite Presentation
Jared Winick
 

What's hot (12)

Кирилл Латыш "ERP on Websockets"
Кирилл Латыш "ERP on Websockets"Кирилл Латыш "ERP on Websockets"
Кирилл Латыш "ERP on Websockets"
 
Better Data Persistence on Android
Better Data Persistence on AndroidBetter Data Persistence on Android
Better Data Persistence on Android
 
JBoss Training and Consultation by experienced professional
JBoss Training and Consultation by experienced professionalJBoss Training and Consultation by experienced professional
JBoss Training and Consultation by experienced professional
 
Mysql Introduction
Mysql IntroductionMysql Introduction
Mysql Introduction
 
Apache JCS
Apache JCSApache JCS
Apache JCS
 
Rajab Davudov - Android Database
Rajab Davudov - Android DatabaseRajab Davudov - Android Database
Rajab Davudov - Android Database
 
Save data in to sqlite
Save data in to sqliteSave data in to sqlite
Save data in to sqlite
 
2014 Pre-MSc-IS-6 Presentation Layer
2014 Pre-MSc-IS-6 Presentation Layer2014 Pre-MSc-IS-6 Presentation Layer
2014 Pre-MSc-IS-6 Presentation Layer
 
BITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and InstallationBITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and Installation
 
Databases and NodeJS
Databases and NodeJSDatabases and NodeJS
Databases and NodeJS
 
Apache Cassandra Ignite Presentation
Apache Cassandra Ignite PresentationApache Cassandra Ignite Presentation
Apache Cassandra Ignite Presentation
 
Rails Models
Rails ModelsRails Models
Rails Models
 

Viewers also liked

CONEXÃO BANCO DE DADOS MYSQL COM JAVA
CONEXÃO BANCO DE DADOS MYSQL  COM JAVACONEXÃO BANCO DE DADOS MYSQL  COM JAVA
CONEXÃO BANCO DE DADOS MYSQL COM JAVA
ETEC Monsenhor Antonio Magliano
 
Confirurando Dababase Development no Eclipse Luna
Confirurando Dababase Development no Eclipse LunaConfirurando Dababase Development no Eclipse Luna
Confirurando Dababase Development no Eclipse Luna
George Mendonça
 
Conectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbcConectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbc
Jeison Barros
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQL
MySQL Brasil
 
Aula 03-Tutorial ETL com PDI
Aula 03-Tutorial ETL com PDIAula 03-Tutorial ETL com PDI
Aula 03-Tutorial ETL com PDI
Jarley Nóbrega
 
Acesso a Banco de Dados em Java usando JDBC
Acesso a Banco de Dados em Java usando JDBCAcesso a Banco de Dados em Java usando JDBC
Acesso a Banco de Dados em Java usando JDBC
Luiz Ricardo Silva
 
Lógica e Matemática Computacional - Aula 03
Lógica e Matemática Computacional - Aula 03Lógica e Matemática Computacional - Aula 03
Lógica e Matemática Computacional - Aula 03
thomasdacosta
 
Manual de MiniVoleibol, FIVB en español (traducido)
Manual de MiniVoleibol, FIVB en español (traducido)Manual de MiniVoleibol, FIVB en español (traducido)
Manual de MiniVoleibol, FIVB en español (traducido)
Mario Vásquez Espinoza
 

Viewers also liked (9)

CONEXÃO BANCO DE DADOS MYSQL COM JAVA
CONEXÃO BANCO DE DADOS MYSQL  COM JAVACONEXÃO BANCO DE DADOS MYSQL  COM JAVA
CONEXÃO BANCO DE DADOS MYSQL COM JAVA
 
Confirurando Dababase Development no Eclipse Luna
Confirurando Dababase Development no Eclipse LunaConfirurando Dababase Development no Eclipse Luna
Confirurando Dababase Development no Eclipse Luna
 
Aula1
Aula1Aula1
Aula1
 
Conectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbcConectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbc
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQL
 
Aula 03-Tutorial ETL com PDI
Aula 03-Tutorial ETL com PDIAula 03-Tutorial ETL com PDI
Aula 03-Tutorial ETL com PDI
 
Acesso a Banco de Dados em Java usando JDBC
Acesso a Banco de Dados em Java usando JDBCAcesso a Banco de Dados em Java usando JDBC
Acesso a Banco de Dados em Java usando JDBC
 
Lógica e Matemática Computacional - Aula 03
Lógica e Matemática Computacional - Aula 03Lógica e Matemática Computacional - Aula 03
Lógica e Matemática Computacional - Aula 03
 
Manual de MiniVoleibol, FIVB en español (traducido)
Manual de MiniVoleibol, FIVB en español (traducido)Manual de MiniVoleibol, FIVB en español (traducido)
Manual de MiniVoleibol, FIVB en español (traducido)
 

Similar to Tutorial MySQL com Java

Megha_Osi my sql productroadmap
Megha_Osi my sql productroadmapMegha_Osi my sql productroadmap
Megha_Osi my sql productroadmapOpenSourceIndia
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Dave Stokes
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
Mario Beck
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Manuel Contreras
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdl
sqlhjalp
 
MySQL Enterprise Edition
MySQL Enterprise EditionMySQL Enterprise Edition
MySQL Enterprise Edition
MySQL Brasil
 
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
 
MySQL
MySQLMySQL
MySQL
PT.JUG
 
MySQL Strategy&Roadmap
MySQL Strategy&RoadmapMySQL Strategy&Roadmap
MySQL Strategy&Roadmap
slidethanks
 
My sqlstrategyroadmap
My sqlstrategyroadmapMy sqlstrategyroadmap
My sqlstrategyroadmapslidethanks
 
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 FeaturesTarique 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
 
My sql
My sqlMy sql
My sql
Waseem Sakka
 
Open Source Software – Open Day Oracle 2013
Open Source Software  – Open Day Oracle 2013Open Source Software  – Open Day Oracle 2013
Open Source Software – Open Day Oracle 2013
Erik Gur
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
Olivier DASINI
 
Oracle mysql comparison
Oracle mysql comparisonOracle mysql comparison
Oracle mysql comparison
Arun Sharma
 
Mysql an introduction
Mysql an introductionMysql an introduction
Mysql an introduction
Mohd yasin Karim
 
MySQL Ecosystem in 2020
MySQL Ecosystem in 2020MySQL Ecosystem in 2020
MySQL Ecosystem in 2020
Alkin Tezuysal
 
Oracle day co_opensource_final
Oracle day co_opensource_finalOracle day co_opensource_final
Oracle day co_opensource_finalManuel Contreras
 

Similar to Tutorial MySQL com Java (20)

Megha_Osi my sql productroadmap
Megha_Osi my sql productroadmapMegha_Osi my sql productroadmap
Megha_Osi my sql productroadmap
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
 
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
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdl
 
MySQL Enterprise Edition
MySQL Enterprise EditionMySQL Enterprise Edition
MySQL Enterprise Edition
 
MySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime TimeMySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime Time
 
MySQL
MySQLMySQL
MySQL
 
MySQL Strategy&Roadmap
MySQL Strategy&RoadmapMySQL Strategy&Roadmap
MySQL Strategy&Roadmap
 
My sqlstrategyroadmap
My sqlstrategyroadmapMy sqlstrategyroadmap
My sqlstrategyroadmap
 
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
 
My sql
My sqlMy sql
My sql
 
Open Source Software – Open Day Oracle 2013
Open Source Software  – Open Day Oracle 2013Open Source Software  – Open Day Oracle 2013
Open Source Software – Open Day Oracle 2013
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
Oracle mysql comparison
Oracle mysql comparisonOracle mysql comparison
Oracle mysql comparison
 
Mysql an introduction
Mysql an introductionMysql an introduction
Mysql an introduction
 
MySQL Ecosystem in 2020
MySQL Ecosystem in 2020MySQL Ecosystem in 2020
MySQL Ecosystem in 2020
 
20111121 osi keynote
20111121 osi keynote20111121 osi keynote
20111121 osi keynote
 
Oracle day co_opensource_final
Oracle day co_opensource_finalOracle day co_opensource_final
Oracle day co_opensource_final
 

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
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar 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
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
MySQL Brasil
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQL
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
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
MySQL Brasil
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
MySQL Brasil
 
OpenStack & MySQL
OpenStack & MySQLOpenStack & MySQL
OpenStack & MySQL
MySQL Brasil
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
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
 

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
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar 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
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQL
 
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
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
 
OpenStack & MySQL
OpenStack & MySQLOpenStack & MySQL
OpenStack & MySQL
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
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...
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Tutorial MySQL com Java

  • 1. <Insert Picture Here> Tutorial MySQL com Java Airton Lastori airton.lastori@oracle.com 08-out-2012
  • 2. Alguns clientes MySQL Web & Enterprise OEM & ISVs Cloud 2
  • 3. Várias Indústrias mysql.com/customers 3
  • 5. Resumo: onde o MySQL se encaixa • Novas aplicações e aplicações customizadas Ad-hoc • principalmente arquitetura Web (ex. Linux+Apache+MySQL+Java) • arquiteturas inovadoras, NoSQL (versão 5.6 e Cluster 7.2) • Aplicações híbridas • expansão de sistemas legados • MySQL como front-end e Oracle DB como back-end • Online e SaaS • E-commerce/OLTP e pagamentos digitais • Gerenciamento de Conteúdo (CMS) • Redes Sociais, mensagens e colaboração • Games Sociais e MMO • Gerenciamento de Sessão e Autenticação do usuário • Datamarts e Relatórios Departamentais • SMS, e-marketing, Infra Telecom, Infra TI • Embarcadas 5
  • 6. MySQL em Aplicações Enterprise Aplicações Corporativas de Missão Crítica Importancia/Complexidade Finanças Globais, ERP, SCM, CRM, HR Aplicações Críticas para o Negócio Impacto no negócio, Interdepartamentais Aplicações Operacionais De suporte, Departamentais Corporativo Departamental 6
  • 7. Quando custa o MySQL? 7
  • 8. Portfolio Open Source (GPL) • MySQL Database (Community Server) 5.5.27 GA e 5.6.6 DMR • MySQL Cluster (NDB Community) 7.2.7 GA • MySQL Workbench Community Edition 5.2.40 GA • MySQL Utilities (em Python) • MySQL Connectors • ODBC, Java, .Net, C, C++, PHP, OpenOffice • MySQL Proxy 0.8.2 Alpha • Documentação: livre para uso, não coberto pela GPL • Forums dev.mysql.com/downloads 8
  • 9. MySQL Enterprise Edition. Indicado para empresas ou pessoas físicas que pretendem aumentar produtividade, diminuir riscos e explorar mais a fundo e aumentar as capacidades do MySQL. Oracle Premier Lifetime Support MySQL Enterprise Oracle Product Security Certifications/Integrations MySQL Enterprise MySQL Enterprise Audit Monitor/Query Analyzer MySQL Enterprise MySQL Enterprise Scalability Backup MySQL Enterprise MySQL Workbench High Availability
  • 11. MySQL Database Performance, Confiabilidade, Facilidade de Uso Gerenciamento Suporte às mais eficiente e multi- conhecidas thread de sessões plataformas/linguagens de desenvolvimento Parsing completo DML+DDL, otimizador, baseado em custo, caching de queries e resultados Várias opções de Storage Engine para necessidades específicas das aplicações Opções flexíveis de logging e armazenamento físico
  • 12. InnoDB no MySQL - Storage Engine mais utilizado - aplicações Web 2.0 - aplicações de varejo - aplicações de entretenimento & mídia - ACID, transacional - Crash recovery - Integridade referencial - Suporta altos níveis de usuários concorrentes - No MySQL versão 5.5 - padrão - otimizado para hardware multi-core, multi-thread e SOs
  • 13. Como instalar o MySQL?
  • 14. MySQL Installer for Windows • Interface gráfica nativa do Windows • Todos produtos MySQL para desenvolvimento em UM único pacote • MySQL Database • MySQL Connectors • MySQL Workbench e exemplos de modelos • Exemplos de bancos de dados • Documentação • Alta integração de produtos, download sob demanda, funcionalidades de atualização
  • 15. MySQL Installer for Windows Selecione Atualize Configure mysql.com/downloads
  • 16.
  • 17. No Linux ou Mac, prefira os binários mysql.com/downloads/mysql
  • 18. Tutorial MySQL em 10 minutos slideshare.net/MySQLBR/mysql-em-10min-alexandre-almeida-hti-tecnologia
  • 19. No Linux ou Mac, instale também o Connector/J mysql.com/downloads/connector/j
  • 20. Teste via MySQL Workbench 1/2
  • 21. Teste via MySQL Workbench 2/2
  • 22. Teste via MySQL Client (opcional) C:Program FilesMySQLMySQL Server 5.5bin>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>
  • 23. Administre via MySQL Workbench 1/3
  • 24. Administre via MySQL Workbench 2/3
  • 25. Administre via MySQL Workbench 3/3
  • 26. Parar ou Iniciar o servidor MySQL (opcional) Ou via MySQL Notifier
  • 27. Tudo certo com seu ambiente Java? 1/2 Instalar e configurar JDK e path oracle.com/technetwork/java/javase/downloads
  • 28. Tudo certo com seu ambiente Java? 2/2 JDK e path configurados C:Program FilesMySQLMySQL Server 5.5bin>java -version java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode) C:Program FilesMySQLMySQL Server 5.5bin>javac Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging inf ...o
  • 30. Adicione o driver MySQL ao CLASSPATH caminho completo do .jar Confira: C:>set CLASSPATH CLASSPATH=.;C:Program Files (x86)Javajre6libextQTJava.zip;C:Program Files MySQLmysql-connector-java-5.1.22mysql-connector-java-5.1.22-bin.jar
  • 31. 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…
  • 32. 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 FIM!
  • 33. 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 , Bouvet Island, Botswana, Central African Republic, Canada, Cocos (Keeling) Isl ands, Switzerland, Chile, China, C├┤te d┬ÆIvoire, Cameroon, Congo, The Democrati c Republic of the, Congo, Cook Islands, Colombia, Comoros, Cape Verde, Costa Ric a, Cuba, Christmas Island, Cayman Islands, Cyprus, Czech Republic, Germany, Djib … ietnam, Vanuatu, Wallis and Futuna, Samoa, Yemen, Yugoslavia, South Africa, Zamb ia, Zimbabwe,
  • 34. Revisão: Conceitos importantes • Como conectar o Java ao MySQL • Entender o CLASSPATH 34
  • 35. Revisão: conectando o Java ao MySQL • O driver JDBC é chamado MySQL Connector/J • Desenvolvido pela Oracle sob licença GPL • Driver Type IV (todo java, nativo) • Disponível para baixar em: • Software • dev.mysql.com/downloads/connector/j • Maven, Ivy • Many Linux and BSD distributions • Documentation • dev.mysql.com/doc/refman/5.5/en/connector-j.html 35
  • 36. Revisão: Entendendo o CLASPATH • O classpath é o local onde o Java procura por código compilado (biblioteca) • Há locais padrão para o classpath • WEB-INF/lib, WEB-INF/classes in webapps • $JRE_HOME/lib/ext • Quando estiver desenvolvendo ou implantando evite estes locais • $JRE_HOME/lib/ext • Application-server-wide • e.g. $CATALINA_HOME/lib • Se possível deixe este trabalho para sua IDE 36
  • 37. Crie um usuário no MySQL. 37
  • 38. Criando usuário public User createUser(Connection c, String } catch (SQLException sqlEx) { login, String firstName, String lastName, String // handle it, it's not a concern outside credentials) { of persistence PreparedStatement p = null; } finally { try { try { p = c.prepareStatement("INSERT if (p != null) { p.close(); }; INTO user (login, first_name, last_name, passwd_hash) VALUES (?, ?, ?, ?)"); } catch (SQLException sqlEx) { p.setString(1, login); // can't do anything here, log? p.setString(2, firstName); } ResultSet rs = } p.getGeneratedKeys(); } rs.next(); long id = rs.getLong(1); PersistentUser user = new PersistentUser(); Estes tipos de user.setId(id); acesso é conhecido return user; como Raw JDBC… 38
  • 39. Arquitetando para o sucesso com MySQL! Applications start small If they’re successful, they don’t stay that way
  • 40. Arquitetando para o Sucesso Um Anti-Pattern Presentation Presentation Presentation Presentation Presentation Presentation Presentation Presentation Presentation BusinessLogic Presentation Presentation Presentation BusinessLogic BusinessLogic Presentation Presentation BusinessLogic BusinessLogic BusinessLogic BusinessLogic BusinessLogicBusinessLogic Persistence BusinessLogic Persistence Persistence BusinessLogic Persistence BusinessLogic BusinessLogic Persistence BusinessLogic BusinessLogic Persistence Persistence Persistence Persistence BusinessLogic Persistence Persistence Persistence Persistence Persistence Persistence Persistence Persistence Persistence 40
  • 41. Arquitetando para o Sucesso Um Anti-Pattern Quero usar uma lógica daqui… Presentation Presentation Presentation Presentation Presentation Presentation Presentation Presentation Presentation …aplicar aqui… BusinessLogic Presentation Presentation Presentation BusinessLogic BusinessLogic Presentation Presentation BusinessLogic BusinessLogic BusinessLogic BusinessLogic BusinessLogicBusinessLogic Persistence …no contexto BusinessLogic Persistence Persistence BusinessLogic Persistence desta BusinessLogic BusinessLogic Persistence BusinessLogic BusinessLogic Persistence trasação. Persistence Persistence Persistence BusinessLogic Persistence Persistence Persistence Persistence Persistence Persistence Persistence Persistence Persistence 41
  • 42. Arquitetando para o Sucesso Comece limpo Presentation Business Logic Persistence 42
  • 43. Arquitetando para o Sucesso Comece limpo Presentation Transactions Business Logic Persistence 43
  • 44. Arquitetando para o Sucesso Comece limpo Presentation Transactions Business Logic Caching Persistence 44
  • 45. Arquitetando para o Sucesso Comece limpo Presentation } Test this Transactions Business Logic } Test this Caching Persistence } Test this 45
  • 46. Arquitetando para o Sucesso Use ferramentas adequadas • Using Maven to manage the depedencies/build • Using SpringFramework • Dependency Injection • Templates/Boilerplate/Integration • Uma boa IDE: NetBeans, Eclipse 46
  • 47. Arquitetura em Camadas Exemplo Criar Usuário @Override public User createUser(String login, String firstName, String lastName, String credentials) { jdbcTemplate.update("INSERT INTO user (login, first_name, last_name, passwd_hash) VALUES (?, ?, ?, ?)", login, firstName, lastName, credentials); long id = jdbcTemplate.queryForLong("SELECT LAST_INSERT_ID()"); PersistentUser user = new PersistentUser(); user.setId(id); user.setLogin(login); user.setFirstName(firstName); user.setLastName(lastName); user.setCredentials(credentials); return user; } 47
  • 48. Como era no Raw JDBC public User createUser(Connection c, String } catch (SQLException sqlEx) { login, String firstName, String lastName, String // handle it, it's not a concern outside credentials) { of persistence PreparedStatement p = null; } finally { try { try { p = c.prepareStatement("INSERT if (p != null) { p.close(); }; INTO user (login, first_name, last_name, passwd_hash) VALUES (?, ?, ?, ?)"); } catch (SQLException sqlEx) { p.setString(1, login); // can't do anything here, log? p.setString(2, firstName); } ResultSet rs = } p.getGeneratedKeys(); } rs.next(); long id = rs.getLong(1); PersistentUser user = new PersistentUser(); Estes tipos de user.setId(id); acesso é conhecido return user; como Raw JDBC… 48
  • 49. Resolvendo erros comuns com MySQL! 65
  • 50. Class not found • java.lang.ClassNotFoundException: com.mysql.jdbc.Driver • The driver is not in your CLASSPATH • Standalone applications with framework-managed CLASSPATH help with this, i.e WEB-INF/lib, or mvn or ant- managed CLASSPATH 66
  • 51. No Suitable Driver • SQLException: No suitable driver • Check your URL, compare to the documentation at http://dev.mysql.com/doc/refman/5.1/en/connector-j.html • Your URL should look something like jdbc:mysql://host:port/database[...] 67
  • 52. Out of Memory • java.lang.OutOfMemoryError when reading results • Your result set is too large, Connector/J buffers results by default • Most use cases don’t require large result sets • Those that do, process in chunks via SELECT ... LIMIT, or Statement.setFetchSize(Integer.MIN_VALUE) • Heap dump shows many statement, result set instances • Not closing resources on every code path • Frameworks help prevent this • Plumb try {} catch {} finally {} throughout your code (yuck!) 68
  • 53. Communications Exceptions • "The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server." • Your server was started with --skip-networking or --bind- address=127.0.0.1 and your client is remote to the server • “The last packet successfully received from the server was 25899 milliseconds ago.The last packet sent successfully to the server was 25899 milliseconds ago, which is longer than the server configured value of 'wait_timeout'” • Connections are sitting idle too long in your pool • Configure your pool to evict idle connections before wait_timeout would expire • Don’t let connections idle much more than the amount of time it takes to create a new one under worst-case 69
  • 54. Devo migrar para MySQL? 70
  • 55. MySQL Migration Tool Novo! • Wizard para migração de tabelas e dados: • MS-SQL Server 2000, 2005, 2008 e 2012. • SGBDs em geral via ODBC • Mapeamento personalizado (opcional) • Integrado ao Workbench open source e gratuito Download: mysql.com/downloads Documentação: dev.mysql.com/doc/workbench/en/wb-migration.html 71
  • 56. 72
  • 58. Referências • Use MySQL with Java http://dev.mysql.com/usingmysql/java/ • Read Connector/J User Manual http://dev.mysql.com/doc/refman/5.5/en/connector-j.html • Download MySQL 5.5 http://www.mysql.com/downloads/mysql/ • Download Free MySQL White Papers http://dev.mysql.com/why-mysql/white-papers/ • View MySQL Training Courses http://mysql.com/training 74
  • 59. MySQL Treinamento e Certificação Treinamentos MySQL DBA MySQLDeveloper Certificações MySQL Boot Camp MySQL Boot Camp Accelerated Accelerated MySQL Performance MySQL Performance Tuning Boot Camp Tuning Boot Camp Accelerated Accelerated MySQL for Begginers MySQL for Begginers MySQL for Database MySQL and PHP Administrators Developing Dynamic Web Applicationg MySQL Performance Tuning MySQL for Developers MySQL High MySQL Advanced Availability Stored Procedures MySQL Cluster Opcional Necessário education.oracle.com 75
  • 60. Obrigado! @MySQLBR facebook.com/MySQLBR meetup.com/MySQL-BR 76