text: -- phpMyAdmin SQL Dump
  -- version 5.1.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Apr 12, 2022 at 08:51 AM
  -- Server version: 10.4.21-MariaDB
  -- PHP Version: 8.0.11
  
  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: `pustaka`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `buku`
  --
  
  CREATE TABLE `buku` (
    `id` int(11) NOT NULL,
    `judul_buku` varchar(128) CHARACTER SET latin1 NOT NULL,
    `id_kategori` int(11) NOT NULL,
    `pengarang` varchar(64) CHARACTER SET latin1 NOT NULL,
    `penerbit` varchar(64) CHARACTER SET latin1 NOT NULL,
    `tahun_penerbit` year(4) NOT NULL,
    `isbn` varchar(64) CHARACTER SET latin1 NOT NULL,
    `stok` int(11) NOT NULL,
    `dipinjam` int(11) NOT NULL,
    `dibooking` int(11) NOT NULL,
    `image` varchar(256) CHARACTER SET latin1 DEFAULT 'book-default-cover.jpg'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `buku`
  --
  
  INSERT INTO `buku` (`id`, `judul_buku`, `id_kategori`, `pengarang`, `penerbit`, `tahun_penerbit`, `isbn`, `stok`, `dipinjam`, `dibooking`, `image`) VALUES
  (1, 'Statistika dengan Program Komputer', 1, 'Ahmad kholiqul amin', 'Deep Publish', 2014, '9786022809432', 6, 1, 1, '208445.jpg'),
  (2, 'MUDAH BELAJAR KOMPUTER UNTUK ANAK', 1, 'Bambang Agus Setiawan', 'Huta media', 2014, '9786025118500', 5, 3, 1, '1212321.jpg'),
  (5, 'PHP Komplet', 1, 'Jubilee', 'Elex Media Komputindo', 2017, '9786020425306', 5, 1, 1, '1212321.jpg'),
  (10, 'Detective Conan Ep200', 9, 'Okigawa Sasuke', 'Cultura', 2016, '4091250505', 5, 0, 0, '2324.jpg'),
  (14, 'Bahasa Indonesia', 2, 'Umri Nur\'aini dan indriyani ', 'Pusat perbukuan', 2015, '5161616412123151', 3, 0, 0, '0404_4f4a.jpg'),
  (15, 'Komunikasi Lintas Budaya', 5, 'Dr.Dedy Kurnia', 'Published', 2015, '68616186516125515', 5, 0, 0, 'pengantar-komunikasi-lintas-budaya-menerobos-era-digital-dengan-sukses.jpg'),
  (16, 'Kolaborasi Codeigniter dan ajax dalam Perancangan', 1, 'Anton subagja', 'Elex Media Komputindo', 2017, '84518335115', 5, 0, 0, '12121223123.jpg'),
  (17, 'From hobby to Money', 4, 'Deasylawati', 'Elex Media Komputindo', 2015, '6511681316813518', 5, 0, 0, 'ID_EMK2014MTH12FHTM_B.jpg'),
  (8, 'Buku Saku Pramuka', 8, 'Rudi Himawan', 'Pusat Perbukuan', 2016, '5618797996113438', 6, 0, 0, '3569750_28ca13e0-d5e8-41f5-ba83-73379917b572_552_626.jpg'),
  (19, 'Rahasia Keajaiban Bumi', 3, 'Nurul Ihsan', 'Luxima', 2014, '3165116461343', 5, 0, 0, '92213_f.jpg');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `kategori`
  --
  
  CREATE TABLE `kategori` (
    `id_kategori` int(5) NOT NULL,
    `nama_kategori` varchar(45) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `kategori`
  --
  
  INSERT INTO `kategori` (`id_kategori`, `nama_kategori`) VALUES
  (1, 'Komputer'),
  (2, 'Bahasa'),
  (3, 'Sains'),
  (4, 'Hobby'),
  (5, 'Komunikasi'),
  (6, 'Hukum'),
  (7, 'Agama'),
  (8, 'Populer'),
  (9, 'Komik');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `role`
  --
  
  CREATE TABLE `role` (
    `id` int(11) NOT NULL,
    `role` varchar(128) CHARACTER SET latin1 NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `role`
  --
  
  INSERT INTO `role` (`id`, `role`) VALUES
  (1, 'Administrator'),
  (2, 'Member');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `Id` int(11) NOT NULL,
    `nama` varchar(128) CHARACTER SET latin1 NOT NULL,
    `email` varchar(128) CHARACTER SET latin1 NOT NULL,
    `image` varchar(128) CHARACTER SET latin1 NOT NULL,
    `password` varchar(128) CHARACTER SET latin1 NOT NULL,
    `role_id` int(11) NOT NULL,
    `is_active` int(11) NOT NULL,
    `tanggal_input` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `kategori`
  --
  ALTER TABLE `kategori`
    ADD PRIMARY KEY (`id_kategori`);
  
  --
  -- Indexes for table `role`
  --
  ALTER TABLE `role`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`Id`);
  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 */;
  