c

c

c

c           

Eko Kurniawan Khannedy StripBandunkc c

StripBandunk | MySQL dan Java Database Connectivity

  cc c   cccc c

c

ccc c

 c   ccc

c

 c ccc

c

 c ccc

c

 c   cc c

c

  c  cc

c

  c  ccc

c

  c  ccc

c

 c  cc c

 c

 c  ccc

  c   c !" ccc c

c !"!c  ccc

c

# ccc

c

$"ccc

c

ccc

c

!"!cc c

c

 ccc

c

  c  ccc

c

 c  ccc

c

 c  ccc

c

% ccc

c

   ccc

c

  c  ccc

c c

StripBandunk | MySQL dan Java Database Connectivity c

 c  ccc

c

 c  ccc

c

&   c  cc c

c

c

  c  ccc

c

 c  ccc

c

 c  ccc

c c

'& "&c% ccc

c( c  ccc

 ccc c

c c c

c

c c

StripBandunk | MySQL dan Java Database Connectivity

c  c   ccc c  c c  c c c  c c  c c! c&  c c) c & cc cc  c c  c c & c ) c &  c   c c c   c c c   c c c c & c cc

 c   c    c c  )c&   c& cc c c c&    c c & c  c c  c &   c &  c c  c &  c   c cc& cc*c CREATE DATABASE NAMA_DATABASE;

c  c c  c c&   c& c  c+ ,#-.c*c

c Gambar 1 Membuat Database "SWING"

 c c c  c  c ccc*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 2 Tampilan Proses Berhasil Pembuatan Database

/c   c  c   c    c &   c c & c  c & c   c c*c SHOW DATABASES;

c

c Gambar 3 Menampilkan Tabel

 c c  c " c c   c &   c c &  c &  c  c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 4 Tampilan Seluruh Tabel

 c  c  c&   c+ ,#-.c  c&   c c c & c c &c &  c&  c c

 c   c  c  c   c  c & c  c  c  c &  c  c &   c /cc)  c c  cc c& c  c c & c c " c c  c + c   .c  c  c +0!c    .c c !&  c & c c  " c c  c & c  c c   c c  c c c c  c c&   c c c c c c c) c c   c  c c  c  c  c c &  c &   c + ,#-.c  c c & c  c  c& c  c c*c ]SE NAMA_DATABASE;

c  c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 5 menggunakan Database

 c c  c c  c  c  & c &  c &   c + ,#-.c /c  c c&  c c c  c cc& cc*c CREATE TABLE NAMA_TABLE ( NAMA_ATRIB]T TIPE_DATA [KETERANGAN], NAMA_ATRIB]T TIPE_DATA [KETERANGAN], ... );

c  c c  c c c   c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 6 Membuat Tabel "MAHASISWA"

 c  c c  c  c  c  c   c    c  c c   c  c c   c c& c  c  c c*c SHOW TABLES;

c  c &  c &  c c   c  c c & c &  c  c &   c

c Gambar 7 Menampilkan Tabel

c c

StripBandunk | MySQL dan Java Database Connectivity /c c ) c  c c &  c &  c c & c  c   c &  c + c  .c c  c  c &  c &  c c &  c & c  c  c  c)cc&  c c&&c!c c

 c   c  c /c  c  c c & c  c  c &  c & c   c  c*c DROP TABLE NAMA_TABLE

c  c c  c c c   c &c*c

c Gambar 8 Menaghapus Tabel

 c c   c   c  c  c  c    c c  c

c & c&  c&   cc*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 9 Menampilkan Tabel

$ c   c  c c & c c&  c&   c

 c   c    c /c c&   c c c  c cc& cc*c %1c''' $c#' '2''' $3c

c  c c  c c&   c c &c c c*c

c Gambar 10 Menghapus Database

c c

StripBandunk | MySQL dan Java Database Connectivity  c c   c   c &   c  c  c    c c &   c*c

c Gambar 11 Menampilkan Database

 c   c  c 0  c c   c  c &  c  c & c &   c & c  c ) &c   c  c  c &   c & c  c  c  c  c  c  c &   c   c +/ /.c c  c   c &   c c  c & c  c  c & c  c  c c  c   c  c cc*c

