text: -- phpMyAdmin SQL Dump
  -- version 4.7.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: May 06, 2018 at 09:48 AM
  -- Server version: 10.1.30-MariaDB
  -- PHP Version: 5.6.33
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  SET time_zone = "+00:00";
  
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8mb4 */;
  
  --
  -- Database: `tubesci3`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `barang`
  --
  
  CREATE TABLE `barang` (
    `id_barang` int(7) NOT NULL,
    `id_kategori` int(5) NOT NULL,
    `nama_barang` varchar(75) NOT NULL,
    `jumlah_stok` int(5) NOT NULL,
    `harga_satuan` int(15) NOT NULL,
    `gambar` varchar(200) NOT NULL,
    `keterangan` varchar(2000) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `kategori_barang`
  --
  
  CREATE TABLE `kategori_barang` (
    `id_kategori` int(7) NOT NULL,
    `nama_kategori` varchar(27) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `kategori_barang`
  --
  
  INSERT INTO `kategori_barang` (`id_kategori`, `nama_kategori`) VALUES
  (1, 'Komunikasi'),
  (2, 'Perabotan Rumah Tangga');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id_user` int(27) NOT NULL,
    `username` varchar(27) NOT NULL,
    `password` varchar(27) NOT NULL,
    `nama` varchar(75) NOT NULL,
    `email` varchar(75) NOT NULL,
    `level` enum('1','2') NOT NULL,
    `alamat` varchar(200) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id_user`, `username`, `password`, `nama`, `email`, `level`, `alamat`) VALUES
  (997001, 'windhu', 'windhu', 'Stefanus Windhu', 'windhu@mail.com', '1', 'Blitar'),
  (997002, 'cheizar', 'cheizar', 'Cheizar Sandra', 'cheizar_cece@gmail.com', '2', 'Malang'),
  (997003, 'istna', 'istna', 'Istna Luthfi', 'istna_l@gmail.com', '2', 'Nganjuk');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `barang`
  --
  ALTER TABLE `barang`
    ADD PRIMARY KEY (`id_barang`),
    ADD KEY `id_kategori` (`id_kategori`);
  
  --
  -- Indexes for table `kategori_barang`
  --
  ALTER TABLE `kategori_barang`
    ADD PRIMARY KEY (`id_kategori`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id_user`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `barang`
  --
  ALTER TABLE `barang`
    MODIFY `id_barang` int(7) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1008;
  
  --
  -- AUTO_INCREMENT for table `kategori_barang`
  --
  ALTER TABLE `kategori_barang`
    MODIFY `id_kategori` int(7) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id_user` int(27) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=997011;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `barang`
  --
  ALTER TABLE `barang`
    ADD CONSTRAINT `barang_ibfk_1` FOREIGN KEY (`id_kategori`) REFERENCES `kategori_barang` (`id_kategori`);
  COMMIT;
  
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  