text: -- phpMyAdmin SQL Dump
  -- version 5.1.0
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Waktu pembuatan: 24 Bulan Mei 2021 pada 04.45
  -- Versi server: 10.4.18-MariaDB
  -- Versi PHP: 7.4.16
  
  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: `sihadir`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `kelas`
  --
  
  CREATE TABLE `kelas` (
    `id` int(2) NOT NULL,
    `nama_kelas` varchar(10) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data untuk tabel `kelas`
  --
  
  INSERT INTO `kelas` (`id`, `nama_kelas`) VALUES
  (1, 'XII IPA 1'),
  (2, 'XII IPA 2'),
  (3, 'XII IPA 3'),
  (4, 'XII IPA 4'),
  (5, 'XII IPA 5'),
  (6, 'XII IPS 1'),
  (7, 'XII IPS 2'),
  (8, 'XII IPS 3');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `siswa`
  --
  
  CREATE TABLE `siswa` (
    `nis` int(5) NOT NULL,
    `nama` varchar(50) NOT NULL,
    `kelas_id` int(2) DEFAULT NULL,
    `status_id` int(2) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data untuk tabel `siswa`
  --
  
  INSERT INTO `siswa` (`nis`, `nama`, `kelas_id`, `status_id`) VALUES
  (5655, 'joik', 5, 1),
  (7224, 'ricardo', NULL, NULL),
  (7256, 'nouval aulia', NULL, NULL),
  (7522, 'bambang', 2, 0);
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `status`
  --
  
  CREATE TABLE `status` (
    `id` int(2) NOT NULL,
    `keterangan` varchar(20) NOT NULL,
    `time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data untuk tabel `status`
  --
  
  INSERT INTO `status` (`id`, `keterangan`, `time`) VALUES
  (0, 'Tidak Hadir', '2021-05-24 02:43:22'),
  (1, 'Hadir', '2021-05-24 02:43:22');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indeks untuk tabel `kelas`
  --
  ALTER TABLE `kelas`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indeks untuk tabel `siswa`
  --
  ALTER TABLE `siswa`
    ADD PRIMARY KEY (`nis`);
  
  --
  -- Indeks untuk tabel `status`
  --
  ALTER TABLE `status`
    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 */;
  