c Gambar 12 Membuat Database "]S]"

c c

StripBandunk | MySQL dan Java Database Connectivity  c  c c c+$#' .c c&&   c c cc#' 'c '#--' 2 '4%c ' ' 'c 01#'0c   c  c c   c &   c

c c c &c*c

c Gambar 13 Menggunakan Database "]S]"

  c c c  c*c

c Gambar 14 Membuat Tabel "IDENTITAS"

'/12# %$ $#c  &  c   c &  c &  c c c  c !! c  c ) c c  c  c +.c   c  c  c "! c

c c

StripBandunk | MySQL dan Java Database Connectivity   c&  c&  c cc/c  c&  c&  c c  c c  c c*c INSERT INTO NAMA_TABEL (NAMA_ATRIB]T, ... ) VAL]ES (NILAI_ATRIB]T, ... ), (NILAI_ATRIB]T, ... ) ... ;

c  c*c

c Gambar 15 Memasukkan Data Ke Tabel IDENTITAS

  c  c   c   c c "!& c c  c  c   cc & c c"!&c c) c c  c c&  c c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 16 Memasukkan Data Ke Tabel IDENTITAS Lebih Dari Satu

 c    c  c /c   c &  c &  c  c &   c  c  c   c  c*c SELECT [NAMA_ATRIB]TE, ...] FROM [NAMA_TABEL ,...];

c # c ) c  c  c   c c &  c c & c &  c c  c  c    c c*c SELECT * FROM [NAMA_TABEL , ...];

c  c c  c  cc c$#' c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 17 Menampilkan Seluruh Data Tabel IDENTITAS

# c ) c  c  c   c  c c  c  c   c  c   c  c  c   c  c   c c c #' 'c& c'#--' 2 '4%c*c

c Gambar 18 Menampilkan Kolom ID, NAMA, TANGGAL_LAHIR Dalam Tabel IDENTITAS

 c    c  c  c  c  c c   c c &  c  c   c   c +,4$%$.c !c   c    c c c !c /'$c & c $ $$&c   c   c   c !c /'$c & c $ $$c  c  c  c c c

StripBandunk | MySQL dan Java Database Connectivity /c c&  c c c  c cc& cc*c SELECT [NAMA_ATRIB]T,...] FROM [NAMA_TABEL, ...] WHERE [KONDISI...]

c  c c  c  c&  c& c ccc5cc*c

c Gambar 19 Menampilkan Data Dalam IDENTITAS Yang Memiliki ID = 1

 c c  c  c&  c& c cc#' 'c5c6!!c !!7c *c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 20 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki NAMA = 'Tono Sutono'

 c   c  & c +5.c  c & c & c $ /' c  c ) c  c   c & c8c85c9c:5c& c95c  c! c&  c  c  c  c  c  c&  c ccc8cc*c

c Gambar 21 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki ID > 1

 & c !c   c &  c  c   c   c  c !&c  c   c  c  c   c c & c  c !&c  c  c  c   c &  c c c c 8c c & c ' ' 'c 5c 6 7c & c c   c c & c  c !c  c  c   c c '#c  c1%*c c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 22 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki ID > 1 Dan ALAMAT = 'Sumenep'

c Gambar 23 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki ID > 1 Atau ALAMAT = 'Sumenep'

 c ! ! ! !c &  c  c ) c  c   c ! !c ;c c 0$cc   c  c c*c ... WHERE NAMA_ATRIB]TE LIKE ͚REGEX͛;

c

c c

StripBandunk | MySQL dan Java Database Connectivity  c c  c  c&  c& c#' 'c cc  c67c*c

c Gambar 24 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki NAMA Berawalkan 't'

/c  c&  c cc  c6!7c c c  c;c 6
c Gambar 25 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki NAMA Berakhiran 'o'

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 26 Menampilkan Data Dalam Tabel IDENTITAS yang Memiliki NAMA Mengandung 'o'

 c   c  c  c &   c   c  c &   c   c c  c +/ .c  c  c  c! c c &c& c c1c  cc!c   c  c c & c & c  c /'$c    c c &  c &   c /c c&  c&  c c c&  c  c c*c ]PDATE NAMA_TABEL SET NAMA_ATRIB]T = ͞NILAI BAR] , ... [WHERE KONDISI]

