mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
Première version de la structure de la BDD
This commit is contained in:
216
code/sql/telereview.sql
Normal file
216
code/sql/telereview.sql
Normal file
@@ -0,0 +1,216 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 4.9.5deb2
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: localhost:3306
|
||||
-- Generation Time: Dec 23, 2022 at 05:51 PM
|
||||
-- Server version: 8.0.31-0ubuntu0.20.04.1
|
||||
-- PHP Version: 7.4.3
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET AUTOCOMMIT = 0;
|
||||
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: `telereview`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `auteurs`
|
||||
--
|
||||
|
||||
CREATE TABLE `auteurs` (
|
||||
`id` int NOT NULL,
|
||||
`sexe` tinytext NOT NULL,
|
||||
`age` tinyint NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `avis_borne`
|
||||
--
|
||||
|
||||
CREATE TABLE `avis_borne` (
|
||||
`id` int NOT NULL,
|
||||
`id_auteur` int NOT NULL,
|
||||
`date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`note_principale` tinyint NOT NULL,
|
||||
`notes_autre` text NOT NULL COMMENT 'Liste d''entiers séparés par des ; => notes sur des aspects spécifiques',
|
||||
`commentaire` text NOT NULL,
|
||||
`source_id` int NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `reseaux_sociaux_auteurs`
|
||||
--
|
||||
|
||||
CREATE TABLE `reseaux_sociaux_auteurs` (
|
||||
`id` int NOT NULL,
|
||||
`nom_utilisateur` text NOT NULL,
|
||||
`source_id` int NOT NULL,
|
||||
`lien` text NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `reseaux_sociaux_avis`
|
||||
--
|
||||
|
||||
CREATE TABLE `reseaux_sociaux_avis` (
|
||||
`id` int NOT NULL,
|
||||
`date` date NOT NULL,
|
||||
`source_id` int NOT NULL,
|
||||
`note` tinyint NOT NULL,
|
||||
`texte` text NOT NULL,
|
||||
`auteur_id` int NOT NULL,
|
||||
`lien_source` text NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `reseaux_sociaux_sources`
|
||||
--
|
||||
|
||||
CREATE TABLE `reseaux_sociaux_sources` (
|
||||
`id` int NOT NULL,
|
||||
`nom` text NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `sources`
|
||||
--
|
||||
|
||||
CREATE TABLE `sources` (
|
||||
`id` int NOT NULL,
|
||||
`nom` text NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `stats_mois`
|
||||
--
|
||||
|
||||
CREATE TABLE `stats_mois` (
|
||||
`id` int NOT NULL,
|
||||
`ddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`moyenne_globale` float NOT NULL,
|
||||
`moyenne_site` float NOT NULL,
|
||||
`moyenne_borne` float NOT NULL,
|
||||
`moyenne_autres` text NOT NULL COMMENT 'Nombres séparés par des ; => moyennes spécifiques',
|
||||
`dist_age` text NOT NULL COMMENT 'Distribution de l''age des auteurs',
|
||||
`dist_sexe` text NOT NULL COMMENT 'Distribution du sexe des auteurs'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `auteurs`
|
||||
--
|
||||
ALTER TABLE `auteurs`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `avis_borne`
|
||||
--
|
||||
ALTER TABLE `avis_borne`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `reseaux_sociaux_auteurs`
|
||||
--
|
||||
ALTER TABLE `reseaux_sociaux_auteurs`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `reseaux_sociaux_avis`
|
||||
--
|
||||
ALTER TABLE `reseaux_sociaux_avis`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `reseaux_sociaux_sources`
|
||||
--
|
||||
ALTER TABLE `reseaux_sociaux_sources`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `sources`
|
||||
--
|
||||
ALTER TABLE `sources`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `stats_mois`
|
||||
--
|
||||
ALTER TABLE `stats_mois`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `auteurs`
|
||||
--
|
||||
ALTER TABLE `auteurs`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `avis_borne`
|
||||
--
|
||||
ALTER TABLE `avis_borne`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `reseaux_sociaux_auteurs`
|
||||
--
|
||||
ALTER TABLE `reseaux_sociaux_auteurs`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `reseaux_sociaux_avis`
|
||||
--
|
||||
ALTER TABLE `reseaux_sociaux_avis`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `reseaux_sociaux_sources`
|
||||
--
|
||||
ALTER TABLE `reseaux_sociaux_sources`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `sources`
|
||||
--
|
||||
ALTER TABLE `sources`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `stats_mois`
|
||||
--
|
||||
ALTER TABLE `stats_mois`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
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 */;
|
||||
Reference in New Issue
Block a user