· 9 years ago · Jan 24, 2017, 08:06 AM
1-- phpMyAdmin SQL Dump
2-- version 3.3.9
3-- http://www.phpmyadmin.net
4--
5-- Serveur: localhost
6-- Généré le : Mar 15 Novembre 2011 à 07:34
7-- Version du serveur: 5.5.8
8-- Version de PHP: 5.3.5
9
10SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
11
12
13/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
14/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
15/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
16/*!40101 SET NAMES utf8 */;
17
18--
19-- Base de données: `base_etudiants`
20--
21
22-- --------------------------------------------------------
23
24--
25-- Structure de la table `enseignants`
26--
27
28CREATE TABLE IF NOT EXISTS `enseignants` (
29 `num_ens` int(10) unsigned NOT NULL AUTO_INCREMENT,
30 `nom_ens` varchar(50) NOT NULL,
31 `grade` varchar(10) NOT NULL,
32 `anciennete` int(10) DEFAULT NULL,
33 PRIMARY KEY (`num_ens`),
34 KEY `nom_ens` (`nom_ens`)
35) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
36
37--
38-- Contenu de la table `enseignants`
39--
40
41INSERT INTO `enseignants` (`num_ens`, `nom_ens`, `grade`, `anciennete`) VALUES
42(10, 'Bertrand, Pierre', 'ASS', 2),
43(11, 'Dupond, Auguste', 'MCF', 3),
44(12, 'Aubois, Jean', 'MCF', 5),
45(13, 'Boyer, Julie', 'ASS', 2),
46(14, 'Vincent, Paul', 'PR ', 4),
47(15, 'Simon, Etienne', 'ASS', 5);
48
49-- --------------------------------------------------------
50
51--
52-- Structure de la table `etudiants`
53--
54
55CREATE TABLE IF NOT EXISTS `etudiants` (
56 `num_etu` int(10) unsigned NOT NULL AUTO_INCREMENT,
57 `nom_etu` varchar(50) NOT NULL,
58 `date_naiss` date NOT NULL DEFAULT '0000-00-00',
59 `sexe` enum('M','F') NOT NULL,
60 PRIMARY KEY (`num_etu`),
61 UNIQUE KEY `nom_etu` (`nom_etu`)
62) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
63
64--
65-- Contenu de la table `etudiants`
66--
67
68INSERT INTO `etudiants` (`num_etu`, `nom_etu`, `date_naiss`, `sexe`) VALUES
69(1, 'Dupont, Charles', '1991-03-18', 'M'),
70(2, 'Dubois, Jules', '1992-02-11', 'M'),
71(3, 'Favier, Isabelle', '1989-02-02', 'F'),
72(4, 'Gros, Sophie', '1990-06-21', 'F'),
73(5, 'Henri, Pierre', '0000-00-00', 'M'),
74(6, 'Humbert, Odile', '1990-03-19', 'F'),
75(7, 'Bouziane, Mehdi', '1992-08-10', 'M'),
76(8, 'Martin, Julie', '1990-04-25', 'F'),
77(9, 'Paris, Jeanne', '1991-01-03', 'F'),
78(10, 'Yang, Bing', '1988-09-25', 'M'),
79(11, 'Romain, Georges', '1987-06-21', 'M');
80
81-- --------------------------------------------------------
82
83--
84-- Structure de la table `matieres`
85--
86
87CREATE TABLE IF NOT EXISTS `matieres` (
88 `num_mat` int(10) unsigned NOT NULL AUTO_INCREMENT,
89 `nom_mat` varchar(50) NOT NULL DEFAULT '',
90 `coef` int(10) NOT NULL DEFAULT '0',
91 `_num_ens` int(10) unsigned NOT NULL DEFAULT '0',
92 PRIMARY KEY (`num_mat`),
93 UNIQUE KEY `nom_mat` (`nom_mat`)
94) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
95
96--
97-- Contenu de la table `matieres`
98--
99
100INSERT INTO `matieres` (`num_mat`, `nom_mat`, `coef`, `_num_ens`) VALUES
101(1, 'Programmation', 3, 11),
102(2, 'Bases de données', 2, 13),
103(3, 'G.P.A.O.', 2, 10),
104(4, 'Logique', 1, 15),
105(5, 'Statistiques', 1, 15);
106
107-- --------------------------------------------------------
108
109--
110-- Structure de la table `notes`
111--
112
113CREATE TABLE IF NOT EXISTS `notes` (
114 `_num_etu` int(10) unsigned NOT NULL DEFAULT '0',
115 `_num_mat` int(10) unsigned NOT NULL DEFAULT '0',
116 `note` float DEFAULT NULL,
117 PRIMARY KEY (`_num_etu`,`_num_mat`)
118) ENGINE=InnoDB DEFAULT CHARSET=latin1;
119
120--
121-- Contenu de la table `notes`
122--
123
124INSERT INTO `notes` (`_num_etu`, `_num_mat`, `note`) VALUES
125(1, 1, 10.5),
126(1, 3, 12.5),
127(1, 4, 13),
128(1, 5, 7),
129(2, 1, 11),
130(2, 2, 14.5),
131(2, 3, 8.5),
132(3, 1, 14),
133(3, 3, 5),
134(3, 4, 7.5),
135(4, 2, 10),
136(4, 4, 13),
137(5, 2, 13),
138(5, 3, 10),
139(5, 4, 16),
140(6, 2, 13),
141(6, 3, 10),
142(6, 4, 11),
143(7, 1, 12.5),
144(7, 2, 11.5),
145(7, 3, 9),
146(8, 1, 15),
147(8, 3, 12),
148(8, 4, 13),
149(8, 5, 10),
150(9, 1, 8),
151(9, 2, 12),
152(9, 4, 8),
153(10, 3, 11.5),
154(10, 4, 9),
155(10, 5, 9);
156
157--
158-- Structure de la table `Inscrits`
159--
160
161CREATE TABLE IF NOT EXISTS `notes` (
162 `_num_etu` int(10) unsigned NOT NULL DEFAULT '0',
163 `_num_mat` int(10) unsigned NOT NULL DEFAULT '0',
164 PRIMARY KEY (`_num_etu`,`_num_mat`)
165) ENGINE=InnoDB DEFAULT CHARSET=latin1;
166
167--
168-- Contenu de la table `Inscrits`
169--
170INSERT INTO `Inscrits` (`_num_etu`, `_num_mat`) VALUES
171
172(1, 1),(1, 2),(1, 3),(1, 4),(1, 5),
173(2, 1),(2, 2),(2, 3),(2, 4),(2, 5),
174(3, 1),(3, 2), (3, 3),(3, 4),(3, 5),
175(4, 1),(4, 2),(4, 4,),(4, 5),
176(5, 1),(5, 2),(5, 3),(5, 4),(5, 5),
177(6, 2),(6, 3),(6, 4),
178(7, 1),(7, 2),(7, 3),(7, 4),(7, 5),
179(8, 1),(8, 2),(8, 3),(8, 4),(8, 5),
180(9, 1),(9, 2),(9, 4),
181(10, 1),(10, 2),(10, 3),(10, 4),(10, 5);