-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Client: 127.0.0.1 -- Généré le: Ven 24 Octobre 2014 à 04:25 -- Version du serveur: 5.5.27-log -- Version de PHP: 5.4.6 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: `notes` -- CREATE DATABASE `notes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `notes`; -- -------------------------------------------------------- -- -- Structure de la table `admin` -- DROP TABLE IF EXISTS `admin`; CREATE TABLE IF NOT EXISTS `admin` ( `pread` varchar(2) NOT NULL DEFAULT 'AD', `idad` int(11) NOT NULL AUTO_INCREMENT, `nomad` varchar(25) NOT NULL, `prenomad` varchar(60) NOT NULL, `telad` varchar(12) NOT NULL, `tel2ad` varchar(12) NOT NULL, `mailad` varchar(60) NOT NULL, `passead` varchar(255) NOT NULL, `photoad` varchar(25) NOT NULL DEFAULT 'avatarad.jpg', PRIMARY KEY (`idad`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Contenu de la table `admin` -- INSERT INTO `admin` (`pread`, `idad`, `nomad`, `prenomad`, `telad`, `tel2ad`, `mailad`, `passead`, `photoad`) VALUES ('AD', 1, 'TALL', 'Mouhamed', '778555456', '', 'tallamoust@gmail.com', '89e495e7941cf9e40e6980d14a16bf023ccd4c91', 'avatarad.jpg'), ('AD', 2, 'FALL', 'Ahmed', '657678789', '', '', 'db61277694fea41b42a8ac82cbb678baac683990', 'avatarad.jpg'); -- -------------------------------------------------------- -- -- Structure de la table `classe` -- DROP TABLE IF EXISTS `classe`; CREATE TABLE IF NOT EXISTS `classe` ( `classe` varchar(20) NOT NULL, PRIMARY KEY (`classe`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `classe` -- INSERT INTO `classe` (`classe`) VALUES (''), ('1iere'), ('2nde'), ('3ieme'), ('4ieme'), ('5iem'), ('6iem'), ('Tle'); -- -------------------------------------------------------- -- -- Structure de la table `coeficient` -- DROP TABLE IF EXISTS `coeficient`; CREATE TABLE IF NOT EXISTS `coeficient` ( `idcoef` int(11) NOT NULL AUTO_INCREMENT, `matierec` varchar(25) NOT NULL, `seriec` varchar(5) NOT NULL, `coef` int(11) NOT NULL, PRIMARY KEY (`idcoef`), KEY `matierec` (`matierec`,`seriec`), KEY `seriec` (`seriec`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ; -- -- Contenu de la table `coeficient` -- INSERT INTO `coeficient` (`idcoef`, `matierec`, `seriec`, `coef`) VALUES (1, 'Anglais', 'L1', 3), (2, 'Anglais', 'L2', 4), (3, 'Anglais', 'S1', 1), (4, 'Anglais', 'S2', 2), (5, 'Français', 'L1', 5), (6, 'Français', 'L2', 3), (7, 'Français', 'S1', 2), (8, 'Français', 'S2', 1), (9, 'Mathematique', 'L1', 2), (10, 'Mathematique', 'L2', 3), (11, 'Mathematique', 'S1', 5), (12, 'Mathematique', 'S2', 3), (13, 'Philo', 'L1', 4), (14, 'Philo', 'L2', 5), (15, 'Philo', 'S1', 1), (16, 'Philo', 'S2', 1); -- -------------------------------------------------------- -- -- Structure de la table `ecole` -- DROP TABLE IF EXISTS `ecole`; CREATE TABLE IF NOT EXISTS `ecole` ( `nomEc` varchar(50) NOT NULL, `refEc` varchar(50) NOT NULL, `adresseEc` text NOT NULL, `villeEc` varchar(35) NOT NULL DEFAULT 'Guediawaye/Senegal', `telEc` varchar(21) NOT NULL, `mailEc` varchar(50) NOT NULL, `siteEc` varchar(50) NOT NULL, `sessionEc` varchar(9) NOT NULL DEFAULT '2013/2014' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `ecole` -- INSERT INTO `ecole` (`nomEc`, `refEc`, `adresseEc`, `villeEc`, `telEc`, `mailEc`, `siteEc`, `sessionEc`) VALUES ('Lycee Banque Islamique', 'NINEA 2566R586G', 'cite des enseignants pres de Keur serigne Mansour SY', 'Guediawaye/Senegal', '71966366', 'lyceebanque@yahoo.fr', '', '2013/2014'); -- -------------------------------------------------------- -- -- Structure de la table `eleve` -- DROP TABLE IF EXISTS `eleve`; CREATE TABLE IF NOT EXISTS `eleve` ( `pre` varchar(2) NOT NULL DEFAULT 'EL', `ideleve` int(11) NOT NULL AUTO_INCREMENT, `nomEl` varchar(25) NOT NULL, `prenomEl` varchar(50) NOT NULL, `classeEl` varchar(20) NOT NULL, `serieEl` varchar(5) NOT NULL, `lv1El` varchar(25) NOT NULL, `lv2El` varchar(25) NOT NULL, `cr` varchar(20) NOT NULL, `session` varchar(9) NOT NULL, PRIMARY KEY (`ideleve`), KEY `ClasseEl` (`classeEl`,`serieEl`,`lv1El`,`lv2El`,`cr`,`session`), KEY `session` (`session`), KEY `cr` (`cr`), KEY `lv2El` (`lv2El`), KEY `lv1El` (`lv1El`), KEY `serieEl` (`serieEl`), KEY `ClasseEl_2` (`classeEl`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ; -- -- Contenu de la table `eleve` -- INSERT INTO `eleve` (`pre`, `ideleve`, `nomEl`, `prenomEl`, `classeEl`, `serieEl`, `lv1El`, `lv2El`, `cr`, `session`) VALUES ('EL', 4, 'SALL', 'Mouhamed Amdy', '3ieme', 'L1', '', '', '', '2013/2014'), ('EL', 5, 'TALL', 'Fatoubintou', '3ieme', 'L1', '', '', '', '2013/2014'), ('EL', 6, 'DIAME', 'Alamine', '3ieme', 'L1', '', '', '', '2013/2014'), ('EL', 7, 'NDIAYE', 'Babacar', '3ieme', 'L1', '', '', '4ieme', '2012/2013'), ('EL', 8, 'DIAWARA', 'Maimouna', '4ieme', 'L2', '', '', '', '2013/2014'), ('EL', 9, 'SAGNA', 'Landing', '4ieme', 'L2', '', '', '', '2013/2014'), ('EL', 10, 'TALL', 'Elimane', '4ieme', 'S1', '', '', '6iem', '2013/2014'), ('EL', 11, 'CISSE', 'Daba', '4ieme', 'S1', '', '', '', '2013/2014'), ('EL', 12, 'BADJI', 'Mamadou', '5iem', '', '', '', '', '2013/2014'), ('EL', 13, 'LO', 'Rama', '5iem', '', '', '', '', '2013/2014'), ('EL', 14, 'KANE', 'Khady', '3ieme', 'S1', '', '', '', '2013/2014'), ('EL', 15, 'GAYE', 'Nana', '3ieme', 'S1', '', '', '', '2013/2014'), ('EL', 16, 'DIA', 'Aminta', '3ieme', 'S1', '', '', '', '2013/2014'), ('EL', 17, 'Aris', 'Mussa', 'Tle', 'L1', 'Anglais', '', '', '2013/2014'), ('EL', 18, 'DIATTA', 'Mamadou', 'Tle', 'L2', 'Anglais', '', '', '2013/2014'), ('EL', 19, 'NDIAYE', 'Fatou', 'Tle', 'S1', 'Anglais', '', '', '2013/2014'), ('EL', 20, 'Dieye', 'Maguette', 'Tle', 'S2', '', 'Anglais', '', '2013/2014'); -- -------------------------------------------------------- -- -- Structure de la table `lv1` -- DROP TABLE IF EXISTS `lv1`; CREATE TABLE IF NOT EXISTS `lv1` ( `classelv1` varchar(25) NOT NULL, `serielv1` varchar(5) NOT NULL, `matierelv1` varchar(25) NOT NULL, `coeflv1` int(11) NOT NULL, KEY `classelv1` (`classelv1`,`serielv1`,`matierelv1`,`coeflv1`), KEY `classelv1_2` (`classelv1`), KEY `serielv1` (`serielv1`), KEY `matierelv1` (`matierelv1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `lv1` -- INSERT INTO `lv1` (`classelv1`, `serielv1`, `matierelv1`, `coeflv1`) VALUES ('Tle', 'L1', 'Anglais', 4), ('Tle', 'L1', 'Arabe', 3), ('Tle', 'L1', 'Espagnol', 2), ('Tle', 'L1', 'Russe', 3), ('Tle', 'L2', 'Anglais', 2), ('Tle', 'L2', 'Arabe', 3), ('Tle', 'L2', 'Espagnol', 3), ('Tle', 'L2', 'Russe', 3), ('Tle', 'S1', 'Anglais', 3), ('Tle', 'S1', 'Arabe', 4); -- -------------------------------------------------------- -- -- Structure de la table `lv2` -- DROP TABLE IF EXISTS `lv2`; CREATE TABLE IF NOT EXISTS `lv2` ( `classelv2` varchar(20) NOT NULL, `serielv2` varchar(5) NOT NULL, `matierelv2` varchar(25) NOT NULL, `coeflv2` int(2) NOT NULL, KEY `classelv2` (`classelv2`), KEY `serielv2` (`serielv2`), KEY `matierelv2` (`matierelv2`), KEY `coeflv2` (`coeflv2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `lv2` -- INSERT INTO `lv2` (`classelv2`, `serielv2`, `matierelv2`, `coeflv2`) VALUES ('Tle', 'L1', 'Anglais', 2), ('Tle', 'L1', 'Arabe', 3), ('Tle', 'L1', 'Espagnol', 2), ('Tle', 'L1', 'Russe', 1), ('Tle', 'L2', 'Anglais', 2), ('Tle', 'L2', 'Arabe', 2), ('Tle', 'L2', 'Espagnol', 2), ('Tle', 'L2', 'Russe', 2), ('Tle', 'S1', 'Anglais', 2), ('Tle', 'S1', 'Arabe', 1); -- -------------------------------------------------------- -- -- Structure de la table `matiere` -- DROP TABLE IF EXISTS `matiere`; CREATE TABLE IF NOT EXISTS `matiere` ( `matiere` varchar(25) NOT NULL, PRIMARY KEY (`matiere`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `matiere` -- INSERT INTO `matiere` (`matiere`) VALUES (''), ('Anglais'), ('Français'), ('Mathematique'), ('Philo'); -- -------------------------------------------------------- -- -- Structure de la table `matierelv` -- DROP TABLE IF EXISTS `matierelv`; CREATE TABLE IF NOT EXISTS `matierelv` ( `matierelv` varchar(25) NOT NULL, KEY `matierelv` (`matierelv`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `matierelv` -- INSERT INTO `matierelv` (`matierelv`) VALUES ('Anglais'), ('Arabe'), ('Espagnol'), ('Russe'); -- -------------------------------------------------------- -- -- Structure de la table `note` -- DROP TABLE IF EXISTS `note`; CREATE TABLE IF NOT EXISTS `note` ( `idnote` int(11) NOT NULL AUTO_INCREMENT, `idelevenote` int(11) NOT NULL, `matierenote` varchar(25) NOT NULL, `note1` float DEFAULT NULL, `note2` float DEFAULT NULL, `note3` float DEFAULT NULL, `compo1` float DEFAULT NULL, PRIMARY KEY (`idnote`), KEY `idelevenote` (`idelevenote`,`matierenote`), KEY `idelevenote_2` (`idelevenote`), KEY `matierenote` (`matierenote`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=82 ; -- -- Contenu de la table `note` -- INSERT INTO `note` (`idnote`, `idelevenote`, `matierenote`, `note1`, `note2`, `note3`, `compo1`) VALUES (1, 5, 'Anglais', 11, 13, 10, 12), (2, 5, 'Français', 9, 11, 9, 9), (3, 5, 'Mathematique', 12, 0, 12, 0), (4, 5, 'Philo', 0, 15, 0, 18), (5, 6, 'Anglais', 11, 12, 13, 12), (6, 6, 'Français', 0, 0, 12, 12), (7, 6, 'Mathematique', 12, 2, 12, 12), (8, 6, 'Philo', 15, 14, 15, 14), (9, 7, 'Anglais', 11, 0, 13, 14), (10, 7, 'Français', 12, 14, 0, 14), (11, 7, 'Mathematique', 0, 14, 12, 13), (12, 7, 'Philo', 14, 0, 14, 12), (13, 4, 'Anglais', 16, 15, 12, 11), (14, 4, 'Français', 14, 0, 13, 0), (15, 4, 'Mathematique', 7, 6, 0, 0), (16, 4, 'Philo', 12, 10, NULL, 10), (17, 8, 'Anglais', 15, NULL, 12, 12), (18, 8, 'Français', 15, 15, NULL, 12), (19, 8, 'Mathematique', 9, NULL, 10, 8), (20, 8, 'Philo', 12, 12, NULL, 13), (21, 9, 'Anglais', 12, NULL, 13, 12), (22, 9, 'Français', NULL, 12, 12, 10), (23, 9, 'Mathematique', 9, 9, NULL, 10), (24, 9, 'Philo', 11, 14, 13, 14), (25, 10, 'Anglais', 13, 13, NULL, 12), (26, 10, 'Français', NULL, 15, 14, 13), (27, 10, 'Mathematique', 11, 9, NULL, 9), (28, 10, 'Philo', 15, 13, NULL, 14), (34, 11, 'Anglais', 11, 12, 11, 12), (64, 11, 'Mathematique', 11, 11, 11, 11), (67, 11, 'Français', 11, 12, 12, 10), (71, 17, 'Français', 11, 12, 11, 12), (74, 18, 'Mathematique', 10, 10, 11, 12), (76, 17, 'Mathematique', 15, 13, NULL, 12), (78, 18, 'Français', 11, 12, NULL, 11), (79, 19, 'Anglais', 11, NULL, NULL, 11), (80, 20, 'Anglais', 15, 15, NULL, 13); -- -------------------------------------------------------- -- -- Structure de la table `notelv` -- DROP TABLE IF EXISTS `notelv`; CREATE TABLE IF NOT EXISTS `notelv` ( `idnotelv` int(11) NOT NULL AUTO_INCREMENT, `ideleventelv1` int(11) NOT NULL, `matirenotelv1` varchar(25) NOT NULL, `note1lv1` float DEFAULT NULL, `note2lv1` float DEFAULT NULL, `note3lv1` float DEFAULT NULL, `compo1lv1` float DEFAULT NULL, PRIMARY KEY (`idnotelv`), KEY `ideleventelv1` (`ideleventelv1`,`matirenotelv1`), KEY `matirenotelv1` (`matirenotelv1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; -- -- Contenu de la table `notelv` -- INSERT INTO `notelv` (`idnotelv`, `ideleventelv1`, `matirenotelv1`, `note1lv1`, `note2lv1`, `note3lv1`, `compo1lv1`) VALUES (1, 17, 'Anglais', 11, 11, NULL, 12), (2, 18, 'Anglais', 9, 12, NULL, 14), (3, 19, 'Anglais', 14, 16, 14, 12); -- -------------------------------------------------------- -- -- Structure de la table `serie` -- DROP TABLE IF EXISTS `serie`; CREATE TABLE IF NOT EXISTS `serie` ( `serie` varchar(5) NOT NULL, PRIMARY KEY (`serie`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `serie` -- INSERT INTO `serie` (`serie`) VALUES (''), ('L1'), ('L2'), ('S1'), ('S2'); -- -------------------------------------------------------- -- -- Structure de la table `session` -- DROP TABLE IF EXISTS `session`; CREATE TABLE IF NOT EXISTS `session` ( `session` varchar(9) NOT NULL, PRIMARY KEY (`session`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `session` -- INSERT INTO `session` (`session`) VALUES ('2012/2013'), ('2013/2014'); -- -- Contraintes pour les tables exportées -- -- -- Contraintes pour la table `coeficient` -- ALTER TABLE `coeficient` ADD CONSTRAINT `coeficient_ibfk_1` FOREIGN KEY (`matierec`) REFERENCES `matiere` (`matiere`), ADD CONSTRAINT `coeficient_ibfk_2` FOREIGN KEY (`seriec`) REFERENCES `serie` (`serie`); -- -- Contraintes pour la table `eleve` -- ALTER TABLE `eleve` ADD CONSTRAINT `eleve_ibfk_1` FOREIGN KEY (`ClasseEl`) REFERENCES `classe` (`classe`), ADD CONSTRAINT `eleve_ibfk_2` FOREIGN KEY (`serieEl`) REFERENCES `serie` (`serie`), ADD CONSTRAINT `eleve_ibfk_3` FOREIGN KEY (`lv1El`) REFERENCES `matiere` (`matiere`), ADD CONSTRAINT `eleve_ibfk_4` FOREIGN KEY (`lv2El`) REFERENCES `matiere` (`matiere`), ADD CONSTRAINT `eleve_ibfk_5` FOREIGN KEY (`cr`) REFERENCES `classe` (`classe`), ADD CONSTRAINT `eleve_ibfk_6` FOREIGN KEY (`session`) REFERENCES `session` (`session`); -- -- Contraintes pour la table `lv1` -- ALTER TABLE `lv1` ADD CONSTRAINT `lv1_ibfk_1` FOREIGN KEY (`classelv1`) REFERENCES `classe` (`classe`), ADD CONSTRAINT `lv1_ibfk_2` FOREIGN KEY (`serielv1`) REFERENCES `serie` (`serie`), ADD CONSTRAINT `lv1_ibfk_3` FOREIGN KEY (`matierelv1`) REFERENCES `matierelv` (`matierelv`); -- -- Contraintes pour la table `lv2` -- ALTER TABLE `lv2` ADD CONSTRAINT `lv2_ibfk_1` FOREIGN KEY (`classelv2`) REFERENCES `classe` (`classe`), ADD CONSTRAINT `lv2_ibfk_2` FOREIGN KEY (`serielv2`) REFERENCES `serie` (`serie`), ADD CONSTRAINT `lv2_ibfk_3` FOREIGN KEY (`matierelv2`) REFERENCES `matierelv` (`matierelv`); -- -- Contraintes pour la table `note` -- ALTER TABLE `note` ADD CONSTRAINT `note_ibfk_1` FOREIGN KEY (`idelevenote`) REFERENCES `eleve` (`ideleve`), ADD CONSTRAINT `note_ibfk_2` FOREIGN KEY (`matierenote`) REFERENCES `matiere` (`matiere`); -- -- Contraintes pour la table `notelv` -- ALTER TABLE `notelv` ADD CONSTRAINT `notelv_ibfk_1` FOREIGN KEY (`ideleventelv1`) REFERENCES `eleve` (`ideleve`), ADD CONSTRAINT `notelv_ibfk_2` FOREIGN KEY (`matirenotelv1`) REFERENCES `matierelv` (`matierelv`); /*!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 */;