Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

script base mySQL

The document is a SQL dump for a database named 'base_acp', containing the structure for several tables including 'acp', 'classes', 'eleves', 'niveaux', 'periodes', and 'professeurs'. Each table is defined with its respective fields, primary keys, and foreign key constraints to maintain relationships between the tables. The SQL dump is generated using phpMyAdmin version 3.5.8.1 and is compatible with MySQL server version 5.6.11-log.

Uploaded by

serge.cuypers184
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

script base mySQL

The document is a SQL dump for a database named 'base_acp', containing the structure for several tables including 'acp', 'classes', 'eleves', 'niveaux', 'periodes', and 'professeurs'. Each table is defined with its respective fields, primary keys, and foreign key constraints to maintain relationships between the tables. The SQL dump is generated using phpMyAdmin version 3.5.8.1 and is compatible with MySQL server version 5.6.11-log.

Uploaded by

serge.cuypers184
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

-- phpMyAdmin SQL Dump

-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- Client: 127.0.0.1
-- G�n�r� le: Jeu 09 Janvier 2014 � 13:52
-- Version du serveur: 5.6.11-log
-- Version de PHP: 5.4.14

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

--
-- Base de donn�es: `base_acp`
--

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

--
-- Structure de la table `acp`
--

CREATE TABLE IF NOT EXISTS `acp` (


`idAcp` int(11) NOT NULL AUTO_INCREMENT,
`idProfesseur` int(11) NOT NULL,
`idPeriode` int(11) NOT NULL,
`intitule` varchar(50) NOT NULL,
`nbElevesMax` int(11) NOT NULL,
`salle` varchar(20) NOT NULL,
`idNiveau` int(11) NOT NULL,
PRIMARY KEY (`idAcp`),
KEY `idProfesseur` (`idProfesseur`,`idPeriode`,`idNiveau`),
KEY `acp_ibfk_3` (`idNiveau`),
KEY `acp_ibfk_2` (`idPeriode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `classes`
--

CREATE TABLE IF NOT EXISTS `classes` (


`idClasse` int(11) NOT NULL AUTO_INCREMENT,
`idNiveau` int(11) NOT NULL,
`nom` varchar(50) NOT NULL,
PRIMARY KEY (`idClasse`),
KEY `idNiveau` (`idNiveau`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `eleves`
--

CREATE TABLE IF NOT EXISTS `eleves` (


`idEleve` int(11) NOT NULL AUTO_INCREMENT,
`nom` varchar(50) NOT NULL,
`prenom` varchar(50) NOT NULL,
`mdp` varchar(20) NOT NULL,
`idClasse` int(11) NOT NULL,
`mail` varchar(50) NOT NULL,
PRIMARY KEY (`idEleve`),
KEY `idClasse` (`idClasse`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `niveaux`
--

CREATE TABLE IF NOT EXISTS `niveaux` (


`idNiveau` int(11) NOT NULL AUTO_INCREMENT,
`nom` varchar(50) NOT NULL,
PRIMARY KEY (`idNiveau`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `periodes`
--

CREATE TABLE IF NOT EXISTS `periodes` (


`idPeriode` int(11) NOT NULL AUTO_INCREMENT,
`nom` varchar(50) NOT NULL,
`dateDebut` date NOT NULL,
`dateFin` date NOT NULL,
`etat` varchar(10) NOT NULL ,
PRIMARY KEY (`idPeriode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `professeurs`
--

CREATE TABLE IF NOT EXISTS `professeurs` (


`idProfesseur` int(11) NOT NULL AUTO_INCREMENT,
`nom` varchar(50) NOT NULL,
`prenom` varchar(50) NOT NULL,
`mdp` varchar(20) NOT NULL,
PRIMARY KEY (`idProfesseur`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Contraintes pour les tables export�es
--

--
-- Contraintes pour la table `acp`
--
ALTER TABLE `acp`
ADD CONSTRAINT `acp_ibfk_3` FOREIGN KEY (`idNiveau`) REFERENCES `niveaux`
(`idNiveau`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `acp_ibfk_1` FOREIGN KEY (`idProfesseur`) REFERENCES `professeurs`
(`idProfesseur`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `acp_ibfk_2` FOREIGN KEY (`idPeriode`) REFERENCES `periodes`
(`idPeriode`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Contraintes pour la table `classes`
--
ALTER TABLE `classes`
ADD CONSTRAINT `classes_ibfk_1` FOREIGN KEY (`idNiveau`) REFERENCES `niveaux`
(`idNiveau`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Contraintes pour la table `eleves`
--
ALTER TABLE `eleves`
ADD CONSTRAINT `eleves_ibfk_1` FOREIGN KEY (`idClasse`) REFERENCES `classes`
(`idClasse`) ON DELETE CASCADE ON UPDATE CASCADE;

You might also like