1 / 8

Database Operation Pertemuan 12

Database Operation Pertemuan 12. Matakuliah : M0864/Programming I Tahun : 2009. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu: Mahasiswa dapat menerapkan penggunaan konsep operasi database pada pemograman GUI di Java. Bina Nusantara. Outline Materi. Insert

Download Presentation

Database Operation Pertemuan 12

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database OperationPertemuan 12 Matakuliah : M0864/Programming I Tahun : 2009

  2. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu: Mahasiswa dapat menerapkan penggunaan konsep operasi database pada pemograman GUI di Java. Bina Nusantara

  3. Outline Materi Insert Update Delete PreparedStatement Bina Nusantara

  4. Insert Memasukan data pada table di database Sintak SQL : Untuk insert ke semua field dalam 1 record: insert into tableName values (value1, value2, …, valueN) Untuk insert ke beberapa field dalam 1 record : insert into tableName (column1, cloumn2, …, columnN) values (value1, value2, …, valueN) Contoh : insert into Enrollment values (‘0800755660’, ‘CS001’,’8/14/2009’,’A’) insert into Enrollment (binusianId, courseId, grade) values (‘0800755660’, ‘CS001’,’A’)

  5. Update Mengubah data pada table di database Sintak SQL : UpdatetableNameset column1= newValue1, column2 =newNalue2 , …, columnN = newValueNwhere [condition] Jika tidak menggunakan where condition maka akan mengupdate 1 table tersebut. Contoh : Data sebelumnya : Update grade-nya menjadi B untuk binusian id : 1100755660 dan course id : cs001 update Enrollment set grade =‘B’ where binusianId =‘1100755660’ and courseId = ‘CS001’

  6. Delete Mengubah data pada table di database Sintak SQL : deletefromtableNamewhere [condition] Contoh : Data sebelumnya : Delete data untuk binusian id : 1100755660 dan course id : cs001 delete Enrollment where binusianId =‘1100755660’ and courseId = ‘CS001’

  7. Referensi Introduction to Java Programming. 7ed. Liang. 2009. Chapter 37, hal 1261 Introduction to SQL http://www.w3schools.com/SQL/sql_intro.asp Java Tutorial - Insert Update Delete http://www.java2s.com/Tutorial/Java/0340__Database/0500__Insert-Update-Delete.htm Using Prepared Statement http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html Bina Nusantara

More Related