text: -- phpMyAdmin SQL Dump
  -- version 4.8.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Oct 11, 2018 at 06:39 AM
  -- Server version: 10.1.34-MariaDB
  -- PHP Version: 7.2.8
  
  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: `rental_mobil`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `admin`
  --
  
  CREATE TABLE `admin` (
    `id_admin` int(5) NOT NULL,
    `nama_admin` varchar(25) NOT NULL,
    `username` varchar(25) NOT NULL,
    `password` varchar(35) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `admin`
  --
  
  INSERT INTO `admin` (`id_admin`, `nama_admin`, `username`, `password`) VALUES
  (1, 'Admin', 'admin', 'c33367701511b4f6020ec61ded352059');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `id_pelanggan`
  --
  
  CREATE TABLE `id_pelanggan` (
    `no_id` int(5) NOT NULL,
    `jenis_id` varchar(20) NOT NULL,
    `nama` varchar(45) NOT NULL,
    `alamat` varchar(50) NOT NULL,
    `no_telpon` varchar(16) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `kategori`
  --
  
  CREATE TABLE `kategori` (
    `id_kategori` int(5) NOT NULL,
    `nama_kategori` varchar(45) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `kategori`
  --
  
  INSERT INTO `kategori` (`id_kategori`, `nama_kategori`) VALUES
  (509, 'Mobil Pribadi'),
  (2104, 'Travel');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mobil`
  --
  
  CREATE TABLE `mobil` (
    `kode_mobil` int(3) NOT NULL,
    `id_kategori` int(5) NOT NULL,
    `no_polisi` varchar(10) NOT NULL,
    `nama_mobil` varchar(20) NOT NULL,
    `warna` varchar(20) NOT NULL,
    `harga_sewa` double NOT NULL,
    `status_mobil` enum('1','0') NOT NULL,
    `gambar` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `mobil`
  --
  
  INSERT INTO `mobil` (`kode_mobil`, `id_kategori`, `no_polisi`, `nama_mobil`, `warna`, `harga_sewa`, `status_mobil`, `gambar`) VALUES
  (1, 0, 'B 51 BSD', 'lamborghini', 'Hitam', 1000000, '1', '');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `pelanggan`
  --
  
  CREATE TABLE `pelanggan` (
    `no_pelanggan` int(3) NOT NULL,
    `nama` varchar(45) NOT NULL,
    `gender` enum('laki-laki','perempuan') NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `registrasi`
  --
  
  CREATE TABLE `registrasi` (
    `no_pelanggan` int(3) NOT NULL,
    `no_id` int(5) NOT NULL,
    `nama` varchar(45) NOT NULL,
    `tgl_registrasi` date NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `rental`
  --
  
  CREATE TABLE `rental` (
    `no_transaksi` int(3) NOT NULL,
    `no_pelanggan` int(3) NOT NULL,
    `kode_mobil` int(3) NOT NULL,
    `tgl_rental` date NOT NULL,
    `tgl_kembali` date NOT NULL,
    `harga_sewa` double NOT NULL,
    `status_peminjaman` varchar(25) NOT NULL,
    `status_pengembalian` varchar(15) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `admin`
  --
  ALTER TABLE `admin`
    ADD PRIMARY KEY (`id_admin`);
  
  --
  -- Indexes for table `id_pelanggan`
  --
  ALTER TABLE `id_pelanggan`
    ADD PRIMARY KEY (`no_id`);
  
  --
  -- Indexes for table `kategori`
  --
  ALTER TABLE `kategori`
    ADD PRIMARY KEY (`id_kategori`);
  
  --
  -- Indexes for table `mobil`
  --
  ALTER TABLE `mobil`
    ADD PRIMARY KEY (`kode_mobil`);
  
  --
  -- Indexes for table `registrasi`
  --
  ALTER TABLE `registrasi`
    ADD PRIMARY KEY (`no_pelanggan`);
  
  --
  -- Indexes for table `rental`
  --
  ALTER TABLE `rental`
    ADD PRIMARY KEY (`no_transaksi`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `admin`
  --
  ALTER TABLE `admin`
    MODIFY `id_admin` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `id_pelanggan`
  --
  ALTER TABLE `id_pelanggan`
    MODIFY `no_id` int(5) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `kategori`
  --
  ALTER TABLE `kategori`
    MODIFY `id_kategori` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2105;
  
  --
  -- AUTO_INCREMENT for table `mobil`
  --
  ALTER TABLE `mobil`
    MODIFY `kode_mobil` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `registrasi`
  --
  ALTER TABLE `registrasi`
    MODIFY `no_pelanggan` int(3) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `rental`
  --
  ALTER TABLE `rental`
    MODIFY `no_transaksi` int(3) NOT NULL AUTO_INCREMENT;
  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 */;
  