text: -- phpMyAdmin SQL Dump
  -- version 4.5.1
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: Apr 18, 2018 at 09:56 AM
  -- Server version: 10.1.19-MariaDB
  -- PHP Version: 7.0.13
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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: `travel`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `customer`
  --
  
  CREATE TABLE `customer` (
    `id` int(11) NOT NULL,
    `Name` varchar(25) NOT NULL,
    `Address` varchar(50) NOT NULL,
    `Phone` int(25) NOT NULL,
    `Gender` varchar(15) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `reservation`
  --
  
  CREATE TABLE `reservation` (
    `id` int(11) NOT NULL,
    `reservation_code` int(30) NOT NULL,
    `reservation_at` varchar(30) NOT NULL,
    `reservation_date` int(30) NOT NULL,
    `customerid` int(11) NOT NULL,
    `seat_code` int(25) NOT NULL,
    `ruteid` int(11) NOT NULL,
    `depart_at` int(11) NOT NULL,
    `price` int(11) NOT NULL,
    `userid` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `rute`
  --
  
  CREATE TABLE `rute` (
    `id` int(11) NOT NULL,
    `depart_at` varchar(50) NOT NULL,
    `rute_form` varchar(50) NOT NULL,
    `rute_no` int(50) NOT NULL,
    `price` int(50) NOT NULL,
    `transportationid` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `transportation`
  --
  
  CREATE TABLE `transportation` (
    `id` int(11) NOT NULL,
    `code` int(20) NOT NULL,
    `description` varchar(100) NOT NULL,
    `seat_qty` varchar(50) NOT NULL,
    `transportation_typeid` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `transportation_type`
  --
  
  CREATE TABLE `transportation_type` (
    `id` int(11) NOT NULL,
    `description` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id` int(11) NOT NULL,
    `Username` varchar(50) NOT NULL,
    `Password` varchar(25) NOT NULL,
    `Fullname` varchar(50) NOT NULL,
    `Level` int(2) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `customer`
  --
  ALTER TABLE `customer`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `reservation`
  --
  ALTER TABLE `reservation`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `customerid` (`customerid`),
    ADD UNIQUE KEY `ruteid` (`ruteid`);
  
  --
  -- Indexes for table `rute`
  --
  ALTER TABLE `rute`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `transportationid` (`transportationid`);
  
  --
  -- Indexes for table `transportation`
  --
  ALTER TABLE `transportation`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `transportation_typeid` (`transportation_typeid`);
  
  --
  -- Indexes for table `transportation_type`
  --
  ALTER TABLE `transportation_type`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `reservation`
  --
  ALTER TABLE `reservation`
    ADD CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`id`) REFERENCES `user` (`id`);
  
  /*!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 */;
  