c  c c  c c' ' 'c& c&cc) &c6 &7c*c

 c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 27 Mengubah ALAMAT Yang memiliki ID = 1

/c  c  c&  c c c   c&  cc*c

c Gambar 28 Menampilkan Data Dalam Tabel IDENTITAS Yang Memiliki ID = 1

c & c ) c & c   c !c /'$c   c   c !& c & c ,4$%$c   c & c   c  ) c  c c &  c &  c  c c  c  c  c  c c ' ' 'c &  c  c $#' c) &c6   7c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 29 Mengubah Seluruh ALAMAT Dalam Tabel IDENTITAS

/c  c   c c &  c &  c  c $#' c  c    cc&  c&  c c$#' c*c

c Gambar 30 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c  c !c # $%c /'$c & c $ $ c &  c &   c  c ) c  c !c   c &  c  c c & c & c$ $$c 4 c c ) c   c & c  c   c  c &  c c & c &  c  c &   c& c

c c

StripBandunk | MySQL dan Java Database Connectivity  c  c & c  c & c !c $ $$c c  c &  c c /c   c !c   c &  c c  c  c   c  c*c DELETE FROM NAMA_TABEL [WHERE KONDISI]

c  c c  c c&  c ccc5cc*c

c Gambar 31 Menghapus Data Dalam Tabel IDENTITAS Yang Memiliki ID = 3

/c   c   c &  c  c  c   c c &  c &  c  c$#' c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 32 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c  c c  c c &  c &  c  c $#' c  c  c   c c&  c  c  c!&c*c

c Gambar 33 Menghapus Seluruh Data Dalam Tabel IDENTITAS

/c   c c &  c  c  c   c &  c &  c  c $#' c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 34 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

$ c   c  c&  c cc cc&  cc c c

c

c c

StripBandunk | MySQL dan Java Database Connectivity

c   c    c  !c  c =  c    c !" >c   c   c c &  c c ! c c& c  c cc c1 "c "!!c1 c& c  c  c c&  ccc c  c c  c  c

c  c  ! c  c /c c   c  c& c c c c c  c

c   c !"!  c c  c  c &  c &  c c  c & c  c  c "!"!c c  c & c  c &! ! & c &c cc c  c*)  "!cc /c &  c !c   c    c )  c   c  c   c$cc  cc# c  c$"c c  c cc  c1 !"c& c- c c  c c  c"! c  c "!"!  c&  c& c$cc  c [  c /c   c c   c   c !"!  c c  c !)"c  c  c    c  c   c & c "  c c   c  c  c cc'&&c ?!&c*c

c Gambar 35 Menambah Library MySQLConnectorJava Dalam NetBeans

cc !"!  c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 36 Add Jar/Folder

 c c c 1$#c & c "  c !! c   c !"!  c  c "&c&  c!)"c# c*c

c Gambar 37 Libraries MySQLConnectorJava

 c "! c /c  c !"!  c&  c c!)"c$"c c c c  c!)"cc cc&c c8c'&&c$; c'"c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 38 Memasukkan Library MySQLConnectorJava dalam Eclipse

c  c !"!  c*c

c Gambar 39 JAR Selection

c c

StripBandunk | MySQL dan Java Database Connectivity  c c c 1$#c c    c c !"!  c c &  c !)"c c  &c & c c & c "  c !! c $"c  c   c c c&  c  c*c

c Gambar 40 Libraries MySQLConnectorJava

c  c /c c!c& c  cc c c c" c c  c c  c  c "!"!c = c  c  c !"!  >c c c   c c c c" cc c & c&  c  c +)  @.c & c c "c  & c c &  c !"!  c  c ccc*c Ô forName6       6c

c ' c  ccc*c ©  c  c c Ú ©c    

 c Ú ©c    

 c

c c

