Skip to content

Instantly share code, notes, and snippets.

@cladjidane
Last active June 6, 2023 09:19
Show Gist options
  • Save cladjidane/ad0f61bd39405984a5f2816beaaea6c2 to your computer and use it in GitHub Desktop.
Save cladjidane/ad0f61bd39405984a5f2816beaaea6c2 to your computer and use it in GitHub Desktop.
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jun 06, 2023 at 09:18 AM
-- Server version: 5.7.34
-- PHP Version: 8.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
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: `accidents`
--
-- --------------------------------------------------------
--
-- Table structure for table `accidents`
--
CREATE TABLE `accidents` (
`id` int(11) NOT NULL,
`age_conducteur` int(11) NOT NULL,
`date_heure` datetime NOT NULL,
`ville` varchar(50) NOT NULL,
`latitude` float NOT NULL,
`longitude` float NOT NULL,
`id_descr_etat_surf` int(11) NOT NULL,
`id_descr_atmo` int(11) NOT NULL,
`id_descr_dispo_secu` int(11) NOT NULL,
`id_descr_lum` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `descr_atmo`
--
CREATE TABLE `descr_atmo` (
`id` int(11) NOT NULL,
`value` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `descr_atmo`
--
INSERT INTO `descr_atmo` (`id`, `value`) VALUES
(1, 'Normale'),
(2, 'Temps éblouissant'),
(3, 'Temps couvert'),
(4, 'Pluie légère'),
(5, 'Pluie forte'),
(6, 'Neige - grêle'),
(7, 'Vent fort - tempête'),
(8, 'Brouillard - fumée'),
(9, 'Autre');
-- --------------------------------------------------------
--
-- Table structure for table `descr_dispo_secu`
--
CREATE TABLE `descr_dispo_secu` (
`id` int(11) NOT NULL,
`value` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `descr_dispo_secu`
--
INSERT INTO `descr_dispo_secu` (`id`, `value`) VALUES
(1, 'Utilisation d\'une ceinture de sécurité'),
(2, 'Utilisation d\'un dispositif enfant'),
(3, 'Utilisation d\'un équipement réfléchissant'),
(4, 'Utilisation d\'un casque'),
(5, 'Présence de ceinture de sécurité non utilisée'),
(6, 'Présence d\'une ceinture de sécurité - Utilisation non déterminable'),
(7, 'Présence d\'un dispositif enfant non utilisé'),
(8, 'Présence d\'un casque non utilisé'),
(9, 'Présence d\'un casque - Utilisation non déterminable'),
(10, 'Présence d\'un équipement réfléchissant non utilisé'),
(11, 'Présence équipement réfléchissant - Utilisation non déterminable'),
(12, 'Autre - Non déterminable'),
(13, 'Autre - Non utilisé');
-- --------------------------------------------------------
--
-- Table structure for table `descr_etat_surf`
--
CREATE TABLE `descr_etat_surf` (
`id` int(11) NOT NULL,
`value` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `descr_etat_surf`
--
INSERT INTO `descr_etat_surf` (`id`, `value`) VALUES
(1, 'Normale'),
(2, 'Flaques'),
(3, 'Mouillée'),
(4, 'Inondée'),
(5, 'Boue'),
(6, 'Corps gras - huile'),
(7, 'Verglacée'),
(8, 'Enneigée'),
(9, 'Autre');
-- --------------------------------------------------------
--
-- Table structure for table `descr_lum`
--
CREATE TABLE `descr_lum` (
`id` int(11) NOT NULL,
`value` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `descr_lum`
--
INSERT INTO `descr_lum` (`id`, `value`) VALUES
(1, 'Plein jour'),
(2, 'Crépuscule ou aube'),
(3, 'Nuit avec éclairage public allumé'),
(4, 'Nuit avec éclairage public non allumé'),
(5, 'Nuit sans éclairage public');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `accidents`
--
ALTER TABLE `accidents`
ADD PRIMARY KEY (`id`),
ADD KEY `accidents_descr_etat_surf_FK` (`id_descr_etat_surf`),
ADD KEY `accidents_descr_atmo0_FK` (`id_descr_atmo`),
ADD KEY `accidents_descr_dispo_secu1_FK` (`id_descr_dispo_secu`),
ADD KEY `accidents_descr_lum2_FK` (`id_descr_lum`);
--
-- Indexes for table `descr_atmo`
--
ALTER TABLE `descr_atmo`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `descr_dispo_secu`
--
ALTER TABLE `descr_dispo_secu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `descr_etat_surf`
--
ALTER TABLE `descr_etat_surf`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `descr_lum`
--
ALTER TABLE `descr_lum`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `accidents`
--
ALTER TABLE `accidents`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `descr_atmo`
--
ALTER TABLE `descr_atmo`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `descr_dispo_secu`
--
ALTER TABLE `descr_dispo_secu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `descr_etat_surf`
--
ALTER TABLE `descr_etat_surf`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `descr_lum`
--
ALTER TABLE `descr_lum`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `accidents`
--
ALTER TABLE `accidents`
ADD CONSTRAINT `accidents_descr_atmo0_FK` FOREIGN KEY (`id_descr_atmo`) REFERENCES `descr_atmo` (`id`),
ADD CONSTRAINT `accidents_descr_dispo_secu1_FK` FOREIGN KEY (`id_descr_dispo_secu`) REFERENCES `descr_dispo_secu` (`id`),
ADD CONSTRAINT `accidents_descr_etat_surf_FK` FOREIGN KEY (`id_descr_etat_surf`) REFERENCES `descr_etat_surf` (`id`),
ADD CONSTRAINT `accidents_descr_lum2_FK` FOREIGN KEY (`id_descr_lum`) REFERENCES `descr_lum` (`id`);
COMMIT;
/*!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 */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment