1 / 10

Pembuatan Database

Pembuatan Database. Perintah SQL (Structure Query Language). Data Definition Language (DDL) Data Manipulation Language (DML) Data Control Language (DCL). Data Definition Language. untuk mendefinisikan struktur dari sebuah database Perintah DDL: Create : membuat tabel dan database

cutter
Download Presentation

Pembuatan 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. Pembuatan Database

  2. Perintah SQL (Structure Query Language) • Data Definition Language (DDL) • Data Manipulation Language (DML) • Data Control Language (DCL)

  3. Data Definition Language • untukmendefinisikanstrukturdarisebuahdatabase • Perintah DDL: • Create : membuattabeldandatabase • Alter : mengubahstrukturtabel yang sudahdibuat • Drop : menghapustabelataudatabase • Truncate : menghapusseluruhisitabel

  4. Data Definition Language • Create • create database if not exist pegawai; • Create table pegawai (nip varchar (13) not null primary key, namavarchar (20), alamat text, telpnvarchar (13));

  5. Data Definition Language • Alter • Alter table pegawai add jabatanvarchar(10) not null; • Drop • Drop table pegawai; • Drop database pbw; • Truncate • Truncate table pegawai;

  6. Data Manipulation Language • untukmenampilkan, mengubah, memasukkandanmenghapus data pada tabel ataupun skema pada sebuah database. • Perintah DML: • Select : menampilkan data darisebuahtabel • Insert : memasukkan data kedalamtabel • Update : mengedit data padasebuahtabel • Delete : menghapus data sebuahbarispadasebuahtabelmaupununtukmengosongkantabel

  7. Data Manipulation Language • Select: • Select * from pegawai; • Select * from pegawai where nip=123; • Select nip,nama from pegawai; • Select nip,nama from pegawai where nip=123; • Select * from pegawai, jabatan where pegawai.jabatan=jabatan.kode;

  8. Data Manipulation Language • Insert: • Insert into pegawai values (1,2,3,4); • Insert into pegawai (nip, nama) values (1,2) • Update • Update pegawai set nama=‘Budi’ where nip=‘123’; • Delete • Delete from pegawai; • Delete from pegawai where nip=‘123’;

  9. Data Control Language • untukmemberikanhakaksesatau pun mencabuthakakses • Perintah DCL : • Grant : membukaakses • Revoke : menutupakses

  10. Data Control Language • Grant • GRANT SELECT ON TO pegawai razief; • Revoke • REVOKE SELECT ON TO pegawai razief;

More Related