StripBandunk | MySQL dan Java Database Connectivity c c š    c c © Ú c  cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c ccccccccc out

 6  c   c c   c ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 1 DriverTest.java

 c  c !c c  c   c  c +  c   c c   c  c) c) &c   c& c   c) &c) c " c c  c & c  c   c !"!  c c &  c &  c!)"c c & c c

c   ! c  c  c c c  c   c & c c  c  c  c !"!c c&  c&  c c+)  @.c cc c !"!c c c c!c!c& c  c&   c c  c c   c  c c  c ) c  c  c  c & c   !&c c &  cc!c cc /c  c !"!c  c  c " c )  @  c

c&  c  c" c  c c cc c!c*c Ô

  c  cc   ÑetConnection6c     c c   c   c

c   c c"! c c" ccc!c&   c c c  c c & c c c*c ©  c  c c

 c c

StripBandunk | MySQL dan Java Database Connectivity Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú cÔ

   cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c   c ccccccccc out

 6   c  c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 2 ConnectionTest.java

 c!cc c  c  c c c+  c  .c& c) c   c & c &   c c & c & c & c  c  c & c   !&c c&  c  c

c   c  c   c " c c &  c &  c  c +)  @.c c &  c &  c  cc   c c  c &c c c !c # $%c /'$c $ $ c & c $ $$c &  c c & c  c ) c  c   c    c c  c  c /c  c  c c&  c  c !"!c*c Ô

  c  cc   ÑetConnection6c   c  cc      6c

c

c c

StripBandunk | MySQL dan Java Database Connectivity  c c  c c  cc&   c c c c &c*c ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c   cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c c ccccccccc out

 6   c  c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 3 StatementTest.java

 c !c c  c   c   .c

 c   c  c +  c

 c   c  c c c c c &c c  c c c  c!c# $%c /'$c& c$ $$c c  c c  c  c!c# $%c*c Ô

  c  cc   ÑetConnection6c   c  cc      6c        6  c cc c

c c

StripBandunk | MySQL dan Java Database Connectivity c  c  c  c   c &  c c &  c  c $#' c c & c &  c &   c/ /c &c c c c c*c ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c    cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccc  c ccccccccccccccc     6 c c cc c ccccccccccccccccccccc c c6cc  cc  c c ccccccccccccccccccccc c c c c ccccccccccccccccccccc c c6 !c  !! !!  !! 

 !c c ccccccccccccccccccccc c c6! c  !!  !! !!   !c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 4 StatementInsert.java

c c

StripBandunk | MySQL dan Java Database Connectivity  c & c)   c  c!! c cc  c&cc&  c c & c c  c  c c    c c &  c &  c  c $#' c*c

c Gambar 41Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c  c &c c  c&  c c  c  c c  c"! c  c&  c c & c&  c&   c c c/'$c ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c   cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c

c c

StripBandunk | MySQL dan Java Database Connectivity Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccc  c ccccccccccccccc     6 c cc c ccccccccccccccccccccc c cc c ccccccccccccccccccccc c ccc!  !c c ccccccccccccccccccccc c c cc!  

 !c c ccccccccccccccccccccc c c ccc! ! c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 5 Statement]pdate.java

  c  c  c ' ' 'c ) &c 6 &7c & c $ ' c ) &c 6"!2 & A !!"!&7c ccc5ccc c c!&c&  c&c c  c & c c c   c&  c&   c*c

c Gambar 42 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c   c c  cc c$ $$c  c  c*c ©  c  c

c c

StripBandunk | MySQL dan Java Database Connectivity c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c    cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccc       6 cc cc c cccccccccccccccccccccccc c c ccc c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 6 StatementDelete.java

  c c c&  c ccc5cc& c c&cc  c&  c

ccc5cc  c& c&  c c$#' c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 43 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

c #  c c & c   c   c &  c !c  c &  c  c & c   c  c $ $ c c !  c c   c &  c  c  c c $ $ c4 cc  c $ $ c  c c c   c  c &  c &  c  c c & c &  c &   c  c c &    c  c  c   c " c c   c % c c & c&  c c)  @c /c c" c% c c c  c  c*c Ô

  c  cc   ÑetConnection6c   c  cc      6c

  c  cc      6 Ôc c

