text: -- phpMyAdmin SQL Dump
  -- version 4.7.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Mar 21, 2019 at 06:59 AM
  -- Server version: 10.1.28-MariaDB
  -- PHP Version: 7.1.11
  
  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: `taccess`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `brand`
  --
  
  CREATE TABLE `brand` (
    `id_brand` int(11) NOT NULL,
    `brand` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `brand`
  --
  
  INSERT INTO `brand` (`id_brand`, `brand`) VALUES
  (3, 'A12Q12'),
  (4, 'IWS'),
  (5, 'HK');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `category`
  --
  
  CREATE TABLE `category` (
    `id_category` int(11) NOT NULL,
    `category` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `category`
  --
  
  INSERT INTO `category` (`id_category`, `category`) VALUES
  (2, 'Watch'),
  (3, 'Holster'),
  (4, 'Rope'),
  (5, 'Knive'),
  (6, 'Optics');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `product`
  --
  
  CREATE TABLE `product` (
    `id_product` int(11) NOT NULL,
    `product` text NOT NULL,
    `id_category` int(50) NOT NULL,
    `id_brand` int(50) NOT NULL,
    `price` int(100) NOT NULL,
    `stock` int(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `product`
  --
  
  INSERT INTO `product` (`id_product`, `product`, `id_category`, `id_brand`, `price`, `stock`) VALUES
  (2, 'Pzh2000', 5, 4, 20001232, 123);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id_user` int(11) NOT NULL,
    `username` varchar(50) NOT NULL,
    `password` varchar(50) NOT NULL,
    `role` int(10) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id_user`, `username`, `password`, `role`) VALUES
  (1, 'ifan', 'ashari', 2),
  (2, 'rin', 'tohsaka', 2);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `brand`
  --
  ALTER TABLE `brand`
    ADD PRIMARY KEY (`id_brand`);
  
  --
  -- Indexes for table `category`
  --
  ALTER TABLE `category`
    ADD PRIMARY KEY (`id_category`);
  
  --
  -- Indexes for table `product`
  --
  ALTER TABLE `product`
    ADD PRIMARY KEY (`id_product`),
    ADD KEY `id_category` (`id_category`),
    ADD KEY `id_brand` (`id_brand`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id_user`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `brand`
  --
  ALTER TABLE `brand`
    MODIFY `id_brand` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `category`
  --
  ALTER TABLE `category`
    MODIFY `id_category` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `product`
  --
  ALTER TABLE `product`
    MODIFY `id_product` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `product`
  --
  ALTER TABLE `product`
    ADD CONSTRAINT `product_ibfk_1` FOREIGN KEY (`id_category`) REFERENCES `category` (`id_category`),
    ADD CONSTRAINT `product_ibfk_2` FOREIGN KEY (`id_brand`) REFERENCES `brand` (`id_brand`);
  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 */;
  