0% found this document useful (0 votes)
7 views1 page

Mysql DB Penjualan

Uploaded by

AnggiApsarii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Mysql DB Penjualan

Uploaded by

AnggiApsarii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

mysql> create table tbljenis( mysql> create table tblbrgmasuk(

kodejenis char(4) not null primary key, nonota char(10) not null primary key,
jenis varchar(60)); tglmasuk varchar(30),
iddistributor char(6), foreign key
mysql> create table tblpetugas( idpetugas char(6), foreign key
idpetugas char(6) not null primary key, total double);
namapetugas varchar(80),
alamat varchar(100), mysql> create table tbldetailbrgmasuk(
email varchar(80), nonota char(10) not null, foreign key
telpon char(10) kodebarang char(4) not null, foreign key
jumlah smallint(4),
mysql> create table tbldistributor( subtotal double);
iddistributor char(6) not null primary key,
namadistributor varchar(80), mysql> create table tblpenjualan(
alamat varchar(100), nofaktur char(10) not null primary key,
kotasal varchar(80), tglpenjualan varchar(30),
email varchar(80), idpetugas char(6), foreign key
telpon char(10); bayar double,
sisa double,
mysql> create table tblbarang( total double);
kodebarang char(4) not null primary key,
namabarang varchar(100), mysql> create table tbldetailpenjualan(
kodejenis char(4), foreign key (index) nofaktur char(10) not null, foreign key
harganet double, kodebarang char(4) not null, foreign key
hargajual double, jumlah smallint(4),
stok smallint(20) subtotal double);

Foreign key

You might also like