Mysql DB Penjualan
Mysql DB Penjualan
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