Merge branch 'master' of https://git.etud.insa-toulouse.fr/rbonnet/tp_bdd2
corr
This commit is contained in:
commit
7f0d4d0643
2 changed files with 36 additions and 18 deletions
17
dropall.sql
Normal file
17
dropall.sql
Normal file
|
@ -0,0 +1,17 @@
|
|||
DROP TABLE Personnel;
|
||||
DROP TABLE Doctorant;
|
||||
DROP TABLE Scientifique;
|
||||
DROP TABLE Enseignant_Chercheur;
|
||||
DROP TABLE Evenement;
|
||||
DROP TABLE Congres;
|
||||
DROP TABLE Labo_externe;
|
||||
DROP TABLE Journee_Porte_Ouvertes;
|
||||
DROP TABLE Auteur_Externe ;
|
||||
DROP TABLE Publication ;
|
||||
DROP TABLE Participe;
|
||||
DROP TABLE Preside;
|
||||
DROP TABLE Publie_Scientifique;
|
||||
DROP TABLE Publie_Doctorant;
|
||||
DROP TABLE Publie_Externe;
|
||||
DROP TABLE Participe_Externe;
|
||||
DROP TABLE Organise ;
|
|
@ -1,3 +1,19 @@
|
|||
-- Nathan
|
||||
CREATE TYPE echelon AS ENUM (
|
||||
'A*',
|
||||
'A',
|
||||
'B',
|
||||
'C'
|
||||
);
|
||||
|
||||
-- Nathan
|
||||
CREATE TYPE grade AS ENUM (
|
||||
'cr1',
|
||||
'cr2',
|
||||
'mcf',
|
||||
'mcf hors classe'
|
||||
);
|
||||
|
||||
-- Axel
|
||||
CREATE TABLE Personnel
|
||||
(
|
||||
|
@ -6,7 +22,7 @@ CREATE TABLE Personnel
|
|||
prenom VARCHAR,
|
||||
date_de_naissance DATE,
|
||||
adress VARCHAR,
|
||||
date_de_recrutement DATE,
|
||||
date_de_recrutement DATE
|
||||
);
|
||||
|
||||
--Axel
|
||||
|
@ -36,21 +52,6 @@ CREATE TABLE Enseignant_Chercheur(
|
|||
PRIMARY KEY (idEnseignant)
|
||||
);
|
||||
|
||||
-- Nathan
|
||||
CREATE TYPE echelon AS ENUM (
|
||||
'A*',
|
||||
'A',
|
||||
'B',
|
||||
'C'
|
||||
);
|
||||
|
||||
-- Nathan
|
||||
CREATE TYPE grade AS ENUM (
|
||||
'cr1',
|
||||
'cr2',
|
||||
'mcf',
|
||||
'mcf hors classe'
|
||||
);
|
||||
|
||||
--Axel
|
||||
CREATE TABLE Etablissement(
|
||||
|
@ -106,7 +107,7 @@ CREATE TABLE Auteur_Externe (
|
|||
prenom VARCHAR,
|
||||
adresseMail VARCHAR,
|
||||
idLabo INT NOT NULL,
|
||||
FOREIGN KEY (idLabo) REFERENCES LaboExterne(idLabo),
|
||||
FOREIGN KEY (idLabo) REFERENCES Labo_Externe(idLabo),
|
||||
PRIMARY KEY (idAuteur)
|
||||
);
|
||||
|
||||
|
@ -179,7 +180,7 @@ CREATE TABLE Participe_Externe(
|
|||
-- Ronan
|
||||
CREATE TABLE Organise (
|
||||
idPortesOuverte INT NOT NULL,
|
||||
idPersonnel INT NOT NULL,s d
|
||||
idPersonnel INT NOT NULL,
|
||||
FOREIGN KEY (idPortesOuverte) REFERENCES Journee_Portes_Ouvertes(idPorte_Ouverte),
|
||||
FOREIGN KEY (idPersonnel) REFERENCES Personnel(idPersonnel),
|
||||
PRIMARY KEY(idPortesOuverte, idPersonnel)
|
||||
|
|
Loading…
Reference in a new issue