You are on page 1of 2

create table etudiant

(numetu integer primary key ,


nom varchar(30),
prenom varchar(30),
datenaiss varchar(30),
rue varchar(30),
cp varchar (10),
ville varchar (20)
);
create table matiere
(
codemat varchar(10) primary key,
libelle varchar(30),
coefinsert FLOAT
);
create table epreuve
(
numepreuve integer primary key,
datepreuve varchar(30),
lieu varchar(30),
codemat varchar(10),
CONSTRAINT FK_matiere_epreuve FOREIGN KEY (codemat) REFERENCES matiere (codemat)
);
create table notation
(
numetu integer,
numepreuve INTEGER,
note FLOAT,
CONSTRAINT FK_etudiant_notation FOREIGN KEY (numetu) REFERENCES etudiant (numetu
),
CONSTRAINT FK_epreuve_notation FOREIGN KEY (numepreuve) REFERENCES epreuve (nume
preuve)
);
insert into etudiant (numetu , nom, prenom, datenaiss, rue, cp, ville) values (1
10,'Dupont','Albert','1980-06-01','Rue de Crime',69001,'Lyon' );
insert into etudiant (numetu , nom, prenom, datenaiss, rue, cp, ville) values (
222,'West','James','1983-09-03','Studio','','Hollywood');
insert into etudiant (numetu , nom, prenom, datenaiss, rue, cp, ville) values (
300,'Martin','Marie','1988-06-05','Rue des Acacias',69130,'Ecully' );
insert into etudiant (numetu , nom, prenom, datenaiss, rue, cp, ville) values (
421,'Durand','Gaston','1980-11-15','Rue de la Meuse',69008,'Lyon')
insert into etudiant (numetu , nom, prenom, datenaiss, rue, cp, ville) values (
575,'Titgoutte','Justine','1985-02-28','Chemin du Chteau',69630,'Chaponost');
insert into etudiant (numetu , nom, prenom, datenaiss, rue, cp, ville) values (
667,'Dupond','Nomie','1987-09-18','Rue de Dle',69007,'Lyon');
insert into etudiant (numetu , nom, prenom, datenaiss) values (999,'Phantom','M
arcel','1960-01-30');
insert into matiere values('STA','Statistique', 0.4);
insert into matiere values('INF','Informatique', 0.4);
insert into matiere values('ECO','Economtrie', 0.2);
insert into epreuve values (11031,'2003-12-15','Salle 191L','STA');

insert
insert
insert
insert

into
into
into
into

insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert
insert

into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into
into

epreuve
epreuve
epreuve
epreuve

values(11032,'2004-04-01','Amphi
values(21031,'2003-10-30','Salle
values(21032,'2004-06-01','Salle
values(31030,'2004-06-02','Salle

notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation
notation

(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,
(numetu,

numepreuve,
numepreuve,
numepreuve,
numepreuve)
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve)
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve,
numepreuve)

G','STA');
191L','INF');
192L','INF') ;
05R','ECO');

note) values (110,11031,10);


note) values (110,11032,11.5);
note) values (110,21031,8.5);
values (110,21032);
note) values (110,31030,13);
note) values (222,11031,9);
note) values (222,11032,14);
note) values (222,21031,12);
note) values (222,21032,16);
note) values (222,31030,20);
note) values (300,11031,14);
note) values (300,11032,20);
note) values (300,21031,20);
note) values (300,21032,13.5);
note) values (300,31030,16);
note) values (421,11031,5.5);
note) values (421,11032,7);
note) values (421,21031,1.5);
values (421,21032);
note) values (421,31030,10);
note) values (575,11031,13);
note) values (575,11032,9);
note) values (575,21031,12.5);
note) values (575,21032,14);
note) values (575,31030,7);
note) values (667,11031,16);
note) values (667,11032,20);
note) values (667,21031,8.5);
note) values (667,21032,9.5);
values (667,31030);

You might also like