alexx876

Untitled

May 23rd, 2021
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.64 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.9.3
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: localhost:8889
  6. -- Generation Time: May 23, 2021 at 01:13 PM
  7. -- Server version: 5.7.26
  8. -- PHP Version: 7.4.2
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET time_zone = "+00:00";
  12.  
  13. --
  14. -- Database: `ta_system`
  15. --
  16.  
  17. -- --------------------------------------------------------
  18.  
  19. --
  20. -- Table structure for table `accidentInformatiom`
  21. --
  22.  
  23. CREATE TABLE `accidentInformatiom` (
  24. `id` int(11) NOT NULL,
  25. `cardType` int(1) NOT NULL,
  26. `uvdNumber` int(6) NOT NULL,
  27. `go-rovdNumber` int(6) NOT NULL,
  28. `addCardNumber` int(11) NOT NULL,
  29. `accidentDate` date NOT NULL,
  30. `accidentTime` time NOT NULL,
  31. `deadNumber` int(2) NOT NULL,
  32. `injuredNumber` int(2) NOT NULL,
  33. `roadAccidentCategory` int(1) NOT NULL,
  34. `roadAccidentType` int(1) NOT NULL,
  35. `totalMaterialDamage` int(7) NOT NULL,
  36. `accidentArea` varchar(45) NOT NULL,
  37. `locality` varchar(60) NOT NULL,
  38. `street` varchar(60) NOT NULL,
  39. `houseNumber` varchar(20) NOT NULL,
  40. `blockNumber` int(3) NOT NULL,
  41. `intersectedStreet` varchar(60) NOT NULL,
  42. `highwayValue` int(1) NOT NULL,
  43. `highwayName` varchar(45) NOT NULL,
  44. `mileageAndMeters` varchar(15) NOT NULL,
  45. `roadBeloning` int(1) NOT NULL,
  46. `roadOrganization` varchar(30) NOT NULL,
  47. `typeOfCoating` int(1) NOT NULL,
  48. `roadwayState` int(2) NOT NULL,
  49. `illumination` int(1) NOT NULL,
  50. `planAndProfileElements` int(1) NOT NULL,
  51. `weatherCondition` int(1) NOT NULL,
  52. `trafficLanesNumber` int(1) NOT NULL,
  53. `roadWidth` float NOT NULL,
  54. `shoulderWidth` float NOT NULL,
  55. `roadsideWidth` float NOT NULL,
  56. `divingStripWidth` float NOT NULL,
  57. `sidewalkWidth` float NOT NULL,
  58. `unsatisfactoryRoadConditions` varchar(50) NOT NULL,
  59. `otherRoadElements` varchar(50) NOT NULL,
  60. `schemaFileName` varchar(30) NOT NULL,
  61. `employeeID` int(11) NOT NULL
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  63.  
  64. --
  65. -- Dumping data for table `accidentInformatiom`
  66. --
  67.  
  68. INSERT INTO `accidentInformatiom` (`id`, `cardType`, `uvdNumber`, `go-rovdNumber`, `addCardNumber`, `accidentDate`, `accidentTime`, `deadNumber`, `injuredNumber`, `roadAccidentCategory`, `roadAccidentType`, `totalMaterialDamage`, `accidentArea`, `locality`, `street`, `houseNumber`, `blockNumber`, `intersectedStreet`, `highwayValue`, `highwayName`, `mileageAndMeters`, `roadBeloning`, `roadOrganization`, `typeOfCoating`, `roadwayState`, `illumination`, `planAndProfileElements`, `weatherCondition`, `trafficLanesNumber`, `roadWidth`, `shoulderWidth`, `roadsideWidth`, `divingStripWidth`, `sidewalkWidth`, `unsatisfactoryRoadConditions`, `otherRoadElements`, `schemaFileName`, `employeeID`) VALUES
  69. (1, 2, 4353, 543, 444, '2021-05-14', '13:48:00', 5, 4, 2, 1, 5, '5f', 'retr', '45', '5', 55, '5', 2, '555', '5f', 3, '555', 2, 3, 2, 4, 3, 4, 4, 0, 664, 432, 423, '7,5', '5,12', 'fdg,sadasd.jpg', 1);
  70.  
  71. -- --------------------------------------------------------
  72.  
  73. --
  74. -- Table structure for table `departments`
  75. --
  76.  
  77. CREATE TABLE `departments` (
  78. `id` int(11) NOT NULL,
  79. `name` varchar(255) NOT NULL
  80. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  81.  
  82. --
  83. -- Dumping data for table `departments`
  84. --
  85.  
  86. INSERT INTO `departments` (`id`, `name`) VALUES
  87. (1, 'ОГАИ Фрунзенского РУВД');
  88.  
  89. -- --------------------------------------------------------
  90.  
  91. --
  92. -- Table structure for table `employee`
  93. --
  94.  
  95. CREATE TABLE `employee` (
  96. `id` int(11) NOT NULL,
  97. `firstName` varchar(45) NOT NULL,
  98. `lastName` varchar(45) NOT NULL,
  99. `patronymic` varchar(45) NOT NULL,
  100. `login` varchar(45) NOT NULL,
  101. `password` varchar(45) NOT NULL,
  102. `departmentID` int(11) NOT NULL
  103. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  104.  
  105. --
  106. -- Dumping data for table `employee`
  107. --
  108.  
  109. INSERT INTO `employee` (`id`, `firstName`, `lastName`, `patronymic`, `login`, `password`, `departmentID`) VALUES
  110. (1, 'Петров', 'Владимир', 'Андреевич', 'petrov.v', '3e66f7aaad4294225b5d14e513278d3a', 1);
  111.  
  112. -- --------------------------------------------------------
  113.  
  114. --
  115. -- Table structure for table `participantsGeneralInformation`
  116. --
  117.  
  118. CREATE TABLE `participantsGeneralInformation` (
  119. `id` int(11) NOT NULL,
  120. `vehicleSerialNumber` int(2) NOT NULL,
  121. `movementMemberNumber` int(2) NOT NULL,
  122. `memberCategory` int(1) NOT NULL,
  123. `beloningToVehicle` int(2) NOT NULL,
  124. `memberStatus` varchar(5) NOT NULL,
  125. `dateDeath` date NOT NULL,
  126. `severityOfInjuries` int(3) NOT NULL,
  127. `medicalInstitutiionWhereIsPlaced` varchar(45) NOT NULL,
  128. `trafficViolation` int(2) NOT NULL,
  129. `beltOrHemlet` int(1) NOT NULL,
  130. `measuresTaken` int(1) NOT NULL,
  131. `accidentInformatiomID` int(11) NOT NULL
  132. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  133.  
  134. -- --------------------------------------------------------
  135.  
  136. --
  137. -- Table structure for table `partisipantsPersonalData`
  138. --
  139.  
  140. CREATE TABLE `partisipantsPersonalData` (
  141. `id` int(11) NOT NULL,
  142. `passportNumber` varchar(45) NOT NULL,
  143. `firstName` varchar(45) NOT NULL,
  144. `lastName` varchar(45) NOT NULL,
  145. `patronymic` varchar(45) NOT NULL,
  146. `sex` varchar(1) NOT NULL,
  147. `birthday` date NOT NULL,
  148. `driversLisence` varchar(45) NOT NULL,
  149. `lisenceIssueDate` date NOT NULL,
  150. `drivingExperience` varchar(10) NOT NULL,
  151. `timeBehindTheWheel` varchar(10) NOT NULL,
  152. `state` varchar(45) NOT NULL,
  153. `area` varchar(60) NOT NULL,
  154. `district` varchar(45) NOT NULL,
  155. `locality` varchar(60) NOT NULL,
  156. `street` varchar(60) NOT NULL,
  157. `houseNumber` int(3) NOT NULL,
  158. `blockNumber` int(3) NOT NULL,
  159. `flatNumber` int(3) NOT NULL,
  160. `plaseOfWork` varchar(60) NOT NULL,
  161. `participantsGeneralInformationID` int(11) NOT NULL
  162. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  163.  
  164. -- --------------------------------------------------------
  165.  
  166. --
  167. -- Table structure for table `vehicleData`
  168. --
  169.  
  170. CREATE TABLE `vehicleData` (
  171. `id` int(11) NOT NULL,
  172. `brandName` varchar(45) NOT NULL,
  173. `vehicleType` int(3) NOT NULL,
  174. `licensePlate` varchar(45) NOT NULL,
  175. `engineNumber` varchar(45) NOT NULL,
  176. `bodyNumber` varchar(45) NOT NULL,
  177. `state` varchar(45) NOT NULL,
  178. `area` varchar(60) NOT NULL,
  179. `district` varchar(45) NOT NULL,
  180. `locality` varchar(60) NOT NULL,
  181. `street` varchar(60) NOT NULL,
  182. `houseNumber` int(3) NOT NULL,
  183. `blockNumber` int(3) NOT NULL,
  184. `flatNumber` int(3) NOT NULL,
  185. `nameOfCompanyOrMan` varchar(60) NOT NULL,
  186. `driveType` int(1) NOT NULL,
  187. `loadType` int(1) NOT NULL,
  188. `steeringLocation` varchar(6) NOT NULL,
  189. `color` int(2) NOT NULL,
  190. `trailerPresence` varchar(12) NOT NULL,
  191. `vehicleProblems` int(2) NOT NULL,
  192. `participantsGeneralInformationID` int(11) NOT NULL
  193. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  194.  
  195. --
  196. -- Indexes for dumped tables
  197. --
  198.  
  199. --
  200. -- Indexes for table `accidentInformatiom`
  201. --
  202. ALTER TABLE `accidentInformatiom`
  203. ADD PRIMARY KEY (`id`),
  204. ADD KEY `employeeID` (`employeeID`);
  205.  
  206. --
  207. -- Indexes for table `departments`
  208. --
  209. ALTER TABLE `departments`
  210. ADD PRIMARY KEY (`id`),
  211. ADD KEY `id` (`id`);
  212.  
  213. --
  214. -- Indexes for table `employee`
  215. --
  216. ALTER TABLE `employee`
  217. ADD PRIMARY KEY (`id`),
  218. ADD KEY `id` (`id`),
  219. ADD KEY `departmentID` (`departmentID`);
  220.  
  221. --
  222. -- Indexes for table `participantsGeneralInformation`
  223. --
  224. ALTER TABLE `participantsGeneralInformation`
  225. ADD PRIMARY KEY (`id`),
  226. ADD KEY `accidentInformatiomID` (`accidentInformatiomID`);
  227.  
  228. --
  229. -- Indexes for table `partisipantsPersonalData`
  230. --
  231. ALTER TABLE `partisipantsPersonalData`
  232. ADD PRIMARY KEY (`id`),
  233. ADD KEY `participantsGeneralInformationID` (`participantsGeneralInformationID`);
  234.  
  235. --
  236. -- Indexes for table `vehicleData`
  237. --
  238. ALTER TABLE `vehicleData`
  239. ADD PRIMARY KEY (`id`),
  240. ADD KEY `participantsGeneralInformationID` (`participantsGeneralInformationID`);
  241.  
  242. --
  243. -- AUTO_INCREMENT for dumped tables
  244. --
  245.  
  246. --
  247. -- AUTO_INCREMENT for table `accidentInformatiom`
  248. --
  249. ALTER TABLE `accidentInformatiom`
  250. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  251.  
  252. --
  253. -- AUTO_INCREMENT for table `departments`
  254. --
  255. ALTER TABLE `departments`
  256. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  257.  
  258. --
  259. -- AUTO_INCREMENT for table `employee`
  260. --
  261. ALTER TABLE `employee`
  262. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  263.  
  264. --
  265. -- AUTO_INCREMENT for table `participantsGeneralInformation`
  266. --
  267. ALTER TABLE `participantsGeneralInformation`
  268. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  269.  
  270. --
  271. -- AUTO_INCREMENT for table `partisipantsPersonalData`
  272. --
  273. ALTER TABLE `partisipantsPersonalData`
  274. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  275.  
  276. --
  277. -- AUTO_INCREMENT for table `vehicleData`
  278. --
  279. ALTER TABLE `vehicleData`
  280. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  281.  
  282. --
  283. -- Constraints for dumped tables
  284. --
  285.  
  286. --
  287. -- Constraints for table `accidentInformatiom`
  288. --
  289. ALTER TABLE `accidentInformatiom`
  290. ADD CONSTRAINT `accidentinformatiom_ibfk_1` FOREIGN KEY (`employeeID`) REFERENCES `employee` (`id`);
  291.  
  292. --
  293. -- Constraints for table `employee`
  294. --
  295. ALTER TABLE `employee`
  296. ADD CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`departmentID`) REFERENCES `departments` (`id`);
  297.  
  298. --
  299. -- Constraints for table `participantsGeneralInformation`
  300. --
  301. ALTER TABLE `participantsGeneralInformation`
  302. ADD CONSTRAINT `participantsgeneralinformation_ibfk_1` FOREIGN KEY (`accidentInformatiomID`) REFERENCES `accidentInformatiom` (`id`);
  303.  
  304. --
  305. -- Constraints for table `partisipantsPersonalData`
  306. --
  307. ALTER TABLE `partisipantsPersonalData`
  308. ADD CONSTRAINT `partisipantspersonaldata_ibfk_1` FOREIGN KEY (`participantsGeneralInformationID`) REFERENCES `participantsGeneralInformation` (`id`);
  309.  
  310. --
  311. -- Constraints for table `vehicleData`
  312. --
  313. ALTER TABLE `vehicleData`
  314. ADD CONSTRAINT `vehicledata_ibfk_1` FOREIGN KEY (`participantsGeneralInformationID`) REFERENCES `participantsGeneralInformation` (`id`);
  315.  
Advertisement
Add Comment
Please, Sign In to add comment