1. CREATE TABLE DSN (nip char(10) not null,nm char(25),nohp char(12))
CREATE TABLE KLS (kdkls char(10) not null,ruang char(25),nip char(10),mata_kul char(25))
CREATE TABLE MHS (nim char(10) not null,nm char(25),ipk char(4))
CREATE TABLE AJAR (nip char(10) not null,nim char(10),wkt char(5),mata_kul char(25) sks char(3))
2. CREATE UNIQUE INDEX DSNnipx ON DSN(nip);
CREATE UNIQUE INDEX KLSkdklsx ON KLS(kdkls);
CREATE UNIQUE INDEX MHSnimx ON MHS(nim);
CREATE UNIQUE INDEX AJARnipx ON AJAR(nip);
3. INSERT INTO DSN VALUES ("21200000","HEM","0214007466");
INSERT INTO DSN VALUES ("21300000","LIA","021400778");
INSERT INTO DSN VALUES ("21400000","RSD","0214007596");
INSERT INTO DSN VALUES ("21500000","RDT","0214001426");
INSERT INTO KLS VALUES ("12.2b.01","301","21200000","Perancangan Basis Data");
INSERT INTO KLS VALUES ("12.2b.02","302","21300000","Konsep Dasar Akuntansi");
INSERT INTO KLS VALUES ("12.2b.03","303","21400000","Logika dan Algoritma");
INSERT INTO KLS VALUES ("12.2b.04","304","21500000","Management Dan Bisnis");
INSERT INTO MHS VALUES ("12090188","MEISARAH","3.37");
INSERT INTO MHS VALUES ("12090187","LASKAR","3.01");
INSERT INTO MHS VALUES ("12090186","SYAHRUL","3.47");
INSERT INTO MHS VALUES ("12090185","KARIAMA","3.50");
INSERT INTO AJAR VALUES ("21200000","12090185","17.00","Perancangan Basis Data","4");
INSERT INTO AJAR VALUES ("21300000","12090186","17.45","Konsep Dasar Akuntansi","2");
INSERT INTO AJAR VALUES ("21400000","12090187","18.30","Logika dan Algoritma","4");
INSERT INTO AJAR VALUES ("21500000","12090188","20.00","Management Dan Bisnis","3");
4. SELECT kdkls,nm FROM MHS;
SELECT nip,nm,nohp FROM DSN;
SELECT mata_kul FROM AJAR WHERE wkt=18.30;
SELECT nm FROM KLS WHERE nip=12090188;
SELECT ipk FROM MHS WHERE nm=SYAHRUL;
SELECT*FROM KLS;
5. GRANT SELECT (nm) ON DSN TO BOCAH
6. RECOVER TABLE MHS;
RECOVER TABLE KLS;
7. LOAD FROM "/data (D:)/meisarah/text"
DELIMITER "|" INSERT INTO MHS;
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar