text: -- phpMyAdmin SQL Dump
  -- version 5.0.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: May 22, 2021 at 10:01 AM
  -- Server version: 10.4.14-MariaDB
  -- PHP Version: 7.2.33
  
  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: `yii2basic`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `barang`
  --
  
  CREATE TABLE `barang` (
    `id` int(11) NOT NULL,
    `kode_barang` varchar(10) NOT NULL,
    `nama_barang` varchar(20) NOT NULL,
    `satuan` varchar(20) NOT NULL,
    `id_jenis` int(11) NOT NULL,
    `id_supplier` int(11) NOT NULL,
    `harga` double NOT NULL,
    `stok` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `barang`
  --
  
  INSERT INTO `barang` (`id`, `kode_barang`, `nama_barang`, `satuan`, `id_jenis`, `id_supplier`, `harga`, `stok`) VALUES
  (2, '001', 'Peonia Totebag ', 'Pieces', 1, 1, 450000, 200),
  (3, '002', 'Stripes Impoert', 'Pieces', 1, 1, 400000, 234),
  (4, '003', 'Tory Burch', 'Pieces', 1, 1, 5000000, 190),
  (5, '004', 'Lafanya Hobo', 'Pieces', 1, 1, 450000, 340),
  (6, '005', 'Converse All Star 70', 'Pieces', 2, 2, 1500000, 456),
  (7, '006', 'Converse Classic', 'Pieces', 2, 2, 1200000, 456),
  (9, '009', 'Pashiman Plisket', 'Pieces', 3, 3, 45000, 786),
  (10, '010', 'Pashmina Ceruty Baby', 'Pieces', 3, 3, 50000, 543),
  (11, '011', 'Pashiman Tie dye', 'Pieces', 3, 3, 50000, 345);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `country`
  --
  
  CREATE TABLE `country` (
    `code` char(2) NOT NULL,
    `name` char(52) NOT NULL,
    `population` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `country`
  --
  
  INSERT INTO `country` (`code`, `name`, `population`) VALUES
  ('AU', 'Australia', 240016400),
  ('BR', 'Brazil', 205722000),
  ('CA', 'Canada', 35985751),
  ('CN', 'China', 1375210000),
  ('DE', 'Germany', 81459000),
  ('FR', 'France', 64513242),
  ('GB', 'United Kingdom', 65097000),
  ('IN', 'India', 1285400000),
  ('RU', 'Rusia', 146519759),
  ('US', 'United States', 322976000);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `jenis`
  --
  
  CREATE TABLE `jenis` (
    `id` int(11) NOT NULL,
    `nama_jenis` varchar(50) NOT NULL,
    `keterangan` varchar(50) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `jenis`
  --
  
  INSERT INTO `jenis` (`id`, `nama_jenis`, `keterangan`) VALUES
  (1, 'Tas', 'Totebag'),
  (2, 'Sepatu', 'Sport'),
  (3, 'Hijab', 'Pashmina'),
  (7, 'Make Up', 'Lipstik');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mahasiswa`
  --
  
  CREATE TABLE `mahasiswa` (
    `id` int(11) NOT NULL,
    `nim` varchar(18) NOT NULL,
    `nama` varchar(50) NOT NULL,
    `jekel` char(1) NOT NULL,
    `id_prodi` int(11) NOT NULL,
    `email` varchar(50) NOT NULL,
    `alamat` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `mahasiswa`
  --
  
  INSERT INTO `mahasiswa` (`id`, `nim`, `nama`, `jekel`, `id_prodi`, `email`, `alamat`) VALUES
  (1, '19110001', 'Suci Ramadhani', 'P', 3, 'suci@gmail.com', 'Belakang balok,Bukittinggi'),
  (2, '19110002', 'Siti Kunia Shandyka', 'P', 2, 'shandyka@gmail.com', 'Tangah sawah,Bukittinggi'),
  (3, '19110003', 'Abdul Mu\'arif', 'L', 1, 'abdul@gmail.com', 'Agam'),
  (4, '19110004', 'Rizki', 'L', 3, 'rizki@gmail.com', 'Payakumbuh\r\n'),
  (6, '19110006', 'Fauziah maharani', 'P', 3, 'ojikk@gmail.com', 'Padang'),
  (7, '19110007', 'Miza Yunita', 'P', 1, 'miza@gmail.com', 'Maninjau'),
  (8, '19110008', 'Dafa Agung Prasetya', 'L', 1, 'agung@gmail.com', 'Lampung'),
  (9, '19110009', 'Sovi Febriani', 'P', 2, 'sovi@gmail.com', 'Padang');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `prodi`
  --
  
  CREATE TABLE `prodi` (
    `id` int(11) NOT NULL,
    `prodi` varchar(50) NOT NULL,
    `keterangan` varchar(50) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `prodi`
  --
  
  INSERT INTO `prodi` (`id`, `prodi`, `keterangan`) VALUES
  (1, 'D3-Teknik Komputer', 'Masa Pendidikan 3 tahun'),
  (2, 'D3-Manajemen Informasi', 'Masa Pendidikan 3 tahun'),
  (3, 'D4-TRPL', 'Masa Pendidikan 4 tahun');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `supplier`
  --
  
  CREATE TABLE `supplier` (
    `id` int(11) NOT NULL,
    `nama_supplier` varchar(50) NOT NULL,
    `notelp` varchar(15) NOT NULL,
    `email` varchar(25) NOT NULL,
    `alamat` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `supplier`
  --
  
  INSERT INTO `supplier` (`id`, `nama_supplier`, `notelp`, `email`, `alamat`) VALUES
  (1, 'H&M', '075298123', 'H&M@gmail.com', 'Jakarta'),
  (2, 'Converse', '0872342123', 'Converse@gmailcom', 'Bandung'),
  (3, 'Actcala.id', '0872456732', 'atcalaofficial@gmail.com', 'Padang'),
  (4, 'HitsStoreBukittinggi', '08134567321', 'hitsStore@gmail.com', 'Bukittinggi');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `barang`
  --
  ALTER TABLE `barang`
    ADD PRIMARY KEY (`id`),
    ADD KEY `barang_jenis` (`id_jenis`),
    ADD KEY `barang_supplier` (`id_supplier`);
  
  --
  -- Indexes for table `country`
  --
  ALTER TABLE `country`
    ADD PRIMARY KEY (`code`);
  
  --
  -- Indexes for table `jenis`
  --
  ALTER TABLE `jenis`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `mahasiswa`
  --
  ALTER TABLE `mahasiswa`
    ADD PRIMARY KEY (`id`),
    ADD KEY `id_prodi` (`id_prodi`);
  
  --
  -- Indexes for table `prodi`
  --
  ALTER TABLE `prodi`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `supplier`
  --
  ALTER TABLE `supplier`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `barang`
  --
  ALTER TABLE `barang`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
  
  --
  -- AUTO_INCREMENT for table `jenis`
  --
  ALTER TABLE `jenis`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  
  --
  -- AUTO_INCREMENT for table `mahasiswa`
  --
  ALTER TABLE `mahasiswa`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  
  --
  -- AUTO_INCREMENT for table `prodi`
  --
  ALTER TABLE `prodi`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `supplier`
  --
  ALTER TABLE `supplier`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `barang`
  --
  ALTER TABLE `barang`
    ADD CONSTRAINT `barang_jenis` FOREIGN KEY (`id_jenis`) REFERENCES `jenis` (`id`),
    ADD CONSTRAINT `barang_supplier` FOREIGN KEY (`id_supplier`) REFERENCES `supplier` (`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 */;
  