1 / 13

MENGELOLAH DATABASE

MENGELOLAH DATABASE. DENGAN MYSQL. Contoh Database. Contoh : Perancangan DATABASE akademik untuk mengelola nilai ujian mahasiswa Tahap pertama mendefinisikan tabel yang akan digunakan untuk menyimpan data nilai ujian mahasiswa.

zariel
Download Presentation

MENGELOLAH DATABASE

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. MENGELOLAH DATABASE DENGAN MYSQL

  2. Contoh Database Contoh : Perancangan DATABASE akademik untuk mengelola nilai ujian mahasiswa • Tahap pertama mendefinisikan tabel yang akan digunakan untuk menyimpan data nilai ujian mahasiswa. • Merancang tabel yang memiliki atribut : nama, matakuliah1, nilai 1, matakuliah2, nilai2, contoh tabel sebagai berikut :

  3. Perubahan Rancangan 1 Perubahan Rancangan : Tabel mahasiswa Tabel nilai

  4. Perubahan Rancangan 2 Perubahan Rancangan : Tabel mahasiswa Tabel nilai Tabel Mata kuliah

  5. Perubahan Rancangan 3 Perubahan Rancangan : Tabel mahasiswa Tabel nilai Tabel Mata kuliah

  6. RELASI - Relasi Antar entitas (entity), tabel mewakili entitas yang ada didalamnya. - Untuk memudahkan maka entitas dan relasi dapat diwakili dengan tabel. - Secara diagram relasi entitas maka hasil dari contoh diatas dapat digambarkan sbb : MAHASISWA NILAI Matakuliah NIM Nama KodeMK NIM Nilai KodeMK Mata Kuliah Kredit kodeMK=kodeMK NIM=NIM

  7. MEMBUAT DATABASE DAN TABEL Membuat database dengan nama file nilai_mhsdb Sebelum membuat tabel lebih dahulu panggil database yang telah dibuat dengan perintah : use nilai_mhsdb;

  8. Membuat Tabel - Membuat Tabel Nilai Membuat tabel matakuliah

  9. Menampilkan Database dan Tabel • Menampilkan database menggunakan perintah : • Show databases; • Menampilkan Tabel menggunakan perintah : • Show Tables;

  10. MEMANIPULASI DATA • Menampilkan struktur Tabel • Perintah : describe namatabel; • Memanipulasi database (pengisian/penambahan data) • Perintah : Insert into namatabel values (‘isi’, ‘isi’); atau • Insert into namatabel (‘field’, ‘field’) values (‘isi’, ‘isi’);

  11. Membaca Data yang ada dalam Tabel database • Contoh perintah : select * from nilai; • - Mengubah dan memperbaiki Data dalam table • Contoh perintah : • update nilai • Set nim=‘20081’ • Where kodemk=‘MK00’;

  12. Studi Kasus Perancangan Database 1. Buku alamat

  13. Studi Kasus Perancangan Database 2. Pegawai Perusahaan

More Related