-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.45-Debian_1ubuntu3.1-log /*!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 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -- -- Create schema tutoMvc -- CREATE DATABASE IF NOT EXISTS tutoMvc; USE tutoMvc; -- -- Definition of table `tutoMvc`.`diplome` -- DROP TABLE IF EXISTS `tutoMvc`.`diplome`; CREATE TABLE `tutoMvc`.`diplome` ( `id` int(11) NOT NULL auto_increment, `libelle` varchar(100) NOT NULL, `nbMinSemainesStage` int(11) NOT NULL default '0', `idResponsable` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `resp_diplome_fk_constraint` (`idResponsable`), CONSTRAINT `resp_diplome_fk_constraint` FOREIGN KEY (`idResponsable`) REFERENCES `enseignant` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tutoMvc`.`diplome` -- /*!40000 ALTER TABLE `diplome` DISABLE KEYS */; LOCK TABLES `diplome` WRITE; INSERT INTO `tutoMvc`.`diplome` VALUES (1,'BTS Informatique de Gestion',12,1), (2,'BTS Biotechnologies',14,1), (3,'BTS Design de Produits',4,2), (4,'B2i - Brevet informatique et internet',0,2); UNLOCK TABLES; /*!40000 ALTER TABLE `diplome` ENABLE KEYS */; -- -- Definition of table `tutoMvc`.`enseignant` -- DROP TABLE IF EXISTS `tutoMvc`.`enseignant`; CREATE TABLE `tutoMvc`.`enseignant` ( `id` int(11) NOT NULL auto_increment, `nom` varchar(50) NOT NULL, `prenom` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tutoMvc`.`enseignant` -- /*!40000 ALTER TABLE `enseignant` DISABLE KEYS */; LOCK TABLES `enseignant` WRITE; INSERT INTO `tutoMvc`.`enseignant` VALUES (1,'nomEns1','prenomEns1'), (2,'nomEns2','prenomEns2'); UNLOCK TABLES; /*!40000 ALTER TABLE `enseignant` ENABLE KEYS */; -- -- Definition of table `tutoMvc`.`etudiant` -- DROP TABLE IF EXISTS `tutoMvc`.`etudiant`; CREATE TABLE `tutoMvc`.`etudiant` ( `id` int(11) NOT NULL auto_increment, `nom` varchar(50) NOT NULL, `prenom` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tutoMvc`.`etudiant` -- /*!40000 ALTER TABLE `etudiant` DISABLE KEYS */; LOCK TABLES `etudiant` WRITE; INSERT INTO `tutoMvc`.`etudiant` VALUES (1,'nomA','prenomA'), (2,'nomB','prenomB'), (3,'nomC','prenomC'), (4,'nomD','prenomD'), (5,'nomE','prenomE'), (6,'nomF','prenomF'), (7,'nomG','prenomG'), (8,'nomH','prenomH'), (9,'nomI','prenomI'), (10,'nomJ','prenomJ'); UNLOCK TABLES; /*!40000 ALTER TABLE `etudiant` ENABLE KEYS */; -- -- Definition of table `tutoMvc`.`inscription` -- DROP TABLE IF EXISTS `tutoMvc`.`inscription`; CREATE TABLE `tutoMvc`.`inscription` ( `idEtudiant` int(11) NOT NULL, `idDiplome` int(11) NOT NULL, `nbSemainesStage` int(11) NOT NULL default '0', `note` decimal(4,2) default NULL, PRIMARY KEY (`idEtudiant`,`idDiplome`), KEY `res_diplome_fk_constraint` (`idDiplome`), CONSTRAINT `res_diplome_fk_constraint` FOREIGN KEY (`idDiplome`) REFERENCES `diplome` (`id`), CONSTRAINT `res_etudiant_fk_constraint` FOREIGN KEY (`idEtudiant`) REFERENCES `etudiant` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tutoMvc`.`inscription` -- /*!40000 ALTER TABLE `inscription` DISABLE KEYS */; LOCK TABLES `inscription` WRITE; INSERT INTO `tutoMvc`.`inscription` VALUES (1,1,14,'13.40'), (1,4,18,'0.00'), (2,1,12,'9.00'), (2,4,19,'0.00'), (3,1,12,NULL), (3,4,9,'0.00'); UNLOCK TABLES; /*!40000 ALTER TABLE `inscription` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!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 */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;