SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";! SET time_zone = "+00:00";!



Similar documents
Relational Schema of Database:

TP : Système de messagerie - Fichiers properties - PrepareStatement

Multimedia im Netz Online Multimedia Winter semester 2015/16

Thursday, February 7, DOM via PHP

Mul$media im Netz (Online Mul$media) Wintersemester 2014/15. Übung 03 (Nebenfach)

A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks

Introduction Les failles les plus courantes Les injections SQL. Failles Web. Maxime Arthaud. net7. Jeudi 03 avril 2014.

Proxy IMAP/POP/SMTP securisé avec Perdition, Postfix et SASL

Designing and Implementing an Online Bookstore Website

MS ACCESS DATABASE DATA TYPES

site et appel d'offres

Application note: Connecting the to a Database

Using SQL Server Management Studio

Liste d'adresses URL

Corrigés des exercices SQL pour MySQL

Database Administration with MySQL

CodeIgniter for Rapid PHP Application Development

Web Application Development Using UML

--Nom: Laurent Senécal-Léonard

Is Paradox a good front-end for MySql?

IRF2000 IWL3000 SRC1000 Application Note - Apps with OSGi - Condition Monitoring with WWH push

--- Vincent Hamel, hamv

Memo bconsole. Memo bconsole

Brazil + JDBC Juin 2001, douin@cnam.fr

PostGIS Integration Tips

By : Ashish Modi. CRUD USING PHP (Create, Read, Update and Delete on Database) Create Database and Table using following Sql Syntax.

A basic create statement for a simple student table would look like the following.

MINING DATA BANK OF THE ACP STATES

Tutorial: How to Use SQL Server Management Studio from Home

CSCI110 Exercise 4: Database - MySQL

Modifier le texte d'un élément d'un feuillet, en le spécifiant par son numéro d'index:

Customer Bank Account Management System Technical Specification Document

A Brief Introduction to MySQL

SOCIAL NETWORKING IN SMARTPHONE THROUGH A PROTOTYPE IMPLEMENTATION USING ANDROID

SVN Authentication and Authorization

Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

SoftwarePlanner Active Directory Authentication

RAPPORT FINANCIER ANNUEL PORTANT SUR LES COMPTES 2014

A table is a collection of related data entries and it consists of columns and rows.

Building Data-centric Websites with Dataface. Steve Hannah Faculty of Applied Sciences Simon Fraser University

Web application for groups reservation is an additional module which can be bought in addition to Wise Timetable desktop application.

MYSQL DATABASE ACCESS WITH PHP

In This Lecture. Security and Integrity. Database Security. DBMS Security Support. Privileges in SQL. Permissions and Privilege.

Websense SQL Queries. David Buyer June 2009

TP : Configuration de routeurs CISCO

Aucune validation n a été faite sur l exemple.

PROCEDURE INSERTION(NUM IN EMPLOYES.NUMEMP%TYPE, NOM VARCHAR2, PRENOM IN VARCHAR2, PPHOTO IN BLOB, SALAIRE IN NUMBER);


SQL Injection. Blossom Hands-on exercises for computer forensics and security

MySQL+HandlerSocket=NoSQL

MySQL quick start guide

Creating a management system for customer information for a small business CASE: Botisto. Timo Aho

STUDENT APPLICATION FORM (Dossier d Inscription) ACADEMIC YEAR (Année Scolaire )

You can choose to install the plugin through Magento Connect or by directly using the archive files.

IMPLEMENTATION OF SUBJECTSPLUS AT ZAMAN UNIVERSITY, CAMBODIA

Update a MS

Scenario: Law Office Management System / Law (Legal) Practice Management System

How to install phpbb forum on NTU student club web server

Licence Informatique Année Exceptions

A Project Presentation on Online Car Rental System

Online shopping store

Asterisk Cluster with MySQL Replication. JR Richardson Engineering for the Masses

How To Get A Culinary Degree At L.Institut Paul Bocuse

Extracting META information from Interbase/Firebird SQL (INFORMATION_SCHEMA)

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Oracle Database 10g Express

Report on the Train Ticketing System

