-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2024 at 10:19 PM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 7.4.29

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

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

--
-- Table structure for table `akun`
--

CREATE TABLE `akun` (
  `id_admin` int(11) NOT NULL,
  `email` varchar(50) NOT NULL,
  `password` text NOT NULL,
  `role` int(1) NOT NULL,
  `foto` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `akun`
--

INSERT INTO `akun` (`id_admin`, `email`, `password`, `role`, `foto`) VALUES
(1, 'admin@gmail.com', '202cb962ac59075b964b07152d234b70', 1, 'foto/default.jpg');

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

--
-- Table structure for table `alternatif`
--

CREATE TABLE `alternatif` (
  `id_alternatif` int(11) NOT NULL,
  `kode_alternatif` varchar(30) NOT NULL,
  `nama_alternatif` varchar(30) NOT NULL,
  `keterangan` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `alternatif`
--

INSERT INTO `alternatif` (`id_alternatif`, `kode_alternatif`, `nama_alternatif`, `keterangan`) VALUES
(1, 'provider/307642280497.jpg', 'Makanan 1', 'PT Telekomunikasi Selular, trading as Telkomsel, is an Indonesian wireless network provider founded in 1995 and is a subsidiary of Telkom Indonesia. It is headquartered in South Jakarta. Telkomsel is the largest wireless carrier in the country with 163 million customer base as of 2018.'),
(2, 'provider/277090842214.jpg', 'Makanan 2', '3 or Three is a global brand name under which several UMTS-based mobile phone networks and broadband internet providers operate in Hong Kong, Macau'),
(3, 'provider/323796577796.jpg', 'Makanan 3', 'PT XL Axiata Tbk, is an Indonesia-based mobile telecommunications services operator headquartered at Jakarta. It is the second largest mobile telecommunications company in Indonesia. The operator\'s coverage includes Java, Bali, and Lombok as well as the principal cities in and around Sumatra, Kalimantan and Sulawesi.'),
(4, 'provider/166089569272.jpg', 'Makanan 4', 'PT Indosat Tbk, is a telecommunications provider in Indonesia. The company offers wireless services for mobile phones, and to a lesser extent, broadband internet lines for homes. Indosat operates their wireless services under a few sub-brands, among them are IM3, Mentari, and Matrix.'),
(5, 'provider/736244976311.jpg', 'Makanan 5', 'PT Smartfren Telecom Tbk, commonly known as Smartfren, is an Indonesia-based wireless network operator headquartered in Central Jakarta. It is owned by Indonesian conglomerate Sinar Mas under the company PT Sinar Mas Komunikasi Teknologi.'),
(6, 'a', 'Makanan 6', 'a');

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

--
-- Table structure for table `balita`
--

CREATE TABLE `balita` (
  `id_balita` int(11) NOT NULL,
  `nama_balita` varchar(35) NOT NULL,
  `jk` varchar(20) NOT NULL,
  `umur` varchar(20) NOT NULL,
  `nama_ortu` varchar(35) NOT NULL,
  `berat_badan` varchar(20) NOT NULL,
  `tinggi_badan` varchar(20) NOT NULL,
  `status_gizi` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `balita`
--

INSERT INTO `balita` (`id_balita`, `nama_balita`, `jk`, `umur`, `nama_ortu`, `berat_badan`, `tinggi_badan`, `status_gizi`) VALUES
(1, 'Balita 1', 'Laki-laki', '48', 'Ortu 1', '9,5', '87', '');

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

--
-- Table structure for table `bobot_preferensi`
--

CREATE TABLE `bobot_preferensi` (
  `id_bobot` int(11) NOT NULL,
  `keterangan` text NOT NULL,
  `nilai` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bobot_preferensi`
--

INSERT INTO `bobot_preferensi` (`id_bobot`, `keterangan`, `nilai`) VALUES
(1, 'Sangat Kurang', 1),
(2, 'Kurang', 2),
(3, 'Cukup', 3),
(4, 'Baik', 4),
(5, 'Sangat Baik', 5);

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

--
-- Table structure for table `detail_perhitungan_saw`
--

CREATE TABLE `detail_perhitungan_saw` (
  `id` int(11) NOT NULL,
  `id_perhitungan` int(11) NOT NULL,
  `id_alternatif` int(11) NOT NULL,
  `id_kriteria` int(11) NOT NULL,
  `id_bobot` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `detail_perhitungan_saw`
--

INSERT INTO `detail_perhitungan_saw` (`id`, `id_perhitungan`, `id_alternatif`, `id_kriteria`, `id_bobot`) VALUES
(1, 1, 1, 1, 3),
(2, 1, 1, 2, 4),
(3, 1, 1, 3, 2),
(4, 1, 1, 4, 2),
(5, 1, 1, 5, 1),
(6, 1, 2, 1, 4),
(7, 1, 2, 2, 5),
(8, 1, 2, 3, 3),
(9, 1, 2, 4, 3),
(10, 1, 2, 5, 2),
(11, 1, 3, 1, 2),
(12, 1, 3, 2, 3),
(13, 1, 3, 3, 1),
(14, 1, 3, 4, 1),
(15, 1, 3, 5, 1),
(16, 1, 4, 1, 5),
(17, 1, 4, 2, 5),
(18, 1, 4, 3, 4),
(19, 1, 4, 4, 4),
(20, 1, 4, 5, 3),
(21, 1, 5, 1, 1),
(22, 1, 5, 2, 2),
(23, 1, 5, 3, 1),
(24, 1, 5, 4, 1),
(25, 1, 5, 5, 1),
(26, 1, 6, 1, 5),
(27, 1, 6, 2, 5),
(28, 1, 6, 3, 5),
(29, 1, 6, 4, 5),
(30, 1, 6, 5, 4);

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

--
-- Table structure for table `kriteria`
--

CREATE TABLE `kriteria` (
  `id_kriteria` int(11) NOT NULL,
  `kode_kriteria` varchar(30) NOT NULL,
  `nama_kriteria` text NOT NULL,
  `bobot_vektor` decimal(5,2) NOT NULL,
  `tipe` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `kriteria`
--

INSERT INTO `kriteria` (`id_kriteria`, `kode_kriteria`, `nama_kriteria`, `bobot_vektor`, `tipe`) VALUES
(1, 'C1', 'Protein', '0.25', 'Benefit'),
(2, 'C2', 'Karbohidrat', '0.20', 'Benefit'),
(3, 'C3', 'Lemak', '0.10', 'Cost'),
(4, 'C4', 'Vitamin', '0.15', 'Benefit'),
(5, 'C5', 'Serat', '0.30', 'Benefit');

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

--
-- Table structure for table `perhitungan_saw`
--

CREATE TABLE `perhitungan_saw` (
  `id_perhitungan` int(11) NOT NULL,
  `id_balita` int(11) NOT NULL,
  `periode` varchar(30) NOT NULL,
  `hasil` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `perhitungan_saw`
--

INSERT INTO `perhitungan_saw` (`id_perhitungan`, `id_balita`, `periode`, `hasil`) VALUES
(1, 1, '2024', 'Makanan 6');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `akun`
--
ALTER TABLE `akun`
  ADD PRIMARY KEY (`id_admin`);

--
-- Indexes for table `alternatif`
--
ALTER TABLE `alternatif`
  ADD PRIMARY KEY (`id_alternatif`);

--
-- Indexes for table `balita`
--
ALTER TABLE `balita`
  ADD PRIMARY KEY (`id_balita`);

--
-- Indexes for table `bobot_preferensi`
--
ALTER TABLE `bobot_preferensi`
  ADD PRIMARY KEY (`id_bobot`);

--
-- Indexes for table `detail_perhitungan_saw`
--
ALTER TABLE `detail_perhitungan_saw`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_paket` (`id_alternatif`),
  ADD KEY `id_kriteria` (`id_kriteria`),
  ADD KEY `id_bobot` (`id_bobot`),
  ADD KEY `id_perhitungan` (`id_perhitungan`);

--
-- Indexes for table `kriteria`
--
ALTER TABLE `kriteria`
  ADD PRIMARY KEY (`id_kriteria`);

--
-- Indexes for table `perhitungan_saw`
--
ALTER TABLE `perhitungan_saw`
  ADD PRIMARY KEY (`id_perhitungan`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- AUTO_INCREMENT for table `bobot_preferensi`
--
ALTER TABLE `bobot_preferensi`
  MODIFY `id_bobot` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

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

--
-- AUTO_INCREMENT for table `kriteria`
--
ALTER TABLE `kriteria`
  MODIFY `id_kriteria` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `perhitungan_saw`
--
ALTER TABLE `perhitungan_saw`
  MODIFY `id_perhitungan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 */;