c c  c   c % c   c   c  c c  c$#' c

c &c c c& c  c&  c c c  c&  cc*c ID

NAMA

100 101 102 103 104

&c  !c  c  c %&c

TANGGAL LAHIR    c   c    c    c    c

ALAMAT

KONTAK

 &c   c   c   c  &c

&A "!c  !A "!c  A !!"!c  A! "!c &A "!c

c c

StripBandunk | MySQL dan Java Database Connectivity 105 106 107 108

?!c   c !!c 4 c

  c    c    c    c

!!c  c !c !c

!A !!"!c   A !!"!c )!!A !!"!c  A "!c

c  c  c c c!&cc  c&  c&  c*c ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c    " cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccc       6 c c cc c ccccccccc c c6cc  cc c c ccccccccc c c c c ccccccccc c c6

!  !! !!  !!   !c c ccccccccc c c6 !  !!  !! !!   !c c ccccccccc c c6 !   !!   !!   !!   !c c ccccccccc c c6 !  !!  !! !!   ! c ccccccccc c c6 !  !!  !!  !!   !c c ccccccccc c c6 ! !! !! !!" !c c

c c

StripBandunk | MySQL dan Java Database Connectivity ccccccccc c c6 !  !! !!  !!  !c c ccccccccc c c6 !#!!   !!Ô  !!!c c ccccccccc c c6 ! !! !! !!  !c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 7 ResultSetBefore.java

 c !&c &  c &c c   c & c  c &   c  c $#' c  c&  c c&  c*c

c Gambar 44 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

c & c  c c &   c "!&c &  c % c  c  c   c !&c ;=>c c "c   c & c "!&c  c  c "!&c c & c =>c c "c   c & c "!&c c "!&c c  ccc Ô

  c  cc   ÑetConnection6c   c  cc      6c

  c  cc      6 Ôc c  Ú c6   6cc c  c

c c

StripBandunk | MySQL dan Java Database Connectivity c

c  cc&   c&  c&  c cc c  c!&c     =+#' '2'%/.>cc% c cc&   c&  c  c$#' c c c c c  c*c Úc cc    6  c 

c cc   

6  c  c   cc    6   c 

c cc   

6  c 

c cc   

6   c

c  c!&c&  c c c c c c  cc cc&c& c&  c c & c &  c c c & c  c  c c  c c   c & c &  c c & c&  c c#' 'c& c ) c   c  c "! c c  c !&c c  c   c c &  c &  c c$#' c*c ©  c  c c Ú ©c  Ô

  c Ú ©c   c Ú ©c     c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c     cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c

 c c

StripBandunk | MySQL dan Java Database Connectivity        c   c c Ú c  c  cc      6c Ú c   c  cc  c ccccccccccccccc    6 Ôcc c c  Ú c6   6cc c  c Ú c   c cc    6  c Ú c

c cc   

6  c Ú c c   cc    6   c Ú c

c cc   

6  c Ú c

c cc   

6   c cccccccccccc out

 6 c c c c c cccccccccccc out

 6 c c c c c cccccccccccc out

 6 c c c c c    c cccccccccccc out

 6 c c c c c cccccccccccc out

 6  c c c c c cccccccccccc out

 6   c cccccccccc ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 8 ResultSetIdentitas.java

 c & cc & c  c&  c  cc& cc*c c c c c cc  c c c cc c c  c  c c  

 c c c c

c c c  c c c c c c c  c  c c   c c c c c c c  c c c c  c c c c  c c   c c

c c

StripBandunk | MySQL dan Java Database Connectivity c c c c c   c c c c  c c c   c  c c   c c c c c c c  c c c c c c c c  c c   c c c c c c c  c c c c  c c c  c  c c   c c c c c c c c c c c  c c c c  c c" c c c c c c c  c c c c  c c c  c  c c  c c c c c c c#c c c c  c c cÔ  c  c cc c c c c c c c c c c  c c c c  c c  c c

c !!c  c 10c   c  c  c   c c &  c c c  c&c !!"!c*c ©  c  c

