-- Database: siswaku
-- Table: siswa

CREATE DATABASE IF NOT EXISTS siswaku;
USE siswaku;

-- Create siswa table
CREATE TABLE IF NOT EXISTS siswa (
    id INT AUTO_INCREMENT PRIMARY KEY,
    nis VARCHAR(20) UNIQUE NOT NULL,
    nama VARCHAR(100) NOT NULL,
    kelas VARCHAR(20) NOT NULL,
    no_hp VARCHAR(15) NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);



-- Insert sample data
INSERT INTO siswa (nis, nama, kelas, no_hp) VALUES
('2024001', 'Ahmad Rahman', 'X RPL', '081234567890'),
('2024002', 'Siti Nurhaliza', 'X RPL', '081234567891'),
('2024003', 'Budi Santoso', 'XI RPL', '081234567892'),
('2024004', 'Citra Dewi', 'XI RPL', '081234567893'),
('2024005', 'Dedi Kurniawan', 'XII RPL', '081234567894'),
('2024006', 'Eka Putri', 'XII RPL', '081234567895'),
('2024007', 'Fajar Hidayat', 'X RPL', '081234567896'),
('2024008', 'Gita Sari', 'XI RPL', '081234567897'),
('2024009', 'Hendra Gunawan', 'XII RPL', '081234567898'),
('2024010', 'Indah Permata', 'X RPL', '081234567899'),
('2024011', 'Joko Widodo', 'X TKJ', '081234567900'),
('2024012', 'Kartini Sari', 'X TKJ', '081234567901'),
('2024013', 'Lutfi Hakim', 'XI TKJ', '081234567902'),
('2024014', 'Maya Sari', 'XI TKJ', '081234567903'),
('2024015', 'Nanda Putra', 'XII TKJ', '081234567904');
