-- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Mer 08 Février 2012 à 08:46
-- Version du serveur: 5.5.9
-- Version de PHP: 5.3.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!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: `BureauSympa`
--

-- --------------------------------------------------------

--
-- Structure de la table `Absence`
--

CREATE TABLE `Absence` (
  `NoAbsence` int(11) NOT NULL AUTO_INCREMENT,
  `DateDebut` date NOT NULL,
  `CodeAbsence` int(11) NOT NULL,
  `DureeJour` int(11) NOT NULL,
  `NoEmploye` int(11) NOT NULL,
  `RemarqueAbsence` varchar(40) NOT NULL,
  PRIMARY KEY (`NoAbsence`),
  KEY `NoEmploye` (`NoEmploye`),
  KEY `CodeAbsence` (`CodeAbsence`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;

--
-- Contenu de la table `Absence`
--

INSERT INTO `Absence` VALUES(4, '2009-10-22', 1, 1, 13, 'Accident de Ski');
INSERT INTO `Absence` VALUES(5, '2009-11-11', 2, 2, 20, '');
INSERT INTO `Absence` VALUES(6, '2009-03-01', 3, 3, 12, 'Mariage');
INSERT INTO `Absence` VALUES(7, '2009-04-01', 4, 4, 15, '');
INSERT INTO `Absence` VALUES(8, '2009-02-03', 5, 5, 25, '');
INSERT INTO `Absence` VALUES(9, '2009-10-10', 1, 1, 25, 'Grippe');
INSERT INTO `Absence` VALUES(10, '2009-11-23', 1, 1, 24, 'Grippe');
INSERT INTO `Absence` VALUES(11, '2009-11-23', 1, 1, 13, '');
INSERT INTO `Absence` VALUES(12, '2009-12-05', 1, 1, 13, '');
INSERT INTO `Absence` VALUES(13, '2009-12-12', 1, 1, 12, '');
INSERT INTO `Absence` VALUES(14, '2009-06-10', 3, 3, 20, '');
INSERT INTO `Absence` VALUES(15, '2009-07-01', 1, 1, 13, '');
INSERT INTO `Absence` VALUES(16, '2009-09-01', 1, 1, 13, '');
INSERT INTO `Absence` VALUES(17, '2009-07-01', 1, 1, 24, '');
INSERT INTO `Absence` VALUES(18, '2009-08-01', 2, 2, 29, '');
INSERT INTO `Absence` VALUES(19, '2009-08-01', 2, 2, 15, '');
INSERT INTO `Absence` VALUES(20, '2009-07-01', 2, 2, 12, '');

-- --------------------------------------------------------

--
-- Structure de la table `Departement`
--

CREATE TABLE `Departement` (
  `NoDepartement` int(11) NOT NULL AUTO_INCREMENT,
  `NomDepartement` varchar(20) NOT NULL,
  PRIMARY KEY (`NoDepartement`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Contenu de la table `Departement`
--

INSERT INTO `Departement` VALUES(1, 'Finances');
INSERT INTO `Departement` VALUES(2, 'Ressources humaines');
INSERT INTO `Departement` VALUES(3, 'Production');
INSERT INTO `Departement` VALUES(4, 'Marketing');
INSERT INTO `Departement` VALUES(5, 'Informatique');

-- --------------------------------------------------------

--
-- Structure de la table `Employe`
--

CREATE TABLE `Employe` (
  `NoEmploye` int(11) NOT NULL AUTO_INCREMENT,
  `Adresse1` varchar(50) NOT NULL,
  `Adresse2` varchar(30) NOT NULL,
  `AVS` varchar(15) NOT NULL,
  `Canton` char(2) NOT NULL,
  `CategorieEmploye` int(11) NOT NULL,
  `Civilite` varchar(15) NOT NULL,
  `CodePostal` char(4) NOT NULL,
  `DateEmbauche` date NOT NULL,
  `DateNaissance` date NOT NULL,
  `Fonction` varchar(30) NOT NULL,
  `NoDepartement` int(11) NOT NULL,
  `NombreHeureSem` int(11) NOT NULL,
  `NomEmploye` varchar(20) NOT NULL,
  `Prenom` varchar(20) NOT NULL,
  `SalaireHeure` float NOT NULL,
  `Sexe` char(1) NOT NULL,
  `SoldeMaladie` int(11) NOT NULL,
  `SoldeTS` float NOT NULL,
  `SoldeVacances` int(11) NOT NULL,
  `Telephone` varchar(15) NOT NULL,
  `TempsPlein` varchar(5) NOT NULL,
  `Ville` varchar(20) NOT NULL,
  PRIMARY KEY (`NoEmploye`),
  KEY `NoDepartement` (`NoDepartement`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=38 ;

--
-- Contenu de la table `Employe`
--

INSERT INTO `Employe` VALUES(4, 'rue Amine 59', '', '15055386119', 'FR', 1, 'Monsieur', '1775', '1985-09-02', '1955-12-24', 'Comptable', 1, 40, 'Beaulieu', 'Henri', 57.93, 'H', 10, 35.5, 30, '269901234', 'VRAI', 'Monstylo');
INSERT INTO `Employe` VALUES(7, 'avenue Taqueuse 75', '', '21066224152', 'FR', 2, 'Madame', '1777', '1992-02-02', '1966-04-24', 'Vendeuse', 4, 21, 'Borchu', 'Annick', 38.62, 'F', 5, 0, 10, '261236767', 'VRAI', 'Lacolle');
INSERT INTO `Employe` VALUES(8, '345, ave Tableau', '', '21450243115', 'FR', 1, 'Monsieur', '1776', '1980-09-01', '1950-05-12', 'Directeur', 1, 40, 'Brosse', 'Jean', 77.23, 'M', 10, 56, 35, '267896789', 'VRAI', 'Duraville');
INSERT INTO `Employe` VALUES(12, '34, rue Coller', '', '40465844116', 'FR', 3, 'Madame', '1777', '1996-03-01', '1965-11-13', 'Préposée aux étiquettes', 3, 40, 'Gommette', 'Paula', 21.24, 'F', 10, 0, 10, '261234447', 'VRAI', 'Lacolle');
INSERT INTO `Employe` VALUES(13, 'rue Volt 9', '', '87961486117', 'FR', 2, 'Monsieur', '1776', '1990-02-14', '1961-12-24', 'Vendeur', 4, 40, 'Terry', 'Bart', 30.89, 'H', 7, 5, 20, '267899876', 'VRAI', 'Duraville');
INSERT INTO `Employe` VALUES(15, '67, rue Cassé', '', '70459202113', 'FR', 3, 'Monsieur', '1776', '1993-11-20', '1959-04-02', 'Réparateur', 3, 40, 'Paré', 'Larry', 29.4, 'M', 3, 9.5, 15, '267895453', 'VRAI', 'Duraville');
INSERT INTO `Employe` VALUES(17, 'rue Coller 34', '', '40465844142', 'FR', 1, 'Madame', '1777', '1998-01-06', '1968-11-13', 'Préposée aux étiquettes', 1, 40, 'Gommette', 'Paula', 21.24, 'F', 10, 0, 15, '(026) 123 4499', 'VRAI', 'Lacolle');
INSERT INTO `Employe` VALUES(18, 'rue Volt 19', '', '87961486188', 'FR', 5, 'Monsieur', '1700', '1996-02-18', '1961-12-30', 'Informaticien', 5, 40, 'Olivier', 'Mars', 60, 'M', 10, 0, 20, '(026) 789 9877', 'VRAI', 'Fribourg');
INSERT INTO `Employe` VALUES(20, '123, rue Corridor', '', '23542312118', 'VD', 2, 'Monsieur', '1098', '1997-05-19', '1942-07-12', 'Préposé à la paye', 2, 40, 'Bureau', 'Edmond', 29.93, 'M', 10, 5, 10, '349997856', 'VRAI', 'Officity');
INSERT INTO `Employe` VALUES(24, '2, Ave Aspire', '', '63562750123', 'FR', 3, 'Madame', '1775', '1999-07-23', '1962-08-19', 'Préposée à l''entretien', 3, 21, 'Masse', 'Sara', 21.05, 'F', 8, 2, 20, '269905566', 'FAUX', 'Monstylo');
INSERT INTO `Employe` VALUES(25, '11, rue Mobile', '', '44971292154', 'FR', 2, 'Madame', '1777', '2000-02-01', '1971-06-30', 'Secrétaire', 1, 40, 'Hay', 'Papy', 30.89, 'F', 10, 3, 10, '261234367', 'VRAI', 'Lacolle');
INSERT INTO `Employe` VALUES(29, '876, ave Desroches', '', '58060140117', 'NE', 3, 'Monsieur', '2111', '2006-04-02', '1960-02-09', 'Camionneur', 3, 40, 'Larochelle', 'Pierre', 28.48, 'M', 5, 12.5, 15, '322256497', 'VRAI', 'Rockcity');
INSERT INTO `Employe` VALUES(33, '6, rue Sketch, app. 2', '', '87848452162', 'FR', 2, 'Monsieur', '1777', '2003-01-03', '1948-11-21', 'Technicien', 2, 40, 'Tellemand', 'Gerry', 26.79, 'M', 9, 9, 20, '261236781', 'VRAI', 'Lacolle');
INSERT INTO `Employe` VALUES(35, '1, rue Uno', '', '72257101111', 'FR', 2, 'Monsieur', '1776', '1999-06-03', '1957-01-01', 'Technicien', 3, 40, 'Premier', 'Simon', 26.79, 'M', 8, 0, 20, '267898786', 'VRAI', 'Duraville');
INSERT INTO `Employe` VALUES(36, '16, rue Mègue', 'C.P. 80486', '44565576111', 'FR', 2, 'Madame', '1775', '1989-06-21', '1965-03-14', 'Technicien en informatique', 1, 40, 'Nateur', 'Haurdie', 52.37, 'F', 10, 67.5, 30, '269908787', 'VRAI', 'Monstylo');
INSERT INTO `Employe` VALUES(37, '240, ave Tableau', '', '21450243155', 'FR', 3, 'Monsieur', '1776', '1985-09-01', '1965-05-12', 'Réparateur', 1, 21, 'Brosse', 'Pierre', 28.96, 'M', 10, 20, 35, '267896799', 'FAUX', 'Duraville');

-- --------------------------------------------------------

--
-- Structure de la table `Motif`
--

CREATE TABLE `Motif` (
  `CodeAbsence` int(11) NOT NULL AUTO_INCREMENT,
  `Description` varchar(50) NOT NULL,
  PRIMARY KEY (`CodeAbsence`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Contenu de la table `Motif`
--

INSERT INTO `Motif` VALUES(1, 'Maladie');
INSERT INTO `Motif` VALUES(2, 'Vacances');
INSERT INTO `Motif` VALUES(3, 'Famille');
INSERT INTO `Motif` VALUES(4, 'Congé sans solde');
INSERT INTO `Motif` VALUES(5, 'Congé');

-- --------------------------------------------------------

--
-- Structure de la table `Supplementaire`
--

CREATE TABLE `Supplementaire` (
  `NoTS` int(11) NOT NULL AUTO_INCREMENT,
  `DateTS` date NOT NULL,
  `NoEmploye` int(11) NOT NULL,
  `NombreHeure` int(11) NOT NULL,
  `RemarqueTS` varchar(100) NOT NULL,
  `Taux` float NOT NULL,
  PRIMARY KEY (`NoTS`),
  KEY `NoEmploye` (`NoEmploye`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=134 ;

--
-- Contenu de la table `Supplementaire`
--

INSERT INTO `Supplementaire` VALUES(130, '2009-10-21', 12, 3, 'Rapport d''impôt', 1);
INSERT INTO `Supplementaire` VALUES(131, '2009-10-02', 12, 2, 'Réseau planté', 1.5);
INSERT INTO `Supplementaire` VALUES(132, '2009-05-01', 13, 1, 'Fête de travail', 1);
INSERT INTO `Supplementaire` VALUES(133, '2009-06-01', 20, 2, 'Reprise 2 heures le 31.05.2006', -1);

--
-- Contraintes pour les tables exportées
--

--
-- Contraintes pour la table `Absence`
--
ALTER TABLE `Absence`
  ADD CONSTRAINT `Absence_ibfk_2` FOREIGN KEY (`CodeAbsence`) REFERENCES `Motif` (`CodeAbsence`),
  ADD CONSTRAINT `Absence_ibfk_1` FOREIGN KEY (`NoEmploye`) REFERENCES `Employe` (`NoEmploye`);

--
-- Contraintes pour la table `Employe`
--
ALTER TABLE `Employe`
  ADD CONSTRAINT `Employe_ibfk_1` FOREIGN KEY (`NoDepartement`) REFERENCES `Departement` (`NoDepartement`);

--
-- Contraintes pour la table `Supplementaire`
--
ALTER TABLE `Supplementaire`
  ADD CONSTRAINT `Supplementaire_ibfk_1` FOREIGN KEY (`NoEmploye`) REFERENCES `Employe` (`NoEmploye`);
