Copy Paste Clip number :
 

Copy-Paste anything you want, then get it from anywhere.


Clip number :   1WFU
Direct URL :   https://www.heypasteit.com/clip/1WFU
Date :   2015-04-05 13:27:13 GMT
Download as file
create database praktikum3;

use praktikum3;

create table mahasiswa(
	nim varchar(10) primary key,
	nama varchar(25) not null,
	alamat varchar(25) not null,
	usia int not null,
	angkatan int not null
);

create table dosen(
	nip varchar(10) primary key,
	nama_dosen varchar(25) not null,
	alamat varchar(25) not null
);

create table matkul(
	kode_matkul varchar(10) primary key,
	nip varchar(10) not null,
	foreign key (nip) references dosen(nip),
	nama_matkul varchar(10) not null,
	semester int not null
);

create table nilai(
	kode_nilai varchar(10) primary key,
	nim varchar(10) not null,
	kode_matkul varchar(10) not null,
	nilai int not null,
	foreign key (nim) references mahasiswa(nim),
	foreign key (kode_matkul) references matkul(kode_matkul)
);

insert into mahasiswa values
	('1300001', 'Abdul Aziz Priatna', 'Bandung', '20', '2013'),
	('1300002', 'Andi Rahman Fauzi', 'Cikarang', '19', '2013'),
	('1300003', 'Riski Cahyana', 'Banten', '19', '2013'),
	('1300004', 'Nurridayanti', 'Bandung', '20', '2013'),
	('1300005', 'Irsyad Riandri Dana Prawi', 'Bandung', '20', '2013');


insert into dosen values
	('1005', 'Herbert', 'Medan'),
	('1818','Harsa Wara', 'Klaten'),
	('2010', 'Enjun Junaeti', 'Solo'),
	('2013', 'Eka Fitrajaya', 'Indramayu'),
	('2210', 'Rosa Ariani Sukamto', 'Sidoarjo');

insert into matkul values
	('IK001', '1005', 'Disweb', '3'),
	('IK002', '1818', 'Probstat', '3'),
	('IK003', '2013', 'Logif', '2'),
	('IK004', '2010', 'Kalkulus', '2'),
	('IK005', '1005', 'Promnet', '4'),
	('IK006', '2210', 'Alpro 2', '2'),
	('IK007', '2210', 'PBO', '4');

insert into nilai values
	('N001', '1300001', 'IK001', '85'),
	('N002', '1300002', 'IK002', '87'),
	('N003', '1300003', 'IK003', '70'),
	('N004', '1300004', 'IK004', '60'),
	('N005', '1300005', 'IK005', '100'),
	('N006', '1300001', 'IK006', '79'),
	('N007', '1300002', 'IK007', '64'),
	('N008', '1300003', 'IK001', '75'),
	('N009', '1300004', 'IK002', '70'),
	('N010', '1300005', 'IK003', '90'),
	('N011', '1300001', 'IK004', '90'),
	('N012', '1300002', 'IK005', '100'),
	('N013', '1300003', 'IK006', '100'),
	('N014', '1300004', 'IK007', '67'),
	('N015', '1300005', 'IK001', '95'),
	('N016', '1300001', 'IK002', '69'),
	('N017', '1300002', 'IK003', '65'),
	('N018', '1300003', 'IK004', '60'),
	('N019', '1300004', 'IK005', '100'),
	('N020', '1300005', 'IK006', '100'),
	('N021', '1300001', 'IK007', '100'),
	('N022', '1300002', 'IK001', '90'),
	('N023', '1300003', 'IK002', '90'),
	('N024', '1300004', 'IK003', '90'),
	('N025', '1300005', 'IK004', '96'),
	('N026', '1300001', 'IK005', '83'),
	('N027', '1300002', 'IK006', '81'),
	('N028', '1300003', 'IK007', '88'),
	('N029', '1300004', 'IK001', '87'),
	('N030', '1300005', 'IK002', '89'),
	('N031', '1300001', 'IK003', '76'),
	('N032', '1300002', 'IK004', '73'),
	('N033', '1300003', 'IK005', '100'),
	('N034', '1300004', 'IK006', '100'),
	('N035', '1300005', 'IK007', '100');
© 2022  HeyPasteIt.com  -  All rights reserved.