-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Lun 06 Janvier 2014 à 19:22 -- Version du serveur: 5.6.12-log -- Version de PHP: 5.4.16 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: `grh` -- CREATE DATABASE IF NOT EXISTS `grh` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `grh`; -- -------------------------------------------------------- -- -- Structure de la table `contacts` -- CREATE TABLE IF NOT EXISTS `contacts` ( `id_contact` int(11) NOT NULL AUTO_INCREMENT, `log_contact` int(11) NOT NULL, `email` text NOT NULL, `object` varchar(20) NOT NULL, `message` varchar(256) NOT NULL, PRIMARY KEY (`id_contact`), KEY `log_contact` (`log_contact`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Structure de la table `demandes` -- CREATE TABLE IF NOT EXISTS `demandes` ( `id_dem` int(11) NOT NULL AUTO_INCREMENT, `id_demande` int(11) NOT NULL, `cause` varchar(256) NOT NULL, `datedebut` date NOT NULL, `datefin` date NOT NULL, `nbrejours` int(11) NOT NULL, `type` varchar(20) NOT NULL, `statut` text NOT NULL, PRIMARY KEY (`id_dem`), KEY `id_demande` (`id_demande`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='stocke les demandes des congés et d’absences ' AUTO_INCREMENT=3 ; -- -- Contenu de la table `demandes` -- INSERT INTO `demandes` (`id_dem`, `id_demande`, `cause`, `datedebut`, `datefin`, `nbrejours`, `type`, `statut`) VALUES (1, 2, 'malade', '2014-01-30', '2014-02-19', 23, 'congé', 'Accepté'), (2, 3, 'faire un traitement', '2014-01-04', '2014-01-08', 4, 'absence', 'Accepté'); -- -------------------------------------------------------- -- -- Structure de la table `employees` -- CREATE TABLE IF NOT EXISTS `employees` ( `id_employe` int(11) NOT NULL AUTO_INCREMENT, `log_emp` int(11) NOT NULL, `nom` varchar(20) NOT NULL, `prenom` varchar(20) NOT NULL, `CIN` int(255) NOT NULL, `tel` int(20) NOT NULL, `etatcivil` varchar(40) NOT NULL, `dateN` date NOT NULL, `sexe` varchar(20) NOT NULL, `situation` varchar(20) NOT NULL, `nbreenfants` int(5) NOT NULL, `adresse` varchar(256) NOT NULL, `ville` varchar(20) NOT NULL, `email` varchar(20) NOT NULL, PRIMARY KEY (`id_employe`), UNIQUE KEY `id_employe` (`id_employe`), KEY `log_emp` (`log_emp`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Contenu de la table `employees` -- INSERT INTO `employees` (`id_employe`, `log_emp`, `nom`, `prenom`, `CIN`, `tel`, `etatcivil`, `dateN`, `sexe`, `situation`, `nbreenfants`, `adresse`, `ville`, `email`) VALUES (1, 2, 'maamouri', 'amine', 7445678, 234561789, 'dcfg', '2011-06-05', 'homme', 'célébataire', 0, 'tunis', 'tunis', 'm.amine@hotmail.com'), (2, 3, 'maamouri', 'amani', 7655205, 23568977, 'kjfvkvkfvjklgf', '2013-09-03', 'femme', 'En couple', 0, 'ariana', 'nabeul', 'ameni.maamouri@gmail'), (3, 1, 'maamouri', 'syrine', 7447851, 23568768, 'dfddfgrtgtrg', '1980-02-02', 'femme', 'célébataire', 0, '1rue rahla', 'nabeul', 'm.syrine123@hotmail.'); -- -------------------------------------------------------- -- -- Structure de la table `fiche_paie` -- CREATE TABLE IF NOT EXISTS `fiche_paie` ( `date_debut_p` date NOT NULL, `date_fin_p` date NOT NULL, `id_paie` int(20) NOT NULL AUTO_INCREMENT, `log_paie` int(11) NOT NULL, `avances` int(20) NOT NULL, `prime_presence` int(20) NOT NULL, `impot_revenu` int(20) NOT NULL, `indem_transport` int(20) NOT NULL, `indem_complementaire` int(20) NOT NULL, `autres_indem` int(20) NOT NULL, `CNSS` int(11) NOT NULL, PRIMARY KEY (`id_paie`), KEY `log_paie` (`log_paie`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Contenu de la table `fiche_paie` -- INSERT INTO `fiche_paie` (`date_debut_p`, `date_fin_p`, `id_paie`, `log_paie`, `avances`, `prime_presence`, `impot_revenu`, `indem_transport`, `indem_complementaire`, `autres_indem`, `CNSS`) VALUES ('2013-12-01', '2013-12-31', 1, 1, 500, 200, 150, 200, 150, 200, 78269526), ('2013-11-01', '2013-11-30', 2, 2, 200, 150, 70, 200, 200, 500, 123505897); -- -------------------------------------------------------- -- -- Structure de la table `fiche_statique` -- CREATE TABLE IF NOT EXISTS `fiche_statique` ( `id_st` int(11) NOT NULL AUTO_INCREMENT, `N_statique` int(11) NOT NULL, `nbre_conge_demd` int(10) NOT NULL, `nbre_absence` int(10) NOT NULL, `nbre_H_supp` int(20) NOT NULL, `nbre_formations` int(20) NOT NULL, PRIMARY KEY (`id_st`), KEY `N_statique` (`N_statique`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Contenu de la table `fiche_statique` -- INSERT INTO `fiche_statique` (`id_st`, `N_statique`, `nbre_conge_demd`, `nbre_absence`, `nbre_H_supp`, `nbre_formations`) VALUES (1, 1, 5, 6, 15, 3), (2, 2, 4, 6, 20, 3), (3, 3, 4, 10, 12, 7); -- -------------------------------------------------------- -- -- Structure de la table `formations` -- CREATE TABLE IF NOT EXISTS `formations` ( `N_for` int(11) NOT NULL AUTO_INCREMENT, `id_formations` int(11) NOT NULL, `date_debut_f` date NOT NULL, `date_fin_f` date NOT NULL, `sujet_formations` varchar(30) NOT NULL, `lieu_formations` varchar(40) NOT NULL, PRIMARY KEY (`N_for`), KEY `id_formations` (`id_formations`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Contenu de la table `formations` -- INSERT INTO `formations` (`N_for`, `id_formations`, `date_debut_f`, `date_fin_f`, `sujet_formations`, `lieu_formations`) VALUES (1, 1, '2013-12-01', '2013-12-31', 'formation en dev web', 'dans la société'), (2, 2, '2013-12-01', '2013-12-31', 'formation de comptabilité', 'dans la société'); -- -------------------------------------------------------- -- -- Structure de la table `horaires_hebdomataires` -- CREATE TABLE IF NOT EXISTS `horaires_hebdomataires` ( `N` int(11) NOT NULL AUTO_INCREMENT, `id_heures` int(11) NOT NULL, `date_debut_h` date NOT NULL, `date_fin_h` date NOT NULL, `type_jour` varchar(20) NOT NULL, `nbre_jour_h_supp` int(11) NOT NULL, `cout_h_supp` int(11) NOT NULL, PRIMARY KEY (`N`), KEY `id_heures` (`id_heures`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Contenu de la table `horaires_hebdomataires` -- INSERT INTO `horaires_hebdomataires` (`N`, `id_heures`, `date_debut_h`, `date_fin_h`, `type_jour`, `nbre_jour_h_supp`, `cout_h_supp`) VALUES (1, 1, '2014-01-01', '2013-12-31', 'tous', 31, 500), (2, 2, '2013-12-01', '2013-12-24', 'aprés midi', 24, 500); -- -------------------------------------------------------- -- -- Structure de la table `login` -- CREATE TABLE IF NOT EXISTS `login` ( `id_login` int(11) NOT NULL AUTO_INCREMENT, `login` text NOT NULL, `password` text NOT NULL, `groupe` varchar(20) NOT NULL, PRIMARY KEY (`id_login`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; -- -- Contenu de la table `login` -- INSERT INTO `login` (`id_login`, `login`, `password`, `groupe`) VALUES (1, 'syrine', '123', 'admin'), (2, 'amine', '1230', 'employe'), (3, 'ameni', '12345', 'employe'), (4, 'kouloud', '123456', 'employe'), (7, 'asma', '1047', 'admin'); -- -------------------------------------------------------- -- -- Structure de la table `situation_personnel` -- CREATE TABLE IF NOT EXISTS `situation_personnel` ( `Num_situation` int(11) NOT NULL AUTO_INCREMENT, `id_situation` int(11) NOT NULL, `date_embauche` date NOT NULL, `diplome` varchar(256) NOT NULL, `departement` varchar(256) NOT NULL, `fonction` varchar(256) NOT NULL, PRIMARY KEY (`Num_situation`), KEY `id_situation` (`id_situation`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Contenu de la table `situation_personnel` -- INSERT INTO `situation_personnel` (`Num_situation`, `id_situation`, `date_embauche`, `diplome`, `departement`, `fonction`) VALUES (1, 1, '2013-02-04', 'informatique', 'informatique', 'responsable labo inf'), (2, 2, '2013-01-06', 'comptabilité', 'financiére', 'responsable trésorerie'), (3, 3, '2011-07-10', 'multimédia', 'production', 'multimédia'); -- -- Contraintes pour les tables exportées -- -- -- Contraintes pour la table `contacts` -- ALTER TABLE `contacts` ADD CONSTRAINT `klsezse` FOREIGN KEY (`log_contact`) REFERENCES `login` (`id_login`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Contraintes pour la table `demandes` -- ALTER TABLE `demandes` ADD CONSTRAINT `nkloi` FOREIGN KEY (`id_demande`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; -- -- Contraintes pour la table `employees` -- ALTER TABLE `employees` ADD CONSTRAINT `ssdr` FOREIGN KEY (`log_emp`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; -- -- Contraintes pour la table `fiche_paie` -- ALTER TABLE `fiche_paie` ADD CONSTRAINT `uiojh` FOREIGN KEY (`log_paie`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; -- -- Contraintes pour la table `fiche_statique` -- ALTER TABLE `fiche_statique` ADD CONSTRAINT `retz` FOREIGN KEY (`N_statique`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; -- -- Contraintes pour la table `formations` -- ALTER TABLE `formations` ADD CONSTRAINT `xcwd` FOREIGN KEY (`id_formations`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; -- -- Contraintes pour la table `horaires_hebdomataires` -- ALTER TABLE `horaires_hebdomataires` ADD CONSTRAINT `uiu` FOREIGN KEY (`id_heures`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; -- -- Contraintes pour la table `situation_personnel` -- ALTER TABLE `situation_personnel` ADD CONSTRAINT `hgjg` FOREIGN KEY (`id_situation`) REFERENCES `login` (`id_login`) ON DELETE CASCADE; /*!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 */;