Advertisement
alexx876

Untitled

May 8th, 2021
1,336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 11.35 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 08, 2021 at 10:35 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: `mysitedb`
  15. --
  16. CREATE DATABASE IF NOT EXISTS `mysitedb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  17. USE `mysitedb`;
  18.  
  19. -- --------------------------------------------------------
  20.  
  21. --
  22. -- Table structure for table `comments`
  23. --
  24.  
  25. CREATE TABLE `comments` (
  26.   `id` int(11) NOT NULL,
  27.   `created` date NOT NULL,
  28.   `author` varchar(20) NOT NULL,
  29.   `comment` varchar(256) NOT NULL,
  30.   `art_id` int(11) NOT NULL
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  32.  
  33. --
  34. -- Dumping data for table `comments`
  35. --
  36.  
  37. INSERT INTO `comments` (`id`, `created`, `author`, `comment`, `art_id`) VALUES
  38. (2, '2020-10-21', 'fgdfg', 'dfgfd', 2),
  39. (3, '2020-10-21', '555', '555', 4),
  40. (5, '2020-10-29', 'hgjhg', 'jhgj', 3),
  41. (7, '2020-10-29', 'gfhfgh', 'gfh', 5);
  42.  
  43. -- --------------------------------------------------------
  44.  
  45. --
  46. -- Table structure for table `notes`
  47. --
  48.  
  49. CREATE TABLE `notes` (
  50.   `id` int(11) NOT NULL,
  51.   `created` date DEFAULT NULL,
  52.   `title` varchar(20) DEFAULT NULL,
  53.   `article` varchar(255) DEFAULT NULL
  54. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  55.  
  56. --
  57. -- Dumping data for table `notes`
  58. --
  59.  
  60. INSERT INTO `notes` (`id`, `created`, `title`, `article`) VALUES
  61. (2, '2020-10-21', '', ''),
  62. (3, '2020-10-21', '', ''),
  63. (4, '2020-10-21', '4444', '4444'),
  64. (5, '2020-10-29', '', '');
  65.  
  66. -- --------------------------------------------------------
  67.  
  68. --
  69. -- Table structure for table `privileges`
  70. --
  71.  
  72. CREATE TABLE `privileges` (
  73.   `id` int(11) NOT NULL,
  74.   `username` varchar(255) NOT NULL,
  75.   `password` varchar(255) NOT NULL,
  76.   `group` int(11) NOT NULL DEFAULT '0'
  77. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  78.  
  79. --
  80. -- Dumping data for table `privileges`
  81. --
  82.  
  83. INSERT INTO `privileges` (`id`, `username`, `password`, `group`) VALUES
  84. (5, 'alexx876', '0aca988c4ed2cb55f9b48b186eff895a', 1),
  85. (8, 'user', 'ee11cbb19052e40b07aac0ca060c23ee', 0);
  86.  
  87. --
  88. -- Indexes for dumped tables
  89. --
  90.  
  91. --
  92. -- Indexes for table `comments`
  93. --
  94. ALTER TABLE `comments`
  95.   ADD PRIMARY KEY (`id`),
  96.   ADD KEY `art_id` (`art_id`);
  97.  
  98. --
  99. -- Indexes for table `notes`
  100. --
  101. ALTER TABLE `notes`
  102.   ADD PRIMARY KEY (`id`);
  103.  
  104. --
  105. -- Indexes for table `privileges`
  106. --
  107. ALTER TABLE `privileges`
  108.   ADD PRIMARY KEY (`id`);
  109.  
  110. --
  111. -- AUTO_INCREMENT for dumped tables
  112. --
  113.  
  114. --
  115. -- AUTO_INCREMENT for table `comments`
  116. --
  117. ALTER TABLE `comments`
  118.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  119.  
  120. --
  121. -- AUTO_INCREMENT for table `notes`
  122. --
  123. ALTER TABLE `notes`
  124.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  125.  
  126. --
  127. -- AUTO_INCREMENT for table `privileges`
  128. --
  129. ALTER TABLE `privileges`
  130.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  131.  
  132. --
  133. -- Constraints for dumped tables
  134. --
  135.  
  136. --
  137. -- Constraints for table `comments`
  138. --
  139. ALTER TABLE `comments`
  140.   ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`art_id`) REFERENCES `notes` (`id`);
  141. --
  142. -- Database: `ta_system`
  143. --
  144. CREATE DATABASE IF NOT EXISTS `ta_system` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  145. USE `ta_system`;
  146.  
  147. -- --------------------------------------------------------
  148.  
  149. --
  150. -- Table structure for table `accidentInformatiom`
  151. --
  152.  
  153. CREATE TABLE `accidentInformatiom` (
  154.   `id` int(11) NOT NULL,
  155.   `cardType` int(1) NOT NULL,
  156.   `uvdNumber` int(6) NOT NULL,
  157.   `go-rovdNumber` int(6) NOT NULL,
  158.   `addCardNumber` int(11) NOT NULL,
  159.   `accidentDate` date NOT NULL,
  160.   `accidentTime` time NOT NULL,
  161.   `deadNumber` int(2) NOT NULL,
  162.   `injuredNumber` int(2) NOT NULL,
  163.   `roadAccidentCategory` int(1) NOT NULL,
  164.   `roadAccidentType` int(1) NOT NULL,
  165.   `totalMaterialDamage` int(7) NOT NULL,
  166.   `accidentArea` varchar(45) NOT NULL,
  167.   `locality` varchar(60) NOT NULL,
  168.   `street` varchar(60) NOT NULL,
  169.   `houseNumber` int(3) NOT NULL,
  170.   `blockNumber` int(3) NOT NULL,
  171.   `intersectedStreet` varchar(60) NOT NULL,
  172.   `highwayValue` int(1) NOT NULL,
  173.   `highwayName` varchar(45) NOT NULL,
  174.   `mileageAndMeters` varchar(15) NOT NULL,
  175.   `roadBeloning` int(1) NOT NULL,
  176.   `roadOrganization` varchar(30) NOT NULL,
  177.   `typeOfCoating` int(1) NOT NULL,
  178.   `roadwayState` int(2) NOT NULL,
  179.   `illumination` int(1) NOT NULL,
  180.   `planAndProfileElements` int(1) NOT NULL,
  181.   `weatherCondition` int(1) NOT NULL,
  182.   `trafficLanesNumber` int(1) NOT NULL,
  183.   `roadWidth` float NOT NULL,
  184.   `shoulderWidth` float NOT NULL,
  185.   `roadsideWidth` float NOT NULL,
  186.   `divingStripWidth` float NOT NULL,
  187.   `sidewalkWidth` float NOT NULL,
  188.   `unsatisfactoryRoadConditions` int(2) NOT NULL,
  189.   `otherRoadElements` int(2) NOT NULL,
  190.   `schemaFileName` varchar(30) NOT NULL,
  191.   `employeeID` int(11) NOT NULL
  192. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  193.  
  194. -- --------------------------------------------------------
  195.  
  196. --
  197. -- Table structure for table `departments`
  198. --
  199.  
  200. CREATE TABLE `departments` (
  201.   `id` int(11) NOT NULL,
  202.   `name` varchar(255) NOT NULL
  203. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  204.  
  205. --
  206. -- Dumping data for table `departments`
  207. --
  208.  
  209. INSERT INTO `departments` (`id`, `name`) VALUES
  210. (1, 'ОГАИ Фрунзенского РУВД');
  211.  
  212. -- --------------------------------------------------------
  213.  
  214. --
  215. -- Table structure for table `employee`
  216. --
  217.  
  218. CREATE TABLE `employee` (
  219.   `id` int(11) NOT NULL,
  220.   `firstName` varchar(45) NOT NULL,
  221.   `lastName` varchar(45) NOT NULL,
  222.   `patronymic` varchar(45) NOT NULL,
  223.   `login` varchar(45) NOT NULL,
  224.   `password` varchar(45) NOT NULL,
  225.   `departmentID` int(11) NOT NULL
  226. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  227.  
  228. --
  229. -- Dumping data for table `employee`
  230. --
  231.  
  232. INSERT INTO `employee` (`id`, `firstName`, `lastName`, `patronymic`, `login`, `password`, `departmentID`) VALUES
  233. (1, 'Петров', 'Владимир', 'Андреевич', 'petrov.v', '3e66f7aaad4294225b5d14e513278d3a', 1);
  234.  
  235. -- --------------------------------------------------------
  236.  
  237. --
  238. -- Table structure for table `participantsGeneralInformation`
  239. --
  240.  
  241. CREATE TABLE `participantsGeneralInformation` (
  242.   `id` int(11) NOT NULL,
  243.   `vehicleSerialNumber` int(2) NOT NULL,
  244.   `movementMemberNumber` int(2) NOT NULL,
  245.   `memberCategory` int(1) NOT NULL,
  246.   `beloningToVehicle` int(2) NOT NULL,
  247.   `memberStatus` varchar(5) NOT NULL,
  248.   `dateDeath` date NOT NULL,
  249.   `severityOfInjuries` int(3) NOT NULL,
  250.   `medicalInstitutiionWhereIsPlaced` varchar(45) NOT NULL,
  251.   `trafficViolation` int(2) NOT NULL,
  252.   `beltOrHemlet` int(1) NOT NULL,
  253.   `measuresTaken` int(1) NOT NULL,
  254.   `accidentInformatiomID` int(11) NOT NULL
  255. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  256.  
  257. -- --------------------------------------------------------
  258.  
  259. --
  260. -- Table structure for table `partisipantsPersonalData`
  261. --
  262.  
  263. CREATE TABLE `partisipantsPersonalData` (
  264.   `id` int(11) NOT NULL,
  265.   `passportNumber` varchar(45) NOT NULL,
  266.   `firstName` varchar(45) NOT NULL,
  267.   `lastName` varchar(45) NOT NULL,
  268.   `patronymic` varchar(45) NOT NULL,
  269.   `sex` varchar(1) NOT NULL,
  270.   `birthday` date NOT NULL,
  271.   `driversLisence` varchar(45) NOT NULL,
  272.   `lisenceIssueDate` date NOT NULL,
  273.   `drivingExperience` varchar(10) NOT NULL,
  274.   `timeBehindTheWheel` varchar(10) NOT NULL,
  275.   `state` varchar(45) NOT NULL,
  276.   `area` varchar(60) NOT NULL,
  277.   `district` varchar(45) NOT NULL,
  278.   `locality` varchar(60) NOT NULL,
  279.   `street` varchar(60) NOT NULL,
  280.   `houseNumber` int(3) NOT NULL,
  281.   `blockNumber` int(3) NOT NULL,
  282.   `flatNumber` int(3) NOT NULL,
  283.   `plaseOfWork` varchar(60) NOT NULL,
  284.   `participantsGeneralInformationID` int(11) NOT NULL
  285. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  286.  
  287. -- --------------------------------------------------------
  288.  
  289. --
  290. -- Table structure for table `vehicleData`
  291. --
  292.  
  293. CREATE TABLE `vehicleData` (
  294.   `id` int(11) NOT NULL,
  295.   `brandName` varchar(45) NOT NULL,
  296.   `vehicleType` int(3) NOT NULL,
  297.   `licensePlate` varchar(45) NOT NULL,
  298.   `engineNumber` varchar(45) NOT NULL,
  299.   `bodyNumber` varchar(45) NOT NULL,
  300.   `state` varchar(45) NOT NULL,
  301.   `area` varchar(60) NOT NULL,
  302.   `district` varchar(45) NOT NULL,
  303.   `locality` varchar(60) NOT NULL,
  304.   `street` varchar(60) NOT NULL,
  305.   `houseNumber` int(3) NOT NULL,
  306.   `blockNumber` int(3) NOT NULL,
  307.   `flatNumber` int(3) NOT NULL,
  308.   `nameOfCompanyOrMan` varchar(60) NOT NULL,
  309.   `driveType` int(1) NOT NULL,
  310.   `loadType` int(1) NOT NULL,
  311.   `steeringLocation` varchar(6) NOT NULL,
  312.   `color` int(2) NOT NULL,
  313.   `trailerPresence` varchar(12) NOT NULL,
  314.   `vehicleProblems` int(2) NOT NULL,
  315.   `participantsGeneralInformationID` int(11) NOT NULL
  316. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  317.  
  318. --
  319. -- Indexes for dumped tables
  320. --
  321.  
  322. --
  323. -- Indexes for table `accidentInformatiom`
  324. --
  325. ALTER TABLE `accidentInformatiom`
  326.   ADD PRIMARY KEY (`id`),
  327.   ADD KEY `employeeID` (`employeeID`);
  328.  
  329. --
  330. -- Indexes for table `departments`
  331. --
  332. ALTER TABLE `departments`
  333.   ADD PRIMARY KEY (`id`),
  334.   ADD KEY `id` (`id`);
  335.  
  336. --
  337. -- Indexes for table `employee`
  338. --
  339. ALTER TABLE `employee`
  340.   ADD PRIMARY KEY (`id`),
  341.   ADD KEY `id` (`id`),
  342.   ADD KEY `departmentID` (`departmentID`);
  343.  
  344. --
  345. -- Indexes for table `participantsGeneralInformation`
  346. --
  347. ALTER TABLE `participantsGeneralInformation`
  348.   ADD PRIMARY KEY (`id`),
  349.   ADD KEY `accidentInformatiomID` (`accidentInformatiomID`);
  350.  
  351. --
  352. -- Indexes for table `partisipantsPersonalData`
  353. --
  354. ALTER TABLE `partisipantsPersonalData`
  355.   ADD PRIMARY KEY (`id`),
  356.   ADD KEY `participantsGeneralInformationID` (`participantsGeneralInformationID`);
  357.  
  358. --
  359. -- Indexes for table `vehicleData`
  360. --
  361. ALTER TABLE `vehicleData`
  362.   ADD PRIMARY KEY (`id`),
  363.   ADD KEY `participantsGeneralInformationID` (`participantsGeneralInformationID`);
  364.  
  365. --
  366. -- AUTO_INCREMENT for dumped tables
  367. --
  368.  
  369. --
  370. -- AUTO_INCREMENT for table `accidentInformatiom`
  371. --
  372. ALTER TABLE `accidentInformatiom`
  373.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  374.  
  375. --
  376. -- AUTO_INCREMENT for table `departments`
  377. --
  378. ALTER TABLE `departments`
  379.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  380.  
  381. --
  382. -- AUTO_INCREMENT for table `employee`
  383. --
  384. ALTER TABLE `employee`
  385.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  386.  
  387. --
  388. -- AUTO_INCREMENT for table `participantsGeneralInformation`
  389. --
  390. ALTER TABLE `participantsGeneralInformation`
  391.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  392.  
  393. --
  394. -- AUTO_INCREMENT for table `partisipantsPersonalData`
  395. --
  396. ALTER TABLE `partisipantsPersonalData`
  397.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  398.  
  399. --
  400. -- AUTO_INCREMENT for table `vehicleData`
  401. --
  402. ALTER TABLE `vehicleData`
  403.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  404.  
  405. --
  406. -- Constraints for dumped tables
  407. --
  408.  
  409. --
  410. -- Constraints for table `accidentInformatiom`
  411. --
  412. ALTER TABLE `accidentInformatiom`
  413.   ADD CONSTRAINT `accidentinformatiom_ibfk_1` FOREIGN KEY (`employeeID`) REFERENCES `employee` (`id`);
  414.  
  415. --
  416. -- Constraints for table `employee`
  417. --
  418. ALTER TABLE `employee`
  419.   ADD CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`departmentID`) REFERENCES `departments` (`id`);
  420.  
  421. --
  422. -- Constraints for table `partisipantsPersonalData`
  423. --
  424. ALTER TABLE `partisipantsPersonalData`
  425.   ADD CONSTRAINT `partisipantspersonaldata_ibfk_1` FOREIGN KEY (`participantsGeneralInformationID`) REFERENCES `participantsGeneralInformation` (`id`);
  426.  
  427. --
  428. -- Constraints for table `vehicleData`
  429. --
  430. ALTER TABLE `vehicleData`
  431.   ADD CONSTRAINT `vehicledata_ibfk_1` FOREIGN KEY (`participantsGeneralInformationID`) REFERENCES `participantsGeneralInformation` (`id`);
  432.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement