text: -- phpMyAdmin SQL Dump
  -- version 5.0.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Nov 05, 2020 at 12:59 AM
  -- Server version: 10.4.13-MariaDB
  -- PHP Version: 7.4.7
  
  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: `mahasiswa`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `jadwal_kuliah`
  --
  
  CREATE TABLE `jadwal_kuliah` (
    `kd_jadwal` int(11) NOT NULL,
    `nim` varchar(10) NOT NULL,
    `kd_matkul` varchar(50) NOT NULL,
    `hari` varchar(250) NOT NULL,
    `jam` varchar(250) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `jadwal_kuliah`
  --
  
  INSERT INTO `jadwal_kuliah` (`kd_jadwal`, `nim`, `kd_matkul`, `hari`, `jam`) VALUES
  (2, 'E020317013', 'MI123', 'Jumat', '14.00 - 16.00'),
  (4, 'E020317069', 'MI321', 'Jumat', '14.00 - 16.00'),
  (5, 'E020317069', 'MI123', 'Senin', '10.00 - 12.00'),
  (6, 'E020317013', 'MI321', 'Selasa', '16.00 - 18.00');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mahasiswa`
  --
  
  CREATE TABLE `mahasiswa` (
    `nim` varchar(10) NOT NULL,
    `nama` varchar(250) NOT NULL,
    `jurusan` varchar(250) NOT NULL,
    `alamat` varchar(250) NOT NULL,
    `telp` varchar(250) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `mahasiswa`
  --
  
  INSERT INTO `mahasiswa` (`nim`, `nama`, `jurusan`, `alamat`, `telp`) VALUES
  ('123124', 'sadaas', 'Teknik Mesin', 'Jl. Cempaka 12', '2131241512352'),
  ('E020317013', 'Ibnu Muhammad Rizky', 'Manajemen Informatika', 'Jl. Wildan Sari 7 No.11', '088705001201'),
  ('E020317018', 'Nurdiana', 'Manajemen Informatika', 'Jl. Kampoeng Melayoe GG. II', '08124367646'),
  ('E020317069', 'Irpan', 'Teknik Mesin', 'Kelayan B', '2013801230111');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `matkul`
  --
  
  CREATE TABLE `matkul` (
    `kd_matkul` varchar(50) NOT NULL,
    `nm_matkul` varchar(250) NOT NULL,
    `sks` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `matkul`
  --
  
  INSERT INTO `matkul` (`kd_matkul`, `nm_matkul`, `sks`) VALUES
  ('MI123', 'Desain Grafis', 3),
  ('MI321', 'Pemrograman Mobile Android', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(11) NOT NULL,
    `nama` varchar(250) NOT NULL,
    `username` varchar(250) NOT NULL,
    `password` varchar(250) NOT NULL,
    `level` varchar(250) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `nama`, `username`, `password`, `level`) VALUES
  (1, 'Ronny Mantala', 'ronnymn', '30df196559f6c591e936d7873119f5c9', 'admin kampus'),
  (2, 'Rahayunita', 'kanita', 'abbe4f5ff0d58460cda3b54fc9202291', 'admin jurusan');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `jadwal_kuliah`
  --
  ALTER TABLE `jadwal_kuliah`
    ADD PRIMARY KEY (`kd_jadwal`),
    ADD KEY `fr_kdmats` (`kd_matkul`),
    ADD KEY `fr_nims` (`nim`);
  
  --
  -- Indexes for table `mahasiswa`
  --
  ALTER TABLE `mahasiswa`
    ADD PRIMARY KEY (`nim`);
  
  --
  -- Indexes for table `matkul`
  --
  ALTER TABLE `matkul`
    ADD PRIMARY KEY (`kd_matkul`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `jadwal_kuliah`
  --
  ALTER TABLE `jadwal_kuliah`
    MODIFY `kd_jadwal` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `jadwal_kuliah`
  --
  ALTER TABLE `jadwal_kuliah`
    ADD CONSTRAINT `fr_kdmats` FOREIGN KEY (`kd_matkul`) REFERENCES `matkul` (`kd_matkul`) ON UPDATE CASCADE,
    ADD CONSTRAINT `fr_nims` FOREIGN KEY (`nim`) REFERENCES `mahasiswa` (`nim`) ON UPDATE CASCADE;
  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 */;
  