-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 01, 2026 at 03:04 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 5.6.40

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: `pengelolaan_tamu`
--

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

--
-- Table structure for table `buku_tamu`
--

CREATE TABLE `buku_tamu` (
  `id_buku_tamu` varchar(12) NOT NULL,
  `id_tamu` varchar(4) NOT NULL,
  `keperluan` text NOT NULL,
  `ruangan` varchar(20) NOT NULL,
  `jam_masuk` varchar(15) DEFAULT NULL,
  `jam_keluar` varchar(15) DEFAULT NULL,
  `tanggal` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `buku_tamu`
--

INSERT INTO `buku_tamu` (`id_buku_tamu`, `id_tamu`, `keperluan`, `ruangan`, `jam_masuk`, `jam_keluar`, `tanggal`) VALUES
('BUKUTAMU01', 'PE01', 'Bertemu dengan IT Manager', 'a', 'aaa', 'a', '2018-05-11'),
('BUKUTAMU02', 'PE02', 'Pengujian produk minuman', 'b', 'bbb', 'bb', '2018-05-11'),
('BUKUTAMU04', 'PE02', 'a', 'c', 'ccc', 'cc', '2018-01-01'),
('BUKUTAMU07', 'PE02', 'vsd', 'd', 'ddd', 'dd', '2018-04-01');

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

--
-- Table structure for table `petugas`
--

CREATE TABLE `petugas` (
  `username` varchar(50) NOT NULL,
  `nip` varchar(20) NOT NULL,
  `nama` varchar(50) NOT NULL,
  `alamat` varchar(50) NOT NULL,
  `jabatan` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `hak_akses` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `petugas`
--

INSERT INTO `petugas` (`username`, `nip`, `nama`, `alamat`, `jabatan`, `password`, `hak_akses`) VALUES
('admin', '11223320230708', 'Arlin Saputra', 'Lampung Timur', 'Petugas Keamanan', '21232f297a57a5a743894a0e4a801fc3', 'admin');

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

--
-- Table structure for table `tamu`
--

CREATE TABLE `tamu` (
  `id_tamu` varchar(4) NOT NULL,
  `noktp` varchar(20) NOT NULL,
  `nama` varchar(50) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `alamat` varchar(100) NOT NULL,
  `nama_instansi` varchar(50) NOT NULL,
  `telepon` varchar(13) NOT NULL,
  `email` varchar(75) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tamu`
--

INSERT INTO `tamu` (`id_tamu`, `noktp`, `nama`, `username`, `password`, `alamat`, `nama_instansi`, `telepon`, `email`) VALUES
('PE02', '1805082209910014', 'Rizky Adelard', 'rizky', '49d8712dd6ac9c3745d53cd4be48284c', 'Bandar Lampung', 'PT Marvelindo', '085378944489', 'rizky@gmail.com'),
('PE04', '23123213', 'renaldi', 'rena', 'a3b332d4506b767c216acba667d08434', 'balam', 'PUPR', '0721993399', 'wahyufitriansyah05@gmail.com'),
('PE03', 'asdds', 'asdasd', 'njaknjkn', 'bc3e25d206f6072249c74b59d2aa9b08', 'jnjknjknj', 'jnjknjknjn', '10301132', 'Rahayuwahyu77@gmail.com'),
('PE01', 'SELECT id_tamu,nama_', 'Heru Afandi', 'heru', 'd4b55f7dae75cf7ede103c0f15614257', 'Bandar Lampung', 'PT Indomarco', '081233945354', 'heruaffandi06@gmail.com');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `buku_tamu`
--
ALTER TABLE `buku_tamu`
  ADD PRIMARY KEY (`id_buku_tamu`),
  ADD KEY `FK_buku_tamu` (`id_tamu`);

--
-- Indexes for table `petugas`
--
ALTER TABLE `petugas`
  ADD PRIMARY KEY (`username`);

--
-- Indexes for table `tamu`
--
ALTER TABLE `tamu`
  ADD PRIMARY KEY (`noktp`);
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 */;
