text: -- phpMyAdmin SQL Dump
  -- version 4.6.5.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Mar 08, 2019 at 06:12 PM
  -- Server version: 10.1.21-MariaDB
  -- PHP Version: 5.6.30
  
  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: `questionare`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_answer`
  --
  
  CREATE TABLE `tb_answer` (
    `answerID` int(11) NOT NULL,
    `responseID` int(11) NOT NULL,
    `formCode` int(11) NOT NULL,
    `questionID` int(11) NOT NULL,
    `question_detailID` int(11) NOT NULL,
    `value` text NOT NULL,
    `createdDate` datetime NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_form`
  --
  
  CREATE TABLE `tb_form` (
    `formID` int(11) NOT NULL,
    `formCode` varchar(15) NOT NULL,
    `link` text NOT NULL,
    `title` text NOT NULL,
    `description` text NOT NULL,
    `isActive` tinyint(1) NOT NULL,
    `createdDate` datetime NOT NULL,
    `createdBy` varchar(15) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_question`
  --
  
  CREATE TABLE `tb_question` (
    `questionID` int(11) NOT NULL,
    `formCode` varchar(15) NOT NULL,
    `sectionID` int(11) NOT NULL,
    `questionType` varchar(15) NOT NULL,
    `question` text NOT NULL,
    `userfile` text NOT NULL,
    `isRequired` int(1) NOT NULL,
    `isOthers` int(1) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_question_detail`
  --
  
  CREATE TABLE `tb_question_detail` (
    `id` int(11) NOT NULL,
    `questionID` int(11) NOT NULL,
    `value` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_response`
  --
  
  CREATE TABLE `tb_response` (
    `responseID` int(11) NOT NULL,
    `formCode` varchar(15) NOT NULL,
    `createdDate` datetime NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_section`
  --
  
  CREATE TABLE `tb_section` (
    `sectionID` int(11) NOT NULL,
    `formCode` varchar(15) NOT NULL,
    `title` text NOT NULL,
    `description` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tb_user`
  --
  
  CREATE TABLE `tb_user` (
    `userID` int(11) NOT NULL,
    `username` varchar(50) NOT NULL,
    `password` text NOT NULL,
    `role` int(11) NOT NULL,
    `createdDate` datetime NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tb_user`
  --
  
  INSERT INTO `tb_user` (`userID`, `username`, `password`, `role`, `createdDate`) VALUES
  (1, 'user', 'user123', 2, '2019-03-09 00:00:00');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `tb_answer`
  --
  ALTER TABLE `tb_answer`
    ADD PRIMARY KEY (`answerID`);
  
  --
  -- Indexes for table `tb_form`
  --
  ALTER TABLE `tb_form`
    ADD PRIMARY KEY (`formID`);
  
  --
  -- Indexes for table `tb_question`
  --
  ALTER TABLE `tb_question`
    ADD PRIMARY KEY (`questionID`);
  
  --
  -- Indexes for table `tb_question_detail`
  --
  ALTER TABLE `tb_question_detail`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `tb_response`
  --
  ALTER TABLE `tb_response`
    ADD PRIMARY KEY (`responseID`);
  
  --
  -- Indexes for table `tb_section`
  --
  ALTER TABLE `tb_section`
    ADD PRIMARY KEY (`sectionID`);
  
  --
  -- Indexes for table `tb_user`
  --
  ALTER TABLE `tb_user`
    ADD PRIMARY KEY (`userID`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `tb_answer`
  --
  ALTER TABLE `tb_answer`
    MODIFY `answerID` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `tb_form`
  --
  ALTER TABLE `tb_form`
    MODIFY `formID` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `tb_question`
  --
  ALTER TABLE `tb_question`
    MODIFY `questionID` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `tb_question_detail`
  --
  ALTER TABLE `tb_question_detail`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `tb_response`
  --
  ALTER TABLE `tb_response`
    MODIFY `responseID` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `tb_section`
  --
  ALTER TABLE `tb_section`
    MODIFY `sectionID` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `tb_user`
  --
  ALTER TABLE `tb_user`
    MODIFY `userID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  /*!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 */;
  