text: -- phpMyAdmin SQL Dump
  -- version 5.0.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Aug 29, 2021 at 07:39 PM
  -- Server version: 10.4.17-MariaDB
  -- PHP Version: 8.0.0
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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: `perpus`
  --
  CREATE DATABASE IF NOT EXISTS `perpus` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
  USE `perpus`;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_biaya_denda`
  --
  
  CREATE TABLE `tbl_biaya_denda` (
    `id_biaya_denda` int(11) NOT NULL,
    `harga_denda` varchar(255) NOT NULL,
    `stat` varchar(255) NOT NULL,
    `tgl_tetap` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_biaya_denda`
  --
  
  INSERT INTO `tbl_biaya_denda` (`id_biaya_denda`, `harga_denda`, `stat`, `tgl_tetap`) VALUES
  (1, '4000', 'Aktif', '2019-11-23');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_buku`
  --
  
  CREATE TABLE `tbl_buku` (
    `id_buku` int(11) NOT NULL,
    `buku_id` varchar(255) NOT NULL,
    `id_kategori` int(11) NOT NULL,
    `id_rak` int(11) NOT NULL,
    `sampul` varchar(255) DEFAULT NULL,
    `isbn` varchar(255) DEFAULT NULL,
    `lampiran` varchar(255) DEFAULT NULL,
    `title` varchar(255) DEFAULT NULL,
    `penerbit` varchar(255) DEFAULT NULL,
    `pengarang` varchar(255) DEFAULT NULL,
    `thn_buku` varchar(255) DEFAULT NULL,
    `isi` text DEFAULT NULL,
    `jml` int(11) DEFAULT NULL,
    `tgl_masuk` varchar(255) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_buku`
  --
  
  INSERT INTO `tbl_buku` (`id_buku`, `buku_id`, `id_kategori`, `id_rak`, `sampul`, `isbn`, `lampiran`, `title`, `penerbit`, `pengarang`, `thn_buku`, `isi`, `jml`, `tgl_masuk`) VALUES
  (8, 'BK008', 2, 1, '0', '132-123-234-231', '0', 'CARA MUDAH BELAJAR PEMROGRAMAN C++', 'INFORMATIKA BANDUNG', 'BUDI RAHARJO ', '2012', '<table class=\"table table-bordered\" style=\"background-color: rgb(255, 255, 255); width: 653px; color: rgb(51, 51, 51);\"><tbody><tr><td style=\"padding: 8px; line-height: 1.42857; border-color: rgb(244, 244, 244);\">Tipe Buku</td><td style=\"padding: 8px; line-height: 1.42857; border-color: rgb(244, 244, 244);\">Kertas</td></tr><tr><td style=\"padding: 8px; line-height: 1.42857; border-color: rgb(244, 244, 244);\">Bahasa</td><td style=\"padding: 8px; line-height: 1.42857; border-color: rgb(244, 244, 244);\">Indonesia</td></tr></tbody></table>', 23, '2019-11-23 11:49:57');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_denda`
  --
  
  CREATE TABLE `tbl_denda` (
    `id_denda` int(11) NOT NULL,
    `pinjam_id` varchar(255) NOT NULL,
    `denda` varchar(255) NOT NULL,
    `lama_waktu` int(11) NOT NULL,
    `tgl_denda` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_denda`
  --
  
  INSERT INTO `tbl_denda` (`id_denda`, `pinjam_id`, `denda`, `lama_waktu`, `tgl_denda`) VALUES
  (3, 'PJ001', '0', 0, '2020-05-20'),
  (5, 'PJ009', '0', 0, '2020-05-20');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_kategori`
  --
  
  CREATE TABLE `tbl_kategori` (
    `id_kategori` int(11) NOT NULL,
    `nama_kategori` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_kategori`
  --
  
  INSERT INTO `tbl_kategori` (`id_kategori`, `nama_kategori`) VALUES
  (2, 'Pemrograman');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_login`
  --
  
  CREATE TABLE `tbl_login` (
    `id_login` int(11) NOT NULL,
    `anggota_id` varchar(255) NOT NULL,
    `user` varchar(255) NOT NULL,
    `pass` varchar(255) NOT NULL,
    `level` varchar(255) NOT NULL,
    `nama` varchar(255) NOT NULL,
    `tempat_lahir` varchar(255) NOT NULL,
    `tgl_lahir` varchar(255) NOT NULL,
    `jenkel` varchar(255) NOT NULL,
    `alamat` text NOT NULL,
    `telepon` varchar(25) NOT NULL,
    `email` varchar(255) NOT NULL,
    `tgl_bergabung` varchar(255) NOT NULL,
    `foto` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_login`
  --
  
  INSERT INTO `tbl_login` (`id_login`, `anggota_id`, `user`, `pass`, `level`, `nama`, `tempat_lahir`, `tgl_lahir`, `jenkel`, `alamat`, `telepon`, `email`, `tgl_bergabung`, `foto`) VALUES
  (1, 'AG001', 'pio', 'c4ca4238a0b923820dcc509a6f75849b', 'Petugas', 'Sahfira', 'Sragen', '1999-08-10', 'Perempuan', 'Ngrampal', '082233002544', 'fifiasahfira944n@gmail.com', '2021-06-20', 'user_1630256173.jpg'),
  (2, 'AG002', 'umar', '202cb962ac59075b964b07152d234b70', 'Anggota', 'Umar', 'Gresik', '1999-07-31', 'Laki-Laki', 'Ngemplak', '082254243096', 'hi@umarhadi.dev', '2021-07-13', 'user_1630256218.gif');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_pinjam`
  --
  
  CREATE TABLE `tbl_pinjam` (
    `id_pinjam` int(11) NOT NULL,
    `pinjam_id` varchar(255) NOT NULL,
    `anggota_id` varchar(255) NOT NULL,
    `buku_id` varchar(255) NOT NULL,
    `status` varchar(255) NOT NULL,
    `tgl_pinjam` varchar(255) NOT NULL,
    `lama_pinjam` int(11) NOT NULL,
    `tgl_balik` varchar(255) NOT NULL,
    `tgl_kembali` varchar(255) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_pinjam`
  --
  
  INSERT INTO `tbl_pinjam` (`id_pinjam`, `pinjam_id`, `anggota_id`, `buku_id`, `status`, `tgl_pinjam`, `lama_pinjam`, `tgl_balik`, `tgl_kembali`) VALUES
  (8, 'PJ001', 'AG002', 'BK008', 'Di Kembalikan', '2020-05-19', 1, '2020-05-20', '2020-05-20'),
  (10, 'PJ009', 'AG002', 'BK008', 'Di Kembalikan', '2020-05-20', 1, '2020-05-21', '2020-05-20'),
  (11, 'PJ0011', 'Ag002', 'bk008', 'Dipinjam', '2021-08-29', 5, '2021-09-03', '0');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_rak`
  --
  
  CREATE TABLE `tbl_rak` (
    `id_rak` int(11) NOT NULL,
    `nama_rak` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `tbl_rak`
  --
  
  INSERT INTO `tbl_rak` (`id_rak`, `nama_rak`) VALUES
  (1, 'Rak Buku 1');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `tbl_biaya_denda`
  --
  ALTER TABLE `tbl_biaya_denda`
    ADD PRIMARY KEY (`id_biaya_denda`);
  
  --
  -- Indexes for table `tbl_buku`
  --
  ALTER TABLE `tbl_buku`
    ADD PRIMARY KEY (`id_buku`);
  
  --
  -- Indexes for table `tbl_denda`
  --
  ALTER TABLE `tbl_denda`
    ADD PRIMARY KEY (`id_denda`);
  
  --
  -- Indexes for table `tbl_kategori`
  --
  ALTER TABLE `tbl_kategori`
    ADD PRIMARY KEY (`id_kategori`);
  
  --
  -- Indexes for table `tbl_login`
  --
  ALTER TABLE `tbl_login`
    ADD PRIMARY KEY (`id_login`);
  
  --
  -- Indexes for table `tbl_pinjam`
  --
  ALTER TABLE `tbl_pinjam`
    ADD PRIMARY KEY (`id_pinjam`);
  
  --
  -- Indexes for table `tbl_rak`
  --
  ALTER TABLE `tbl_rak`
    ADD PRIMARY KEY (`id_rak`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `tbl_biaya_denda`
  --
  ALTER TABLE `tbl_biaya_denda`
    MODIFY `id_biaya_denda` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- AUTO_INCREMENT for table `tbl_buku`
  --
  ALTER TABLE `tbl_buku`
    MODIFY `id_buku` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- AUTO_INCREMENT for table `tbl_denda`
  --
  ALTER TABLE `tbl_denda`
    MODIFY `id_denda` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `tbl_kategori`
  --
  ALTER TABLE `tbl_kategori`
    MODIFY `id_kategori` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `tbl_login`
  --
  ALTER TABLE `tbl_login`
    MODIFY `id_login` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `tbl_pinjam`
  --
  ALTER TABLE `tbl_pinjam`
    MODIFY `id_pinjam` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  
  --
  -- AUTO_INCREMENT for table `tbl_rak`
  --
  ALTER TABLE `tbl_rak`
    MODIFY `id_rak` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  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 */;
  