c c

StripBandunk | MySQL dan Java Database Connectivity c Ú ©c  Ô

  c Ú ©c   c Ú ©c     c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c     $cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c Ú c   c  cc  c ccccccccccccccc    6 Ôcc c c ccccccccccccccccccccc c c c cc!%! c  Ú c6   6cc c  c Ú c   c cc    6  c Ú c

c cc   

6  c Ú c c   cc    6   c Ú c

c cc   

6  c Ú c

c cc   

6   c cccccccccccc out

 6 c c c c c cccccccccccc out

 6 c c c c c cccccccccccc out

 6 c c c c c    c cccccccccccc out

 6 c c c c c cccccccccccc out

 6  c c c c c cccccccccccc out

 6   c cccccccccc ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc

c c

StripBandunk | MySQL dan Java Database Connectivity ccccccc cccc c Java 9 ResultSetYahoo.java

 c!&c&  c&%c  c & c  c&  c  ccc*c c c c c c   c c c c  c c c   c  c c   c c c c c c c c c c c  c c c c  c c" c c c c c c c  c c c c  c c c  c  c c  c c c c c c c#c c c c  c c cÔ  c  c cc c

c

c      c  c  c &  c  c  c ) c  c    c c   c  c   c & c  c  c &  c    c c   c c & c !c # $%c /'$c $ $$c /c  c    c  c  c   c  c !"!c*c Ô

  c  cc   ÑetConnection6c

   c  cc       6  c  c

c

c c

StripBandunk | MySQL dan Java Database Connectivity & c & c  c  & c    c  c  c  c  c c& c67c) c c  c c&  cc*c Ô

  c  cc   ÑetConnection6c

   c  cc  c ccccccccccccccc    6 c c cc c ccccccccccccccccccccc c c6cc  cc  c c ccccccccccccccccccccc c c c c c c6cccc c

c  c c  c  c   c & c c  & c 67c &  c  c c  c & c c &   c   c !&c    =c &;c   c  >c  c c c   c !&c ;"/& =>c c cc  c  c   c  c   c  c  c "! c   c &  c &  c  c $#' c   c   c*c ©  c  c c Ú ©c  Ô

  c Ú ©c   c Ú ©c     c Ú ©c      c Ú ©c      c Ú ©c   Ô  c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c      cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c

c c

StripBandunk | MySQL dan Java Database Connectivity Ú c    c  cc  c ccccccccccccccc    6 c c cc c ccccccccccccccccccccc c c6cc  cc  c c ccccccccccccccccccccc c c c c c c6cccc c c ccccccccc    6c

c ccccccccc   

6c  c Ú cÔ  c ccÔ  ÑetInstance6c ccccccccc  6 cÔ  DECEMBERcc ccccccccc    6 cc  6      6c ccccccccc   

6c    c ccccccccc   

6c    c ccccccccc       6c c ccccccccc    6c c ccccccccc   

6c    c Ú cÔ  c ccÔ  ÑetInstance6c ccccccccc  6 cÔ  OCTOBERcc ccccccccc    6 cc  6      6c ccccccccc   

6c   c ccccccccc   

6c    c ccccccccc       6c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 10 PrepareStatementInsert.java

 c !&c &  c &c c   c & c  c  c    c &  c  c $#' c*cc

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 45 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c  c  &c  c "! c  c !c # $%c   c    c   c  c  c "! c  c !c /'$c   c   c*c ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c      c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c     cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c

c c

StripBandunk | MySQL dan Java Database Connectivity Ú c    c  cc  c ccccccccccccccc    6 c cc c c cc ccc c ccccccccccccccccccccc c c cccc c c ccccccccc    6c c ccccccccc    6c

c ccccccccc       6c c ccccccccc    6cc ccccccccc    6c c ccccccccc       6c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 11 PrepareStatement]pdate.java

 c & c )   c !&c &  c   c & c  c  c   c "!&c ccc5cc c& c) &cc& c"!&c cc c5cc c& c) &cc*c

c Gambar 46 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c   c  c  c "! c  c  c $ $$c   c    c*c c c

