--
-- Database: `survey`
--

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

--
-- Table structure for table `tanswer`
--

CREATE TABLE `tanswer` (
  `Id` int(11) NOT NULL,
  `descriptionId` int(11) NOT NULL,
  `groupId` int(11) NOT NULL,
  `companyId` varchar(50) NOT NULL,
  `jawaban` varchar(1) NOT NULL,
  `jawabanA` int(11) NOT NULL,
  `jawabanB` int(11) NOT NULL,
  `jawabanC` int(11) NOT NULL,
  `jawabanD` int(11) NOT NULL,
  `jawabanE` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tcompany`
--

CREATE TABLE `tcompany` (
  `companyId` varchar(50) NOT NULL,
  `companyName` varchar(30) NOT NULL,
  `companyAddress` text NOT NULL,
  `companyPhoneHp` varchar(30) NOT NULL,
  `dateSurvey` varchar(30) NOT NULL,
  `suggestion` text NOT NULL,
  `product` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tdescription`
--

CREATE TABLE `tdescription` (
  `descriptionId` int(11) NOT NULL,
  `description` text NOT NULL,
  `groupId` int(11) NOT NULL,
  `CreatedDate` datetime NOT NULL,
  `CreatedUser` int(11) NOT NULL,
  `ModifiedDate` datetime NOT NULL,
  `ModifiedUser` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tdescription`
--

INSERT INTO `tdescription` (`descriptionId`, `description`, `groupId`, `CreatedDate`, `CreatedUser`, `ModifiedDate`, `ModifiedUser`) VALUES
(45, 'Kepala sekolah memberitahukan program sekolah kepada orang tua/wali.														\r\n', 10, '2020-11-30 00:57:49', 1, '0000-00-00 00:00:00', 0),
(46, 'Kepala sekolah mengadakan pertemuan dengan   orang tua/wali														\r\n', 10, '2020-11-30 00:58:06', 1, '0000-00-00 00:00:00', 0),
(47, 'Kepala sekolah melibatkan orang tua/wali dalam kegiatan tertentu.														\r\n', 10, '2020-11-30 00:58:19', 1, '0000-00-00 00:00:00', 0),
(48, 'Kepala sekolah memberitahukan kejadian penting yang harus  diketahui orang tua/wali.														\r\n', 10, '2020-11-30 00:58:45', 1, '0000-00-00 00:00:00', 0),
(49, 'Kepala sekolah  terbuka menerima kritik dan saran dari orang tua/wali.														\r\n', 10, '2020-11-30 00:59:03', 1, '0000-00-00 00:00:00', 0),
(50, 'Kepala sekolah menyediakan fasilitas pembelajaran yang memadai.														\r\n', 11, '2020-11-30 00:59:35', 1, '0000-00-00 00:00:00', 0),
(51, 'Kepala sekolah menyelenggarakan kegiatan yang dapat meningkatkan prestasi siswa. 														\r\n', 11, '2020-11-30 00:59:54', 1, '0000-00-00 00:00:00', 0),
(52, 'Kepala sekolah menyelenggarakan program-program unggulan.														\r\n', 11, '2020-11-30 01:00:07', 1, '0000-00-00 00:00:00', 0),
(53, 'Kepala sekolah menyelenggarakan program ekstrakurikuler sesuai minat dan bakat putra/putri  orang tua/wali.														\r\n', 11, '2020-11-30 01:00:22', 1, '0000-00-00 00:00:00', 0),
(54, 'Kepala sekolah mengadakan pembinaan untuk putra/putri orang tua/wali yang berprestasi.														\r\n', 11, '2020-11-30 01:00:34', 1, '0000-00-00 00:00:00', 0),
(55, 'Kepala sekolah menghindari pungutan yang tidak sesuai aturan.														\r\n', 12, '2020-11-30 01:01:31', 1, '0000-00-00 00:00:00', 0),
(56, 'Kepala sekolah mengelola / melaporkan pemanfaatan keuangan sekolah.														\r\n', 12, '2020-11-30 01:01:44', 1, '0000-00-00 00:00:00', 0),
(57, 'Kepala sekolah menciptakan lingkungan sekolah yang aman dan nyaman.														\r\n', 12, '2020-11-30 01:01:59', 1, '0000-00-00 00:00:00', 0),
(58, 'Kepala sekolah menerapkan kedisiplinan.														\r\n', 12, '2020-11-30 01:02:14', 1, '0000-00-00 00:00:00', 0),
(59, 'Kepala sekolah menciptakan program-program peningkatan perilaku yang baik.														\r\n', 10, '2020-11-30 01:02:35', 1, '0000-00-00 00:00:00', 0),
(60, 'Kepala sekolah menciptakan program-program pengembangan budaya dan ciri khas daerah.														\r\n', 10, '2020-11-30 01:02:49', 1, '0000-00-00 00:00:00', 0);

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

--
-- Table structure for table `tgroup`
--

CREATE TABLE `tgroup` (
  `groupId` int(11) NOT NULL,
  `groupName` varchar(255) NOT NULL,
  `CreatedDate` datetime NOT NULL,
  `CreatedUser` int(11) NOT NULL,
  `ModifiedDate` datetime NOT NULL,
  `ModifiedUser` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tgroup`
--

INSERT INTO `tgroup` (`groupId`, `groupName`, `CreatedDate`, `CreatedUser`, `ModifiedDate`, `ModifiedUser`) VALUES
(10, 'Komunikasi dengan Orang Tua', '2020-11-30 00:54:38', 1, '0000-00-00 00:00:00', 0),
(11, 'Pengelolaan Sekolah', '2020-11-30 00:55:04', 1, '0000-00-00 00:00:00', 0),
(12, 'Keterpercayaan', '2020-11-30 00:55:56', 1, '0000-00-00 00:00:00', 0);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tanswer`
--
ALTER TABLE `tanswer`
  ADD PRIMARY KEY (`Id`),
  ADD KEY `descriptionId` (`descriptionId`),
  ADD KEY `groupId` (`groupId`),
  ADD KEY `groupId_2` (`groupId`),
  ADD KEY `companyId` (`companyId`),
  ADD KEY `groupId_3` (`groupId`),
  ADD KEY `companyId_2` (`companyId`);

--
-- Indexes for table `tcompany`
--
ALTER TABLE `tcompany`
  ADD PRIMARY KEY (`companyId`);

--
-- Indexes for table `tdescription`
--
ALTER TABLE `tdescription`
  ADD PRIMARY KEY (`descriptionId`),
  ADD KEY `groupId` (`groupId`);

--
-- Indexes for table `tgroup`
--
ALTER TABLE `tgroup`
  ADD PRIMARY KEY (`groupId`),
  ADD KEY `CreatedUser` (`CreatedUser`,`ModifiedUser`),
  ADD KEY `CreatedUser_2` (`CreatedUser`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tanswer`
--
ALTER TABLE `tanswer`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `tdescription`
--
ALTER TABLE `tdescription`
  MODIFY `descriptionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;
--
-- AUTO_INCREMENT for table `tgroup`
--
ALTER TABLE `tgroup`
  MODIFY `groupId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `tanswer`
--
ALTER TABLE `tanswer`
  ADD CONSTRAINT `tanswer_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `tcompany` (`companyId`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `tanswer_ibfk_3` FOREIGN KEY (`groupId`) REFERENCES `tgroup` (`groupId`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `tanswer_ibfk_4` FOREIGN KEY (`descriptionId`) REFERENCES `tdescription` (`descriptionId`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `tdescription`
--
ALTER TABLE `tdescription`
  ADD CONSTRAINT `tdescription_ibfk_1` FOREIGN KEY (`groupId`) REFERENCES `tgroup` (`groupId`) ON DELETE CASCADE ON UPDATE CASCADE;