Document From MAXIMUM BUSINESS INFORMATION TECHNOLOGY ON A. OwnCloud User Manual. TO I Cafe`

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

AUTHENTICATION... 2 Step 1:Set up your LDAP server... 2 Step 2: Set up your username... 4 WRITEBACK REPORT... 8 Step 1: Table structures...

Brest. Backup : copy flash:ppe_brest1 running-config

Bibliothèque numérique de l enssib

Description of training units (of each module

PassMark Software BurnInTest Management Console. Quick start guide

Version of this tutorial: 1.06a (this tutorial will going to evolve with versions of NWNX4)

Using ODBC with MDaemon 6.5

Database Security. Principle of Least Privilege. DBMS Security. IT420: Database Management and Organization. Database Security.


DIPLOMA IN WEBDEVELOPMENT

MySQL Quick Start Guide

TP1 : Correction. Rappels : Stream, Thread et Socket TCP

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)

Microsoft SQL connection to Sysmac NJ Quick Start Guide

Magento Customization With Extensions. Ashley Schroder aschroder.com

Employee Management System

Administrer les solutions Citrix XenApp et XenDesktop 7.6 CXD-203

Régression logistique : introduction

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

Chapter 30 Exporting Inventory Management System Data

Calcul parallèle avec R

Magento Dhru Fusion Integration Extension. IMEI Profile Configuration

An Introduction to Developing ez Publish Extensions

Using Netbeans and the Derby Database for Projects Contents

equate Installation QUICK START GUIDE

The SkySQL Administration Console

APPLICATION PROGRAM INTERFACE (API) FOR AIRASSURE WEB PM2.5 SOFTWARE

We begin with a number of definitions, and follow through to the conclusion of the installation.

!"# $ %& '( ! %& $ ' &)* + ! * $, $ (, ( '! -,) (# *&23. mysql> select * from from clienti;

Transcription:

-- phpmyadmin SQL Dump -- version 4.1.3 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Lun 19 Mai 2014 à 15:06 -- Version du serveur : 5.6.15 -- Version de PHP : 5.4.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 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 utf8 */; -- -- Base de données : `cte` -- -- -- Structure de la table `homeworks` -- -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `homeworks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `created` datetime DEFAULT NULL, `end` datetime DEFAULT NULL, `content` longtext, `unit_id` int(11) NOT NULL, `promotion_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `fk_homeworks_units_idx` (`unit_id`), KEY `fk_homeworks_promotions1_idx` (`promotion_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Contenu de la table `homeworks` -- INSERT INTO `homeworks` (`id`, `created`, `end`, `content`, `unit_id`, `promotion_id`) VALUES (1, '2014-04-30 12:05:16', '2014-05-06 06:33:00', 'fonctions sql à intégrées', 3, 1), (2, '2014-05-06 06:52:41', '2014-05-15 06:52:00', 'Faire un cv', 2, 1); -- -------------------------------------------------------- -- -- Structure de la table `interventions` -- CREATE TABLE IF NOT EXISTS `interventions` ( `id` int(11) NOT NULL AUTO_INCREMENT,

`dateintervention` datetime DEFAULT NULL, `duration` decimal(10,0) DEFAULT NULL, `contents` longtext, `label` varchar(255) DEFAULT NULL, `ip` varchar(255) DEFAULT NULL, `unit_id` int(11) NOT NULL, `promotion_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `fk_interventions_units1_idx` (`unit_id`), KEY `fk_interventions_promotions1_idx` (`promotion_id`), KEY `fk_interventions_users1_idx` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; -- -- Contenu de la table `interventions` -- INSERT INTO `interventions` (`id`, `dateintervention`, `duration`, `contents`, `label`, `ip`, `unit_id`, `promotion_id`, `user_id`) VALUES (1, '2014-05-06 06:37:00', '4', 'Préparation d''un CV en anglais et d''une lettre de motivation.', 'CV & Lettre de motivation', '::1', 2, 1, 1), (2, '2014-05-06 06:31:00', '1', 'Cours sur les suites puis exercices', 'Chapitre 3 : Les suites numériques', '::1', 3, 1, 24), (4, '2014-05-06 07:45:00', '1', 'Exercices dans le livre p234', 'Equation différentielle', '::1', 2, 1, 24), (5, '2014-05-06 07:46:00', '2', 'Exercices de la page 123', 'Probabilités', '::1', 2, 1, 24), (6, '2014-05-03 14:46:00', '4', 'Exercice d''algorithme', 'Algorithme', '::1', 2, 1, 24), (7, '2014-03-07 12:47:00', '4', 'Découverte de la moyenne, médiane et écart type.', 'Statistiques', ':: 1', 2, 1, 24), (8, '2014-05-06 08:01:00', '4', 'Présentation du cte', 'CTE', '::1', 2, 1, 24); -- -------------------------------------------------------- -- -- Structure de la table `programs` -- CREATE TABLE IF NOT EXISTS `programs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `date` date DEFAULT NULL, `url` text, `unit_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `fk_programs_units1_idx` (`unit_id`) -- -- Contenu de la table `programs` -- INSERT INTO `programs` (`id`, `date`, `url`, `unit_id`) VALUES (2, '2014-05-06', 'Syllabus/D43protecBDD.pdf', 2); ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -------------------------------------------------------- --

-- Structure de la table `promotions` -- CREATE TABLE IF NOT EXISTS `promotions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `promotion_type_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `fk_promotions_promotion_types1_idx` (`promotion_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Contenu de la table `promotions` -- INSERT INTO `promotions` (`id`, `name`, `promotion_type_id`) VALUES (1, 'B11', 1), (2, 'B2', 2); -- -- Structure de la table `promotion_types` -- -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `promotion_types` ( `id` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Contenu de la table `promotion_types` -- INSERT INTO `promotion_types` (`id`, `label`) VALUES (1, 'Alternant'), (2, 'Initiaux'); -- -- Structure de la table `tests` -- CREATE TABLE IF NOT EXISTS `tests` ( -- -------------------------------------------------------- `id` int(11) NOT NULL AUTO_INCREMENT, `contents` longtext, `date` date DEFAULT NULL, `correction` tinyint(1) DEFAULT NULL, `url` text, `intervention_id` int(11) NOT NULL, `test_type_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `fk_tests_interventions1_idx` (`intervention_id`), KEY `fk_tests_test_types1_idx` (`test_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Contenu de la table `tests` -- INSERT INTO `tests` (`id`, `contents`, `date`, `correction`, `url`, `intervention_id`, `test_type_id`) VALUES (1, 'Evaluation\r\n\r\nRésoudre la fonction Un=x+y-z', '2014-04-30', 1, '', 2, 2); -- -------------------------------------------------------- -- -- Structure de la table `test_types` -- CREATE TABLE IF NOT EXISTS `test_types` ( `id` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Contenu de la table `test_types` -- INSERT INTO `test_types` (`id`, `label`) VALUES (1, 'Partiel'), (2, 'Controle'); -- -- Structure de la table `units` -- CREATE TABLE IF NOT EXISTS `units` ( -- -------------------------------------------------------- `id` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; -- -- Contenu de la table `units` -- INSERT INTO `units` (`id`, `label`) VALUES (2, 'Anglais'), (3, 'Mathématiques'); -- -- Structure de la table `units_promotions` -- -- --------------------------------------------------------

CREATE TABLE IF NOT EXISTS `units_promotions` ( `unit_id` int(11) NOT NULL, `promotion_id` int(11) NOT NULL, PRIMARY KEY (`unit_id`,`promotion_id`), KEY `fk_units_has_promotions_promotions1_idx` (`promotion_id`), KEY `fk_units_has_promotions_units1_idx` (`unit_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `units_promotions` -- INSERT INTO `units_promotions` (`unit_id`, `promotion_id`) VALUES (2, 1); -- -- Structure de la table `users` -- CREATE TABLE IF NOT EXISTS `users` ( -- -------------------------------------------------------- `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(45) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `nom` varchar(255) DEFAULT NULL, `prenom` varchar(255) DEFAULT NULL, `admin` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=26 ; -- -- Contenu de la table `users` -- INSERT INTO `users` (`id`, `username`, `password`, `nom`, `prenom`, `admin`) VALUES (1, 'anglais', 'b691b6aa9c5bf5fcaa782ebb77e2c3162fb6bfd5', 'Ferrand', 'Jean-Jacques', 0), (3, 'admin', 'd518f6ed16f4c3790bb806cd3242723af986c695', 'Alamasset', 'Eddie', 1), (22, 'tonton', 'd518f6ed16f4c3790bb806cd3242723af986c695', 'Ocre', 'Thierry', 0), (24, 'root', 'b691b6aa9c5bf5fcaa782ebb77e2c3162fb6bfd5', 'Pruvost', 'Benjamin', 0), (25, 'Lefbvre', '3c6bb6097296f3f65891e3f5d9963261f8284cb2', 'Lefebvre', 'Patrick', 0); -- -------------------------------------------------------- -- -- Structure de la table `users_units` -- CREATE TABLE IF NOT EXISTS `users_units` ( `user_id` int(11) NOT NULL, `unit_id` int(11) NOT NULL, PRIMARY KEY (`user_id`,`unit_id`), KEY `fk_users_has_units_units1_idx` (`unit_id`), KEY `fk_users_has_units_users1_idx` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- -- Contenu de la table `users_units` -- INSERT INTO `users_units` (`user_id`, `unit_id`) VALUES (1, 2), (24, 2), (24, 3); -- -- Contraintes pour les tables exportées -- -- -- Contraintes pour la table `homeworks` -- ALTER TABLE `homeworks` ADD CONSTRAINT `fk_homeworks_promotions1` FOREIGN KEY (`promotion_id`) REFERENCES `promotions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_homeworks_units` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Contraintes pour la table `interventions` -- ALTER TABLE `interventions` ADD CONSTRAINT `fk_interventions_promotions1` FOREIGN KEY (`promotion_id`) REFERENCES `promotions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_interventions_units1` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_interventions_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Contraintes pour la table `programs` -- ALTER TABLE `programs` ADD CONSTRAINT `fk_programs_units1` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Contraintes pour la table `promotions` -- ALTER TABLE `promotions` ADD CONSTRAINT `fk_promotions_promotion_types1` FOREIGN KEY (`promotion_type_id`) REFERENCES `promotion_types` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Contraintes pour la table `tests` -- ALTER TABLE `tests` ADD CONSTRAINT `fk_tests_interventions1` FOREIGN KEY (`intervention_id`) REFERENCES `interventions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_tests_test_types1` FOREIGN KEY (`test_type_id`) REFERENCES `test_types` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

-- -- Contraintes pour la table `units_promotions` -- ALTER TABLE `units_promotions` ADD CONSTRAINT `fk_units_has_promotions_promotions1` FOREIGN KEY (`promotion_id`) REFERENCES `promotions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_units_has_promotions_units1` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Contraintes pour la table `users_units` -- ALTER TABLE `users_units` ADD CONSTRAINT `fk_users_has_units_units1` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_users_has_units_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; /*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 */;