StripBandunk | MySQL dan Java Database Connectivity ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c      c Ú ©c      c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c      cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c    c  cc  c ccccccccccccccc    6 cc cc c ccccccccccccccccccccccccccccc c c cccc c c ccccccccc    6cc ccccccccc       6c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 12 PrepareStatementDelete.java

 c !&c &  c  c  c   c !&c &  c  c  c "!&c c cc5cc*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 47 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c  $   c  c  c !c # $%c /'$c $ $$c  c ) c  c &  c   c  c $ $ c c &  c   c % c  c  c  c &   cc&  c c & c&  c c$#' c*c ©  c  c c Ú ©c  Ô

  c Ú ©c   c Ú ©c     c Ú ©c      c Ú ©c     c Ú ©c      c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c      cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c

 c c

StripBandunk | MySQL dan Java Database Connectivity Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c    c  cc  c ccccccccccccccc    6 Ôcc c c Ú c   c  cc      6c  Ú c6   6cc Ú c   c cc    6  c Ú c

c cc   

6  c Ú c c   cc    6   c Ú c

c cc   

6  c Ú c

c cc   

6   c cccccccccccc out

 6 c c c c c cccccccccccc out

 6 c c c c c cccccccccccc out

 6 c c c c c    c cccccccccccc out

 6 c c c c c cccccccccccc out

 6  c c c c c cccccccccccc out

 6   c cccccccccc ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 13 PrepareStatementResult.java

 c & c)   c  c  c"c ccc*c c c c c cc  c c c cc c c  c  c c  

 c c c c c c c c c c c c c c  c  c c   c c c c

c c c  c c c c c c c  c  c c   c c

c c

StripBandunk | MySQL dan Java Database Connectivity c c c c c  c c c c  c c c c  c c   c c c c c c c   c c c c  c c c   c  c c   c c c c c c c  c c c c c c c c  c c   c c c c c c c  c c c c  c c c  c  c c   c c c c c c c c c c c  c c c c  c c" c c c c c c c  c c c c  c c c  c  c c  c c c c c c c#c c c c  c c cÔ  c  c cc c c c c c c c c c c  c c c c  c c  c c

c c c

StripBandunk | MySQL dan Java Database Connectivity

c %$ ! $c#  c  &c c c c% c& c  c c  c c  c ) c

c&  c&  c!c% c c  c&  c  c    c  c  c  c & c    c   c % c ) c  c  c   c c   c &  c  c c  c  c % c c &  c c&  c c c c  c c& c& c   c *c Ô

  c  cc   ÑetConnection6c   c  cc      6c ccccccccccccccc   TYPE_SCROLL_INSENSITIVEc ccccccccccccccc   CONCUR_UPDATABLEc

  c  cc      6 Ôc c

c  c c    c &  c  c c  c !&c !!%! =>c & c c   c  c  c &  c  c  c   c !&c &    =c &;'c   c  >c & c  c !c  c   c !&c %! =>c c   c &  c

c &c & c  c c*c ©  c  c c Ú ©c  Ô

  c Ú ©c   c Ú ©c     c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c   Ô  c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c        cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c

c c

StripBandunk | MySQL dan Java Database Connectivity c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccccccccc   TYPE_SCROLL_INSENSITIVEc

  CONCUR_UPDATABLEc Ú c   c  cc      6 Ôc c ccccccccccccccc c cc  c c c c  c c ccccccccccccccc c c c c c ccccccccc      6c c ccccccccc     6cc ccccccccc    

6c    c Ú cÔ  c ccÔ  ÑetInstance6c ccccccccc  6cÔ  OCTOBERcc ccccccccc     6 cc  6      6c ccccccccc    

6c   c ccccccccc    

