PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/Database/courseworkworkflow.sql

https://bitbucket.org/MatthewBrown97/courseworkworkflow
SQL | 489 lines | 233 code | 82 blank | 174 comment | 0 complexity | 6d596b3143260359c1947d8cba895737 MD5 | raw file
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.7.0
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: 127.0.0.1
  6. -- Generation Time: May 04, 2018 at 01:02 PM
  7. -- Server version: 5.7.17
  8. -- PHP Version: 5.6.30
  9. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  10. SET AUTOCOMMIT = 0;
  11. START TRANSACTION;
  12. SET time_zone = "+00:00";
  13. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  14. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  15. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  16. /*!40101 SET NAMES utf8mb4 */;
  17. --
  18. -- Database: `courseworkworkflow`
  19. --
  20. -- --------------------------------------------------------
  21. --
  22. -- Table structure for table `coursework`
  23. --
  24. CREATE TABLE `coursework` (
  25. `ID` int(11) NOT NULL,
  26. `ReleaseDate` datetime(6) NOT NULL,
  27. `Review` int(11) DEFAULT NULL,
  28. `Deliverables` text NOT NULL,
  29. `Feedbacks` text NOT NULL,
  30. `Description` text NOT NULL,
  31. `Title` text NOT NULL
  32. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  33. --
  34. -- Dumping data for table `coursework`
  35. --
  36. INSERT INTO `coursework` (`ID`, `ReleaseDate`, `Review`, `Deliverables`, `Feedbacks`, `Description`, `Title`) VALUES
  37. (2, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Networking & UI ACW'),
  38. (7, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Written exam'),
  39. (8, '2018-02-15 00:00:00.000000', 1, '2,6,7', '', '', 'Group software application lifecycle management project '),
  40. (9, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Examination'),
  41. (10, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Online Test'),
  42. (11, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Data Structure Analysis'),
  43. (12, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Exam Quiz'),
  44. (13, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Implementing a Simple Agent Chatbot to Suggest Christmas Presents'),
  45. (14, '2018-02-01 00:00:00.000000', NULL, '8,9', '', '', 'ProcessFlow'),
  46. (15, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Team Assignement'),
  47. (16, '2018-04-01 00:00:00.000000', NULL, '', '', '', 'Final Exam');
  48. -- --------------------------------------------------------
  49. --
  50. -- Table structure for table `deliverable`
  51. --
  52. CREATE TABLE `deliverable` (
  53. `ID` int(11) NOT NULL,
  54. `Type` int(11) NOT NULL,
  55. `SubmissionDate` datetime NOT NULL,
  56. `Submissions` text NOT NULL,
  57. `FeedbackDate` datetime NOT NULL
  58. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  59. --
  60. -- Dumping data for table `deliverable`
  61. --
  62. INSERT INTO `deliverable` (`ID`, `Type`, `SubmissionDate`, `Submissions`, `FeedbackDate`) VALUES
  63. (2, 2, '2018-05-04 14:00:00', '', '2018-05-05 00:00:00'),
  64. (6, 6, '2018-05-04 14:00:00', '', '2018-05-03 00:00:00'),
  65. (7, 7, '2018-05-04 14:00:00', '', '2018-05-02 00:00:00'),
  66. (8, 2, '2018-04-25 14:00:00', '', '2018-05-05 00:00:00'),
  67. (9, 4, '2018-04-25 14:00:00', '', '2018-05-05 00:00:00');
  68. -- --------------------------------------------------------
  69. --
  70. -- Table structure for table `feedback`
  71. --
  72. CREATE TABLE `feedback` (
  73. `ID` int(11) NOT NULL,
  74. `Mark` int(11) NOT NULL,
  75. `Feedback` text NOT NULL,
  76. `Student` int(11) NOT NULL,
  77. `Completed` tinyint(1) DEFAULT NULL
  78. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  79. -- --------------------------------------------------------
  80. --
  81. -- Table structure for table `module`
  82. --
  83. CREATE TABLE `module` (
  84. `ID` int(11) NOT NULL,
  85. `Name` text NOT NULL,
  86. `Courseworks` text NOT NULL,
  87. `Reviewer` int(11) NOT NULL,
  88. `ModuleCode` text NOT NULL
  89. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  90. --
  91. -- Dumping data for table `module`
  92. --
  93. INSERT INTO `module` (`ID`, `Name`, `Courseworks`, `Reviewer`, `ModuleCode`) VALUES
  94. (1, 'Networking and User Interface Design', '2,7', 3, '08140'),
  95. (2, 'Agile Software Development', '8,9', 3, '08142'),
  96. (3, 'Advanced Programming', '10,11', 3, '08143'),
  97. (4, 'Artificial Intelligence', '12,13', 3, '08146'),
  98. (5, 'Software Engineering', '14', 3, '08148'),
  99. (6, 'Systems Analysis, Design and Process', '15,16', 3, '08144');
  100. -- --------------------------------------------------------
  101. --
  102. -- Table structure for table `module_student`
  103. --
  104. CREATE TABLE `module_student` (
  105. `ID` int(11) NOT NULL,
  106. `ModuleID` int(11) NOT NULL,
  107. `StudentID` int(11) NOT NULL
  108. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  109. --
  110. -- Dumping data for table `module_student`
  111. --
  112. INSERT INTO `module_student` (`ID`, `ModuleID`, `StudentID`) VALUES
  113. (1, 1, 2),
  114. (2, 1, 4),
  115. (3, 3, 4),
  116. (4, 2, 4),
  117. (5, 4, 4),
  118. (6, 5, 4),
  119. (7, 6, 4);
  120. -- --------------------------------------------------------
  121. --
  122. -- Table structure for table `review`
  123. --
  124. CREATE TABLE `review` (
  125. `ID` int(11) NOT NULL,
  126. `Coursework` int(11) NOT NULL,
  127. `ReviewDeadline` datetime NOT NULL,
  128. `Passed` tinyint(1) DEFAULT NULL,
  129. `WeightingSizeLengthMatch` tinyint(1) DEFAULT NULL,
  130. `LearningOutcomesFulfilled` tinyint(1) DEFAULT NULL,
  131. `Clear` tinyint(1) DEFAULT NULL,
  132. `SuitableTimescale` tinyint(1) DEFAULT NULL,
  133. `AppropriateLevel` tinyint(1) DEFAULT NULL,
  134. `AppropriateMarkScheme` tinyint(1) DEFAULT NULL,
  135. `ConsistentMarkScheme` tinyint(1) DEFAULT NULL,
  136. `AcademicMisconductLimited` tinyint(1) DEFAULT NULL,
  137. `SecondMarking` tinyint(1) DEFAULT NULL,
  138. `EthicalApproval` tinyint(1) DEFAULT NULL,
  139. `RiskAssesment` tinyint(1) DEFAULT NULL,
  140. `SameReassessment` tinyint(1) DEFAULT NULL
  141. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  142. --
  143. -- Dumping data for table `review`
  144. --
  145. INSERT INTO `review` (`ID`, `Coursework`, `ReviewDeadline`, `Passed`, `WeightingSizeLengthMatch`, `LearningOutcomesFulfilled`, `Clear`, `SuitableTimescale`, `AppropriateLevel`, `AppropriateMarkScheme`, `ConsistentMarkScheme`, `AcademicMisconductLimited`, `SecondMarking`, `EthicalApproval`, `RiskAssesment`, `SameReassessment`) VALUES
  146. (1, 7, '2018-04-01 00:00:00', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  147. (2, 2, '2018-04-01 00:00:00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  148. (3, 8, '2018-04-01 00:00:00', 0, 1, 1, 1, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL),
  149. (4, 9, '2018-04-01 00:00:00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
  150. -- --------------------------------------------------------
  151. --
  152. -- Table structure for table `staff`
  153. --
  154. CREATE TABLE `staff` (
  155. `ParentID` int(11) NOT NULL,
  156. `Modules` text NOT NULL,
  157. `Reviewing` text NOT NULL,
  158. `ModulesManaged` text NOT NULL,
  159. `CourseworksAuthored` text NOT NULL
  160. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  161. --
  162. -- Dumping data for table `staff`
  163. --
  164. INSERT INTO `staff` (`ParentID`, `Modules`, `Reviewing`, `ModulesManaged`, `CourseworksAuthored`) VALUES
  165. (1, '', '2', '1', ''),
  166. (3, '', '1', '', ''),
  167. (5, '', '1,3,4,5', '2,6', '');
  168. -- --------------------------------------------------------
  169. --
  170. -- Table structure for table `student`
  171. --
  172. CREATE TABLE `student` (
  173. `ParentID` int(11) NOT NULL,
  174. `StudentNumber` int(11) NOT NULL
  175. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  176. --
  177. -- Dumping data for table `student`
  178. --
  179. INSERT INTO `student` (`ParentID`, `StudentNumber`) VALUES
  180. (2, 528433),
  181. (4, 528432);
  182. -- --------------------------------------------------------
  183. --
  184. -- Table structure for table `submission`
  185. --
  186. CREATE TABLE `submission` (
  187. `ID` int(11) NOT NULL,
  188. `Submitted` tinyint(4) NOT NULL DEFAULT '0'
  189. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  190. -- --------------------------------------------------------
  191. --
  192. -- Table structure for table `task`
  193. --
  194. CREATE TABLE `task` (
  195. `ID` int(11) NOT NULL,
  196. `State` text NOT NULL,
  197. `Description` text NOT NULL,
  198. `RelatedUsers` text NOT NULL,
  199. `ExpiryDate` datetime NOT NULL,
  200. `RelatedDeliverable` text,
  201. `Type` int(11) NOT NULL,
  202. `RelatedCoursework` text,
  203. `Message` text,
  204. `Dismissed` tinyint(1) NOT NULL DEFAULT '0'
  205. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  206. --
  207. -- Dumping data for table `task`
  208. --
  209. INSERT INTO `task` (`ID`, `State`, `Description`, `RelatedUsers`, `ExpiryDate`, `RelatedDeliverable`, `Type`, `RelatedCoursework`, `Message`, `Dismissed`) VALUES
  210. (39, '2', 'Group software application lifecycle management project ', '4', '2018-05-02 00:00:00', NULL, 4, '8', 'This coursework has been released today', 1),
  211. (36, '2', 'Networking & UI ACW Review Failed', '3', '2018-04-01 00:00:00', NULL, 3, '2', '', 0),
  212. (31, '1', 'Program', '4', '2018-05-04 14:00:00', '2', 1, NULL, '', 0),
  213. (32, '1', 'Portfolio', '4', '2018-05-04 14:00:00', '6', 1, NULL, '', 0),
  214. (33, '1', 'Video Presentation', '4', '2018-05-04 14:00:00', '7', 1, NULL, '', 0),
  215. (40, '1', 'Program', '5', '2018-05-05 00:00:00', '2', 2, NULL, NULL, 0),
  216. (41, '1', '', '4', '2018-05-04 14:00:00', '8', 1, NULL, NULL, 0),
  217. (42, '1', '', '4', '2018-05-04 14:00:00', '9', 1, NULL, NULL, 0),
  218. (43, '1', '', '', '2018-05-05 00:00:00', '8', 2, NULL, NULL, 0),
  219. (44, '1', '', '', '2018-05-05 00:00:00', '9', 2, NULL, NULL, 0),
  220. (45, '2', 'Group software application lifecycle management project Review Failed', '3', '2018-04-01 00:00:00', NULL, 3, '8', NULL, 0),
  221. (46, '2', 'Examination Review Failed', '3', '2018-04-01 00:00:00', NULL, 3, '9', NULL, 0);
  222. -- --------------------------------------------------------
  223. --
  224. -- Table structure for table `task_types`
  225. --
  226. CREATE TABLE `task_types` (
  227. `ID` int(11) NOT NULL,
  228. `Description` text NOT NULL
  229. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  230. --
  231. -- Dumping data for table `task_types`
  232. --
  233. INSERT INTO `task_types` (`ID`, `Description`) VALUES
  234. (1, 'DeliverableSubmissionDue'),
  235. (2, 'FeedbackSubmissionDue'),
  236. (3, 'ReviewFailed'),
  237. (4, 'CourseworkReleased'),
  238. (5, 'CourseworkCreated');
  239. -- --------------------------------------------------------
  240. --
  241. -- Table structure for table `type`
  242. --
  243. CREATE TABLE `type` (
  244. `ID` int(11) NOT NULL,
  245. `Description` text NOT NULL,
  246. `UserSubmitted` tinyint(1) NOT NULL DEFAULT '0'
  247. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  248. --
  249. -- Dumping data for table `type`
  250. --
  251. INSERT INTO `type` (`ID`, `Description`, `UserSubmitted`) VALUES
  252. (1, 'Presentation', 0),
  253. (2, 'Program', 1),
  254. (3, 'Exam', 0),
  255. (4, 'Report', 1),
  256. (5, 'Poster', 1),
  257. (6, 'Portfolio', 1),
  258. (7, 'Video Presentation', 1);
  259. -- --------------------------------------------------------
  260. --
  261. -- Table structure for table `user`
  262. --
  263. CREATE TABLE `user` (
  264. `ID` int(11) NOT NULL,
  265. `Email` text NOT NULL,
  266. `Password` text NOT NULL,
  267. `Surname` text NOT NULL,
  268. `OtherNames` text NOT NULL
  269. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  270. --
  271. -- Dumping data for table `user`
  272. --
  273. INSERT INTO `user` (`ID`, `Email`, `Password`, `Surname`, `OtherNames`) VALUES
  274. (1, 'staff1@hull.ac.uk', 'dd4d0821fdb71ccb388afe050abf9832', 'Surname', 'Mr Staff'),
  275. (2, 'student1@hull.ac.uk', 'dd4d0821fdb71ccb388afe050abf9832', 'Surname', 'Mr Student'),
  276. (3, 'staff2@hull.ac.uk', 'dd4d0821fdb71ccb388afe050abf9832', 'Surname', 'Mr Reviewer'),
  277. (4, 'm.brown@2016.hull.ac.uk', 'dd4d0821fdb71ccb388afe050abf9832', 'Brown', 'Matthew'),
  278. (5, 'john.whelan@hull.ac.uk', 'dd4d0821fdb71ccb388afe050abf9832', 'Whelan', 'Dr. John');
  279. --
  280. -- Indexes for dumped tables
  281. --
  282. --
  283. -- Indexes for table `coursework`
  284. --
  285. ALTER TABLE `coursework`
  286. ADD PRIMARY KEY (`ID`);
  287. --
  288. -- Indexes for table `deliverable`
  289. --
  290. ALTER TABLE `deliverable`
  291. ADD PRIMARY KEY (`ID`);
  292. --
  293. -- Indexes for table `feedback`
  294. --
  295. ALTER TABLE `feedback`
  296. ADD PRIMARY KEY (`ID`);
  297. --
  298. -- Indexes for table `module`
  299. --
  300. ALTER TABLE `module`
  301. ADD PRIMARY KEY (`ID`);
  302. --
  303. -- Indexes for table `module_student`
  304. --
  305. ALTER TABLE `module_student`
  306. ADD PRIMARY KEY (`ID`);
  307. --
  308. -- Indexes for table `review`
  309. --
  310. ALTER TABLE `review`
  311. ADD PRIMARY KEY (`ID`);
  312. --
  313. -- Indexes for table `staff`
  314. --
  315. ALTER TABLE `staff`
  316. ADD PRIMARY KEY (`ParentID`);
  317. --
  318. -- Indexes for table `student`
  319. --
  320. ALTER TABLE `student`
  321. ADD PRIMARY KEY (`ParentID`);
  322. --
  323. -- Indexes for table `submission`
  324. --
  325. ALTER TABLE `submission`
  326. ADD PRIMARY KEY (`ID`);
  327. --
  328. -- Indexes for table `task`
  329. --
  330. ALTER TABLE `task`
  331. ADD PRIMARY KEY (`ID`);
  332. --
  333. -- Indexes for table `task_types`
  334. --
  335. ALTER TABLE `task_types`
  336. ADD PRIMARY KEY (`ID`);
  337. --
  338. -- Indexes for table `type`
  339. --
  340. ALTER TABLE `type`
  341. ADD PRIMARY KEY (`ID`);
  342. --
  343. -- Indexes for table `user`
  344. --
  345. ALTER TABLE `user`
  346. ADD PRIMARY KEY (`ID`);
  347. --
  348. -- AUTO_INCREMENT for dumped tables
  349. --
  350. --
  351. -- AUTO_INCREMENT for table `coursework`
  352. --
  353. ALTER TABLE `coursework`
  354. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  355. --
  356. -- AUTO_INCREMENT for table `deliverable`
  357. --
  358. ALTER TABLE `deliverable`
  359. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  360. --
  361. -- AUTO_INCREMENT for table `feedback`
  362. --
  363. ALTER TABLE `feedback`
  364. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
  365. --
  366. -- AUTO_INCREMENT for table `module`
  367. --
  368. ALTER TABLE `module`
  369. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8141;
  370. --
  371. -- AUTO_INCREMENT for table `module_student`
  372. --
  373. ALTER TABLE `module_student`
  374. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  375. --
  376. -- AUTO_INCREMENT for table `review`
  377. --
  378. ALTER TABLE `review`
  379. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  380. --
  381. -- AUTO_INCREMENT for table `submission`
  382. --
  383. ALTER TABLE `submission`
  384. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
  385. --
  386. -- AUTO_INCREMENT for table `task`
  387. --
  388. ALTER TABLE `task`
  389. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
  390. --
  391. -- AUTO_INCREMENT for table `task_types`
  392. --
  393. ALTER TABLE `task_types`
  394. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  395. --
  396. -- AUTO_INCREMENT for table `type`
  397. --
  398. ALTER TABLE `type`
  399. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  400. --
  401. -- AUTO_INCREMENT for table `user`
  402. --
  403. ALTER TABLE `user`
  404. MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;COMMIT;
  405. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  406. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  407. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;