Pratikum Sistem basis data
Create database perpustakaan_3342
use perpustakaan_3342
create table buku(
kd_buku char(13)not null constraint pk_kd_buku primary key,
kd_jenis char(13) constraint fk_kd_jenis foreign key references jenisbuku(kd_jenis),
kd_tipe char(13) constraint fk_kd_tipe foreign key references tipebuku(kd_jtipe),
jud_bukku varchar(23)not null,
pengarang varchar(12)not null,
penerbit varchar(14) not null)
create table jenisbuku(
kd_jenis char(12)not null constraint pk_kd_jenis primary key,
Nama varchar(15)not null)
create table tipebuku(
kd_jtipe char(14)not null constraint pk_kd_jtipe primary key,Nama varchar(15)not null)
select *from buku
select *from jenisbuku
select *from tipebuku
insert into buku values('ab001','A1','001','Sistem basis data','Fauns','scuub publisher')
insert into jenisbuku values ('A1','Naim')
insert into tipebuku values ('001','Naim')
insert into buku values('ab002','A2','002','SBD','Suyanto','andi publiher')
insert into jenisbuku values ('A2','Nanda')
insert into tipebuku values ('002',' Nanda ')
insert into buku values('ad4697','bd','013','Hardware software,'Informatika','informatika')
insert into jenisbuku values ('bd','Teknik fotografi')
insert into tipebuku values ('013',''Teknik fotografi')
insert into buku values('AA12','ssd','w12','Multimedia brodcasting','Deny','cross creation')
insert into jenisbuku values ('ssd','Nana')
insert into tipebuku values ('w12','Nana')
0 comments:
Apa yang anda pikirkan... !