6c    c c ccccccccc  

  6c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 14 AdvancedResultSetInsert.java

 c )   c !&c &  c & c  c  c    c &  c  c $#' c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 48 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c   c c  c c&  c  c% c c& c& c  c& c   c&  c% c c c c! c cc "!&c c  c  c  c  c !c c  c c  c  c c   c  c c & c  c  !&c c c  c c  c&  c   c  1c /c  c &  c  c  c  c &c "!&c c  c  c  c & c !&c !=c &;%"!&>c c % c  c c !c # $%c c !c /'$c  c ) c   c !&c &    =c &;'c   c  >c & c  c & c & c !&c& %! =>c c*c ©  c  c c Ú ©c  Ô

  c Ú ©c   c Ú ©c     c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c   Ô  c Ú ©c    

 c Ú ©c    

 c c c š    c

c c

StripBandunk | MySQL dan Java Database Connectivity c © Ú c       cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccccccccc   TYPE_SCROLL_INSENSITIVEc

  CONCUR_UPDATABLEc Ú c   c  cc      6 Ôc c ccccccccccccccc c cc  c c c c  c c ccccccccccccccc c c c c c ccccccccc    6c c ccccccccc     6cc ccccccccc    

6c    c Ú cÔ  c ccÔ  ÑetInstance6c ccccccccc  6cÔ  OCTOBERcc ccccccccc     6 cc  6      6c ccccccccc    

6c    c ccccccccc    

6c    c c ccccccccc    6c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 15 AdvancedResultSet]pdate.java

 c!&c&  c c c c"!& cc c*c

c c

StripBandunk | MySQL dan Java Database Connectivity

c Gambar 49 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

 c   c  c /c  c "!& c   c % c  c  c   c !&c &%! =>c  c  c  c  c  c "!&c c  c & c & c !&c !=c &;%"!&>c  c  c  c  c"!& c c c*c ©  c  c c Ú ©c  Ô

  c Ú ©c     c Ú ©c     c Ú ©c      c Ú ©c    c Ú ©c    

 c Ú ©c    

 c c c š    c c © Ú c        cc c © Ú  Ú Úc

6Ú c

 c cc cc ccccccccc Ô forName6       6c c Ú c

c   cc  c Ú c

c cc   c c

c c

StripBandunk | MySQL dan Java Database Connectivity Ú cÔ

  c  cc   ÑetConnection6c        c   c c Ú c  c  cc      6c ccccccccccccccc   TYPE_SCROLL_INSENSITIVEc

  CONCUR_UPDATABLEc Ú c   c  cc      6 Ôc c ccccccccccccccc c cc  c c c c  c c ccccccccccccccc c c c c c ccccccccc    6c c ccccccccc    6c c ccccccc  c6Ú c    c cc ccccccc  c6Ú c        c cc ccccccc  c6Ú c      c cc ccccccc  c6Ú cÔ     c cc ccccccc cccc c Java 16 AdvancedResultSetDelete.java

 c!&c&  c&)   c  c"!&c c  c c&  c&   c*c

c Gambar 50 Menampilkan Seluruh Data Dalam Tabel IDENTITAS

c c& c  c  c   c    c  c c  c  c   c &  c ! c &   c  c    c  c % c    c  c  c  c  ) c !c # $%c & c /'$c   c "!"!c   c c c

StripBandunk | MySQL dan Java Database Connectivity    c & c !c $ $$c & c $ $ c   c "!"!c   c  c # c & c    c !c $ $ c c  c   c    c c  c !c $ $ c c c   c !&c  cc% c c&  c c c c  !&c c"  c !! c !& c c c c  cc c

c

c c

StripBandunk | MySQL dan Java Database Connectivity

c   c c c  cEko Kurniawan Khannedy S.Komc c&c! c  c  c cc  c& c c&c! c  cc   c c/ c0!c &! cc ccc)  c  cChief Executive Officerc&cStripBandunkc c  c c  c&c  c!!c! c & c! c c c&c  c! c!!c& c  ccc &  cLeaderc&c! cJava ]ser Group Bandungc& c) cModeratorc&c! cNetBeans Indonesiac c&  c&c&c*c dc "! & A "!c dc * "! & cc dc * "!!"! & cc *c c

 c c

MySQL-Dan-Java-Database-Connectivity.pdf

MySQL-Dan-Java-Database-Connectivity.pdf. MySQL-Dan-Java-Database-Connectivity.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ...

2MB Sizes 1 Downloads 77 Views

Recommend Documents

No documents