Batasan Implementasi Implementasi Perangkat Lunak
✝
6
menggunakan perangkat
lunak XAMPP
1.7.3. Tabel-tabel
berikut menggambarkan struktur tabel yang di implementasikan pada basis data.
-- Database: `apotek` -- Table structure for table `dataobat`
CREATE TABLE IF NOT EXISTS `dataobat` `KodeObat` varchar6 NOT NULL,
`KodeSupplier` varchar10 NOT NULL, `NamaObat` varchar50 NOT NULL,
`JenisObat` varchar20 NOT NULL, `Satuan` varchar10 NOT NULL,
`HargaJual` int7 NOT NULL, `StockMinimum` int2 NOT NULL,
`Stock` int4 NOT NULL, `Status` varchar30 NOT NULL,
PRIMARY KEY `KodeObat`, UNIQUE KEY `kode_obat` `KodeObat`
ENGINE=MyISAM DEFAULT CHARSET=latin1; --------------------------------------------------------
-- Table structure for table `datasupplier` CREATE TABLE IF NOT EXISTS `datasupplier`
`KodeSupllier` varchar10 NOT NULL, `NamaSupplier` varchar50 NOT NULL,
✞ ✟
`Telepon` int10 NOT NULL, `Alamat` varchar100 NOT NULL,
`Kota`varchar30 NOT NULL, `KodeObat`varchar100 NOT NULL,
PRIMARY KEY `KodeSupplier`, UNIQUE KEY `kode_supplier` `KodeSupplier`
ENGINE=MyISAM DEFAULT CHARSET=latin1; -- --------------------------------------------------------
-- Table structure for table `prosespembelian` CREATE TABLE IF NOT EXISTS `prosespembelian `
`NoPembelian` varchar6 NOT NULL, `TanggalPembelian` varchar10 NOT NULL,
`KodeSupplier` varchar6 NOT NULL, `NamaSupplier` varchar50 default NULL,
`Alamat` varchar100 default NULL, `KodeObat` varchar6 default NULL,
`NamaObat` varchar50 default NULL, `JenisObat` varchar20 default NULL,
`Satuan` varchar20 default NULL, `Jumlah` int7 default NULL,
PRIMARY KEY `NoPembelian `, UNIQUE KEY `no_pembelian ` `NoPembelian `
ENGINE=MyISAM DEFAULT CHARSET=latin1;
✠
8
-- -------------------------------------------------------- -- Table structure for table `prosespenjualan`
CREATE TABLE IF NOT EXISTS ` prosespenjualan` `NoPenjualan` varchar10 NOT NULL,
`TanggalPenjualan` varchar20 NOT NULL, `KodeObat` varchar10 NOT NULL,
`NamaObat` varchar50 NOT NULL, `JenisObat` varchar10 NOT NULL,
`Satuan` varchar10 NOT NULL, `NamaDokter` varchar50 NOT NULL,
`Jumlah` int3 NOT NULL, `HargaJual` int7 NOT NULL,
`Stock` int3 NOT NULL, `Status` int20 NOT NULL,
`TotalHarga` int7 NOT NULL, PRIMARY KEY `NoPenjualan `,
ENGINE=MyISAM DEFAULT CHARSET=latin1; -- --------------------------------------------------------
-- Table structure for table `penerimaanobat` CREATE TABLE IF NOT EXISTS ` penerimaanobat `
`Tanggalmasuk` varchar20 NOT NULL, `NoPembelian` varchar10 NOT NULL,
`KodeSupplier` varchar10 NOT NULL,