-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 13, 2025 at 01:02 PM
-- Server version: 10.11.14-MariaDB-log
-- PHP Version: 8.4.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: `pustemxy_hem_dashboard`
--

-- --------------------------------------------------------

--
-- Table structure for table `announcements`
--

CREATE TABLE `announcements` (
  `id` int(11) NOT NULL,
  `tajuk` varchar(200) DEFAULT NULL,
  `butiran` text DEFAULT NULL,
  `tarikh` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `announcements`
--

INSERT INTO `announcements` (`id`, `tajuk`, `butiran`, `tarikh`) VALUES
(1, 'Taklimat Disiplin', 'Semua murid wajib hadir di Dewan', '2025-09-15'),
(2, 'Pemeriksaan Kesihatan', 'Unit Kesihatan akan jalankan saringan BMI', '2025-09-18');

-- --------------------------------------------------------

--
-- Table structure for table `attendance`
--

CREATE TABLE `attendance` (
  `id` int(11) NOT NULL,
  `tarikh` date NOT NULL,
  `hadir` int(11) DEFAULT NULL,
  `tidak_hadir` int(11) DEFAULT NULL,
  `lewat` int(11) DEFAULT NULL,
  `peratus` decimal(5,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `attendance`
--

INSERT INTO `attendance` (`id`, `tarikh`, `hadir`, `tidak_hadir`, `lewat`, `peratus`) VALUES
(1, '2025-09-19', 850, 50, 20, 92.50),
(2, '2025-09-20', 870, 40, 15, 94.00),
(3, '2025-09-21', 860, 55, 18, 92.00),
(4, '2025-09-25', 900, 12, 23, 90.00);

-- --------------------------------------------------------

--
-- Table structure for table `demography`
--

CREATE TABLE `demography` (
  `id` int(11) NOT NULL,
  `lelaki` int(11) DEFAULT NULL,
  `perempuan` int(11) DEFAULT NULL,
  `jumlah` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `demography`
--

INSERT INTO `demography` (`id`, `lelaki`, `perempuan`, `jumlah`) VALUES
(1, 420, 430, 850);

-- --------------------------------------------------------

--
-- Table structure for table `discipline`
--

CREATE TABLE `discipline` (
  `id` int(11) NOT NULL,
  `bulan` varchar(20) NOT NULL,
  `kes` int(11) DEFAULT NULL,
  `perubahan` int(11) DEFAULT NULL,
  `top1` varchar(100) DEFAULT NULL,
  `top2` varchar(100) DEFAULT NULL,
  `top3` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `discipline`
--

INSERT INTO `discipline` (`id`, `bulan`, `kes`, `perubahan`, `top1`, `top2`, `top3`) VALUES
(1, 'Julai 2025', 12, -3, 'Lewat', 'Tidak hadir', 'Ponteng kelas'),
(2, 'Ogos 2025', 15, 3, 'Lewat', 'Ponteng', 'Merokok');

-- --------------------------------------------------------

--
-- Table structure for table `guru`
--

CREATE TABLE `guru` (
  `id` int(11) NOT NULL,
  `nama` varchar(150) NOT NULL,
  `jawatan` varchar(100) DEFAULT NULL,
  `no_tel` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `guru`
--

INSERT INTO `guru` (`id`, `nama`, `jawatan`, `no_tel`) VALUES
(1, 'Ahmad bin Ali', 'Guru Matematik', '0123456789'),
(2, 'Fatimah binti Hassan', 'Guru Sains', '0139876543'),
(3, 'John Doe', 'Guru Bahasa Inggeris', '0111122233'),
(4, 'dua', 'guru biasa saja', '123456');

-- --------------------------------------------------------

--
-- Table structure for table `guru_announcements`
--

CREATE TABLE `guru_announcements` (
  `id` int(11) NOT NULL,
  `tajuk` varchar(200) DEFAULT NULL,
  `tarikh` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `guru_announcements`
--

INSERT INTO `guru_announcements` (`id`, `tajuk`, `tarikh`) VALUES
(1, 'Taklimat Guru Disiplin', '2025-09-30');

-- --------------------------------------------------------

--
-- Table structure for table `guru_cuti`
--

CREATE TABLE `guru_cuti` (
  `id` int(11) NOT NULL,
  `guru_id` int(11) NOT NULL,
  `tarikh_mula` date NOT NULL,
  `tarikh_akhir` date NOT NULL,
  `sebab` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `guru_cuti`
--

INSERT INTO `guru_cuti` (`id`, `guru_id`, `tarikh_mula`, `tarikh_akhir`, `sebab`) VALUES
(1, 4, '2025-09-27', '2025-09-29', 'crk-hantar anak masuk universiti'),
(2, 4, '2025-09-27', '2025-09-27', 'demam');

-- --------------------------------------------------------

--
-- Table structure for table `guru_keberadaan`
--

CREATE TABLE `guru_keberadaan` (
  `id` int(11) NOT NULL,
  `guru_id` int(11) NOT NULL,
  `status` varchar(100) DEFAULT NULL,
  `sebab` varchar(255) DEFAULT NULL,
  `tempoh` varchar(100) DEFAULT NULL,
  `tarikh` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `guru_keberadaan`
--

INSERT INTO `guru_keberadaan` (`id`, `guru_id`, `status`, `sebab`, `tempoh`, `tarikh`) VALUES
(2, 1, 'Luar Sekolah', 'Bersukan sana sini', '5 hari', '2025-09-25 05:06:48'),
(4, 4, 'smk segaliud', 'mengawas peperiksaan stpm', '1 minggu', '2025-09-26 22:35:13'),
(5, 4, 'kantin', 'makan terus lapar', '1 hari', '2025-10-08 01:02:47'),
(6, 4, 'kantin', 'makan terus lapar', '1 hari', '2025-10-08 01:04:29'),
(7, 4, 'kantin', 'makan terus lapar', '1 hari', '2025-10-08 01:07:19'),
(8, 4, 'kantin', 'makan terus lapar', '1 hari', '2025-10-08 01:08:31'),
(9, 4, 'kantin', 'makan terus lapar', '1 hari', '2025-10-08 01:10:13'),
(10, 4, 'kantin', 'makan terus lapar', '1 hari', '2025-10-08 01:14:19'),
(11, 4, 'RANAU', 'CUTI SUKA SUKA', '1 minggu', '2025-10-08 01:18:18'),
(12, 4, 'KANTIN', 'LAPAR', '5 hari', '2025-10-08 01:23:31');

-- --------------------------------------------------------

--
-- Table structure for table `guru_kelas`
--

CREATE TABLE `guru_kelas` (
  `id` int(11) NOT NULL,
  `kelas` varchar(20) DEFAULT NULL,
  `guru` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `guru_luar`
--

CREATE TABLE `guru_luar` (
  `id` int(11) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `sebab` varchar(200) DEFAULT NULL,
  `tarikh` date DEFAULT NULL,
  `tempoh` varchar(50) DEFAULT NULL,
  `status` varchar(20) DEFAULT 'aktif'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `guru_luar`
--

INSERT INTO `guru_luar` (`id`, `nama`, `sebab`, `tarikh`, `tempoh`, `status`) VALUES
(1, 'Cikgu Rahman', 'Mesyuarat PPD', '2025-09-25', '1 Hari', 'aktif');

-- --------------------------------------------------------

--
-- Table structure for table `guru_opsyen`
--

CREATE TABLE `guru_opsyen` (
  `id` int(11) NOT NULL,
  `opsyen` varchar(100) NOT NULL,
  `bilangan` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `guru_opsyen`
--

INSERT INTO `guru_opsyen` (`id`, `opsyen`, `bilangan`) VALUES
(1, 'Matematik', 12),
(2, 'Sains', 10),
(3, 'Bahasa Melayu', 8),
(4, 'Bahasa Inggeris', 9);

-- --------------------------------------------------------

--
-- Table structure for table `guru_tugas`
--

CREATE TABLE `guru_tugas` (
  `id` int(11) NOT NULL,
  `guru_id` int(11) NOT NULL,
  `jenis` varchar(50) DEFAULT NULL,
  `keterangan` varchar(255) DEFAULT NULL,
  `minggu` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `guru_tugas`
--

INSERT INTO `guru_tugas` (`id`, `guru_id`, `jenis`, `keterangan`, `minggu`) VALUES
(1, 3, 'Khas', 'Pengadil Kejohanan', '2 Minggu'),
(2, 4, 'sukan', 'tugas rasmi', '2 Minggu'),
(3, 3, 'smk batu kerbau', 'lawatan pusat peperiksaan', '2 Minggu'),
(4, 4, 'TAWAU', 'SAGA', '1 Minggu');

-- --------------------------------------------------------

--
-- Table structure for table `guru_tugas_khas`
--

CREATE TABLE `guru_tugas_khas` (
  `id` int(11) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `tugas` varchar(200) DEFAULT NULL,
  `tarikh` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `guru_tugas_khas`
--

INSERT INTO `guru_tugas_khas` (`id`, `nama`, `tugas`, `tarikh`) VALUES
(1, 'Cikgu Farid', 'Ketua Majlis Perpisahan', '2025-10-01');

-- --------------------------------------------------------

--
-- Table structure for table `guru_tugas_mingguan`
--

CREATE TABLE `guru_tugas_mingguan` (
  `id` int(11) NOT NULL,
  `minggu` varchar(20) DEFAULT NULL,
  `guru` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `guru_tugas_mingguan`
--

INSERT INTO `guru_tugas_mingguan` (`id`, `minggu`, `guru`) VALUES
(1, 'Minggu 38', 'Cikgu Rahman, Cikgu Aisyah');

-- --------------------------------------------------------

--
-- Table structure for table `health`
--

CREATE TABLE `health` (
  `id` int(11) NOT NULL,
  `hari` varchar(20) DEFAULT NULL,
  `sakit` int(11) DEFAULT NULL,
  `kemalangan` int(11) DEFAULT NULL,
  `ponteng` int(11) DEFAULT NULL,
  `keluar_tanpa_izin` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `health`
--

INSERT INTO `health` (`id`, `hari`, `sakit`, `kemalangan`, `ponteng`, `keluar_tanpa_izin`) VALUES
(1, 'Isnin', 2, 1, 3, 0),
(2, 'Selasa', 1, 0, 2, 1),
(3, 'Rabu', 3, 0, 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `jadual_kokum`
--

CREATE TABLE `jadual_kokum` (
  `id` int(11) NOT NULL,
  `tarikh` date DEFAULT NULL,
  `aktiviti` varchar(150) DEFAULT NULL,
  `tempat` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `jadual_kokum`
--

INSERT INTO `jadual_kokum` (`id`, `tarikh`, `aktiviti`, `tempat`) VALUES
(1, '2025-09-28', 'Latihan Bola Sepak', 'Padang Sekolah'),
(2, '2025-10-02', 'Mesyuarat Kelab Bahasa', 'Bilik Mesyuarat'),
(3, '2025-10-05', 'Perkhemahan Pengakap', 'Hutan Lipur Sandakan');

-- --------------------------------------------------------

--
-- Table structure for table `jadual_waktu`
--

CREATE TABLE `jadual_waktu` (
  `id` int(11) NOT NULL,
  `hari` varchar(20) NOT NULL,
  `masa` varchar(50) NOT NULL,
  `kelas` varchar(50) NOT NULL,
  `subjek` varchar(100) NOT NULL,
  `guru` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `jadual_waktu`
--

INSERT INTO `jadual_waktu` (`id`, `hari`, `masa`, `kelas`, `subjek`, `guru`) VALUES
(1, 'Isnin', '7:30 - 8:30', '6 Atas Sains', 'Matematik', 'Cikgu Rahman'),
(2, 'Isnin', '8:30 - 9:30', '6 Atas Sastera', 'Pengajian Am', 'Cikgu Noraini'),
(3, 'Selasa', '9:30 - 10:30', '6 Rendah Sains', 'Kimia', 'Cikgu Farid');

-- --------------------------------------------------------

--
-- Table structure for table `kelas_kurang_ceria_mingguan`
--

CREATE TABLE `kelas_kurang_ceria_mingguan` (
  `id` int(11) NOT NULL,
  `minggu` varchar(20) DEFAULT NULL,
  `kelas` varchar(20) DEFAULT NULL,
  `catatan` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kelas_terbersih_bulanan`
--

CREATE TABLE `kelas_terbersih_bulanan` (
  `id` int(11) NOT NULL,
  `bulan` varchar(20) DEFAULT NULL,
  `kelas` varchar(20) DEFAULT NULL,
  `catatan` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kelas_terbersih_mingguan`
--

CREATE TABLE `kelas_terbersih_mingguan` (
  `id` int(11) NOT NULL,
  `minggu` varchar(20) DEFAULT NULL,
  `kelas` varchar(20) DEFAULT NULL,
  `catatan` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ketua_kelas`
--

CREATE TABLE `ketua_kelas` (
  `id` int(11) NOT NULL,
  `kelas` varchar(20) DEFAULT NULL,
  `ketua` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kokum_announcements`
--

CREATE TABLE `kokum_announcements` (
  `id` int(11) NOT NULL,
  `tajuk` varchar(200) DEFAULT NULL,
  `tarikh` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `kokum_announcements`
--

INSERT INTO `kokum_announcements` (`id`, `tajuk`, `tarikh`) VALUES
(1, 'Hari Kokurikulum Sekolah', '2025-08-20'),
(2, 'Pertandingan Kawad Kaki', '2025-09-10'),
(3, 'Kompleks Sukan Sandakan KASTEM 2025', '2025-09-30');

-- --------------------------------------------------------

--
-- Table structure for table `kpi_kokum`
--

CREATE TABLE `kpi_kokum` (
  `id` int(11) NOT NULL,
  `tahun` int(11) DEFAULT NULL,
  `sasaran` decimal(5,2) DEFAULT NULL,
  `pencapaian` decimal(5,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `kpi_kokum`
--

INSERT INTO `kpi_kokum` (`id`, `tahun`, `sasaran`, `pencapaian`) VALUES
(1, 2024, 85.00, 88.00),
(2, 2023, 80.00, 78.00);

-- --------------------------------------------------------

--
-- Table structure for table `kpi_kurikulum`
--

CREATE TABLE `kpi_kurikulum` (
  `id` int(11) NOT NULL,
  `tahun` int(11) NOT NULL,
  `sasaran` decimal(5,2) NOT NULL,
  `pencapaian` decimal(5,2) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `kpi_kurikulum`
--

INSERT INTO `kpi_kurikulum` (`id`, `tahun`, `sasaran`, `pencapaian`) VALUES
(1, 2024, 90.00, 92.50),
(2, 2023, 88.00, 85.00),
(3, 2022, 85.00, 87.00);

-- --------------------------------------------------------

--
-- Table structure for table `kurikulum_announcements`
--

CREATE TABLE `kurikulum_announcements` (
  `id` int(11) NOT NULL,
  `tajuk` varchar(200) NOT NULL,
  `tarikh` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `kurikulum_announcements`
--

INSERT INTO `kurikulum_announcements` (`id`, `tajuk`, `tarikh`) VALUES
(1, 'Mesyuarat Kurikulum Bil. 2/2024', '2024-07-12'),
(2, 'Peperiksaan Percubaan STPM', '2024-09-01'),
(3, 'Hari Penetapan Target SPM', '2023-02-15');

-- --------------------------------------------------------

--
-- Table structure for table `pelajar`
--

CREATE TABLE `pelajar` (
  `id` int(11) NOT NULL,
  `nama` varchar(100) NOT NULL,
  `tingkatan` enum('T1','T2','T3','T4','T5','T6') NOT NULL,
  `kelas` varchar(50) DEFAULT NULL,
  `gpa` decimal(4,2) DEFAULT 0.00,
  `markah_koku` int(11) DEFAULT 0,
  `jenis_sukan` varchar(100) DEFAULT NULL,
  `pencapaian` varchar(100) DEFAULT NULL,
  `peringkat` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `pelajar`
--

INSERT INTO `pelajar` (`id`, `nama`, `tingkatan`, `kelas`, `gpa`, `markah_koku`, `jenis_sukan`, `pencapaian`, `peringkat`) VALUES
(1, 'Ali Bin Ahmad', 'T1', '1A', 3.90, 85, NULL, NULL, NULL),
(2, 'Siti Nurhaliza', 'T1', '1B', 3.80, 90, NULL, NULL, NULL),
(3, 'John Tan', 'T2', '2A', 3.95, 88, NULL, NULL, NULL),
(4, 'Nurul Izzah', 'T2', '2C', 3.70, 92, NULL, NULL, NULL),
(5, 'Michael Lee', 'T3', '3A', 3.85, 95, NULL, NULL, NULL),
(6, 'Aisyah Binti Omar', 'T3', '3B', 3.92, 89, NULL, NULL, NULL),
(7, 'Ali Bin Ahmad', 'T1', '1A', 3.90, 85, 'Bola Sepak', 'Johan', 'Daerah'),
(8, 'Siti Nurhaliza', 'T1', '1B', 3.80, 90, 'Silat', 'Naib Johan', 'Negeri'),
(9, 'John Tan', 'T2', '2A', 3.95, 88, 'Badminton', 'Penyertaan', 'Kebangsaan'),
(10, 'Nurul Izzah', 'T2', '2C', 3.70, 92, 'Karate', 'Johan', 'Sekolah'),
(11, 'Michael Lee', 'T3', '3A', 3.85, 95, 'Catur', 'Tempat ke-3', 'Daerah'),
(12, 'satu', 'T6', '6ASS3 ', 5.00, 9, '0', 'ketiga', 'negeri');

-- --------------------------------------------------------

--
-- Table structure for table `pencapaian`
--

CREATE TABLE `pencapaian` (
  `id` int(11) NOT NULL,
  `tahun` int(11) NOT NULL,
  `peperiksaan` varchar(100) NOT NULL,
  `pencapaian` varchar(100) NOT NULL,
  `kedudukan` varchar(50) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `pencapaian`
--

INSERT INTO `pencapaian` (`id`, `tahun`, `peperiksaan`, `pencapaian`, `kedudukan`) VALUES
(1, 2024, 'STPM', '93% lulus penuh', 'Top 5 Sabah'),
(2, 2024, 'SPM', '85% lulus', 'Top 10 Sandakan'),
(3, 2023, 'STPM', '90% lulus penuh', 'Top 3 Sabah');

-- --------------------------------------------------------

--
-- Table structure for table `pencapaian_kokum`
--

CREATE TABLE `pencapaian_kokum` (
  `id` int(11) NOT NULL,
  `tahun` int(11) DEFAULT NULL,
  `acara` varchar(150) DEFAULT NULL,
  `pencapaian` varchar(150) DEFAULT NULL,
  `peringkat` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `pencapaian_kokum`
--

INSERT INTO `pencapaian_kokum` (`id`, `tahun`, `acara`, `pencapaian`, `peringkat`) VALUES
(1, 2024, 'Pertandingan Bola Sepak MSSS', 'Johan', 'Daerah'),
(2, 2024, 'Debat Piala Diraja', 'Naib Johan', 'Negeri'),
(3, 2023, 'Kejohanan Silat', 'Tempat ke-3', 'Kebangsaan');

-- --------------------------------------------------------

--
-- Table structure for table `penyertaan_kokum`
--

CREATE TABLE `penyertaan_kokum` (
  `id` int(11) NOT NULL,
  `kategori` varchar(50) DEFAULT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `bilangan` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `penyertaan_kokum`
--

INSERT INTO `penyertaan_kokum` (`id`, `kategori`, `nama`, `bilangan`) VALUES
(1, 'Unit Beruniform', 'Pengakap', 120),
(2, 'Unit Beruniform', 'Kadet Polis', 80),
(3, 'Kelab', 'Kelab Sains', 60),
(4, 'Kelab', 'Kelab Bahasa Inggeris', 55),
(5, 'Sukan', 'Bola Sepak', 100),
(6, 'Sukan', 'Badminton', 70),
(7, 'Kelab', 'Malaysiaku', 100);

-- --------------------------------------------------------

--
-- Table structure for table `peperiksaan`
--

CREATE TABLE `peperiksaan` (
  `id` int(11) NOT NULL,
  `tahun` int(11) NOT NULL,
  `penggal` varchar(20) NOT NULL,
  `gpmp` decimal(5,2) DEFAULT NULL,
  `peratus_lulus` decimal(5,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `peperiksaan`
--

INSERT INTO `peperiksaan` (`id`, `tahun`, `penggal`, `gpmp`, `peratus_lulus`) VALUES
(1, 2024, '1', 3.25, 87.50),
(2, 2024, '2', 2.95, 90.20),
(3, 2023, '1', 3.50, 85.00);

-- --------------------------------------------------------

--
-- Table structure for table `program_khas`
--

CREATE TABLE `program_khas` (
  `id` int(11) NOT NULL,
  `nama_program` varchar(150) NOT NULL,
  `tarikh` date NOT NULL,
  `keterangan` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `program_khas`
--

INSERT INTO `program_khas` (`id`, `nama_program`, `tarikh`, `keterangan`) VALUES
(1, 'Kelas Tambahan SPM', '2024-09-15', 'Kelas bimbingan percuma untuk calon SPM'),
(2, 'STEM Carnival', '2024-08-10', 'Pameran dan pertandingan inovasi STEM'),
(3, 'Kem Akademik', '2023-11-05', 'Motivasi dan teknik menjawab peperiksaan');

-- --------------------------------------------------------

--
-- Table structure for table `ticker`
--

CREATE TABLE `ticker` (
  `id` int(11) NOT NULL,
  `teks` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `ticker`
--

INSERT INTO `ticker` (`id`, `teks`, `is_active`) VALUES
(1, 'Selamat datang ke Dashboard HEM', 1),
(2, 'Mesyuarat PIBG minggu depan', 1);

-- --------------------------------------------------------

--
-- Table structure for table `welfare`
--

CREATE TABLE `welfare` (
  `id` int(11) NOT NULL,
  `rmt` int(11) DEFAULT NULL,
  `kwapm` int(11) DEFAULT NULL,
  `zakat` int(11) DEFAULT NULL,
  `bsh` int(11) DEFAULT NULL,
  `b40_peratus` decimal(5,2) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `welfare`
--

INSERT INTO `welfare` (`id`, `rmt`, `kwapm`, `zakat`, `bsh`, `b40_peratus`, `updated_at`) VALUES
(1, 120, 50, 30, 40, 45.00, '2025-09-25 03:28:10');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `announcements`
--
ALTER TABLE `announcements`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `demography`
--
ALTER TABLE `demography`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `discipline`
--
ALTER TABLE `discipline`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru`
--
ALTER TABLE `guru`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru_announcements`
--
ALTER TABLE `guru_announcements`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru_cuti`
--
ALTER TABLE `guru_cuti`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guru_id` (`guru_id`);

--
-- Indexes for table `guru_keberadaan`
--
ALTER TABLE `guru_keberadaan`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guru_id` (`guru_id`);

--
-- Indexes for table `guru_kelas`
--
ALTER TABLE `guru_kelas`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru_luar`
--
ALTER TABLE `guru_luar`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru_opsyen`
--
ALTER TABLE `guru_opsyen`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru_tugas`
--
ALTER TABLE `guru_tugas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guru_id` (`guru_id`);

--
-- Indexes for table `guru_tugas_khas`
--
ALTER TABLE `guru_tugas_khas`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guru_tugas_mingguan`
--
ALTER TABLE `guru_tugas_mingguan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `health`
--
ALTER TABLE `health`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jadual_kokum`
--
ALTER TABLE `jadual_kokum`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jadual_waktu`
--
ALTER TABLE `jadual_waktu`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kelas_kurang_ceria_mingguan`
--
ALTER TABLE `kelas_kurang_ceria_mingguan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kelas_terbersih_bulanan`
--
ALTER TABLE `kelas_terbersih_bulanan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kelas_terbersih_mingguan`
--
ALTER TABLE `kelas_terbersih_mingguan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ketua_kelas`
--
ALTER TABLE `ketua_kelas`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kokum_announcements`
--
ALTER TABLE `kokum_announcements`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kpi_kokum`
--
ALTER TABLE `kpi_kokum`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kpi_kurikulum`
--
ALTER TABLE `kpi_kurikulum`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kurikulum_announcements`
--
ALTER TABLE `kurikulum_announcements`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pelajar`
--
ALTER TABLE `pelajar`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pencapaian`
--
ALTER TABLE `pencapaian`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pencapaian_kokum`
--
ALTER TABLE `pencapaian_kokum`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `penyertaan_kokum`
--
ALTER TABLE `penyertaan_kokum`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `peperiksaan`
--
ALTER TABLE `peperiksaan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `program_khas`
--
ALTER TABLE `program_khas`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ticker`
--
ALTER TABLE `ticker`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `welfare`
--
ALTER TABLE `welfare`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `announcements`
--
ALTER TABLE `announcements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `attendance`
--
ALTER TABLE `attendance`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `demography`
--
ALTER TABLE `demography`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `discipline`
--
ALTER TABLE `discipline`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `guru`
--
ALTER TABLE `guru`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `guru_announcements`
--
ALTER TABLE `guru_announcements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `guru_cuti`
--
ALTER TABLE `guru_cuti`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `guru_keberadaan`
--
ALTER TABLE `guru_keberadaan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `guru_kelas`
--
ALTER TABLE `guru_kelas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `guru_luar`
--
ALTER TABLE `guru_luar`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `guru_opsyen`
--
ALTER TABLE `guru_opsyen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `guru_tugas`
--
ALTER TABLE `guru_tugas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `guru_tugas_khas`
--
ALTER TABLE `guru_tugas_khas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `guru_tugas_mingguan`
--
ALTER TABLE `guru_tugas_mingguan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `health`
--
ALTER TABLE `health`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `jadual_kokum`
--
ALTER TABLE `jadual_kokum`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `jadual_waktu`
--
ALTER TABLE `jadual_waktu`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `kelas_kurang_ceria_mingguan`
--
ALTER TABLE `kelas_kurang_ceria_mingguan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kelas_terbersih_bulanan`
--
ALTER TABLE `kelas_terbersih_bulanan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kelas_terbersih_mingguan`
--
ALTER TABLE `kelas_terbersih_mingguan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ketua_kelas`
--
ALTER TABLE `ketua_kelas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kokum_announcements`
--
ALTER TABLE `kokum_announcements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `kpi_kokum`
--
ALTER TABLE `kpi_kokum`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `kpi_kurikulum`
--
ALTER TABLE `kpi_kurikulum`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `kurikulum_announcements`
--
ALTER TABLE `kurikulum_announcements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pelajar`
--
ALTER TABLE `pelajar`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `pencapaian`
--
ALTER TABLE `pencapaian`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pencapaian_kokum`
--
ALTER TABLE `pencapaian_kokum`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `penyertaan_kokum`
--
ALTER TABLE `penyertaan_kokum`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `peperiksaan`
--
ALTER TABLE `peperiksaan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `program_khas`
--
ALTER TABLE `program_khas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `ticker`
--
ALTER TABLE `ticker`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `welfare`
--
ALTER TABLE `welfare`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `guru_cuti`
--
ALTER TABLE `guru_cuti`
  ADD CONSTRAINT `guru_cuti_ibfk_1` FOREIGN KEY (`guru_id`) REFERENCES `guru` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `guru_keberadaan`
--
ALTER TABLE `guru_keberadaan`
  ADD CONSTRAINT `guru_keberadaan_ibfk_1` FOREIGN KEY (`guru_id`) REFERENCES `guru` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `guru_tugas`
--
ALTER TABLE `guru_tugas`
  ADD CONSTRAINT `guru_tugas_ibfk_1` FOREIGN KEY (`guru_id`) REFERENCES `guru` (`id`) ON DELETE 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 */;
