Merge branch 'master' of https://git.etud.insa-toulouse.fr/rbonnet/tp_bdd2
This commit is contained in:
commit
2af8c52618
1 changed files with 22 additions and 20 deletions
|
@ -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
|
-- Axel
|
||||||
CREATE TABLE Personnel
|
CREATE TABLE Personnel
|
||||||
(
|
(
|
||||||
|
@ -6,15 +22,15 @@ CREATE TABLE Personnel
|
||||||
prenom VARCHAR,
|
prenom VARCHAR,
|
||||||
date_de_naissance DATE,
|
date_de_naissance DATE,
|
||||||
adress VARCHAR,
|
adress VARCHAR,
|
||||||
date_de_recrutement DATE,
|
date_de_recrutement DATE
|
||||||
);
|
);
|
||||||
|
|
||||||
--Axel
|
--Axel
|
||||||
CREATE TABLE Doctorant(
|
CREATE TABLE Doctorant(
|
||||||
idDoctorant INT NOT NULL,
|
idDoctorant INT NOT NULL,
|
||||||
date_debut_these DATE,
|
date_debut_these DATE,
|
||||||
date_soutenance DATE
|
date_soutenance DATE,
|
||||||
FOREIGN KEY (id) REFERENCES Personnel(idPersonnel),
|
FOREIGN KEY (idDoctorant) REFERENCES Personnel(idPersonnel),
|
||||||
PRIMARY KEY(idPersonnel)
|
PRIMARY KEY(idPersonnel)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -36,21 +52,6 @@ CREATE TABLE Enseignant_Chercheur(
|
||||||
PRIMARY KEY (idEnseignant)
|
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
|
--Axel
|
||||||
CREATE TABLE Etablissement(
|
CREATE TABLE Etablissement(
|
||||||
|
@ -100,7 +101,7 @@ CREATE TABLE Auteur_Externe (
|
||||||
prenom VARCHAR,
|
prenom VARCHAR,
|
||||||
adresseMail VARCHAR,
|
adresseMail VARCHAR,
|
||||||
idLabo INT NOT NULL,
|
idLabo INT NOT NULL,
|
||||||
FOREIGN KEY (idLabo) REFERENCES LaboExterne(idLabo),
|
FOREIGN KEY (idLabo) REFERENCES Labo_Externe(idLabo),
|
||||||
PRIMARY KEY (idAuteur)
|
PRIMARY KEY (idAuteur)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -173,7 +174,7 @@ CREATE TABLE Participe_Externe(
|
||||||
-- Ronan
|
-- Ronan
|
||||||
CREATE TABLE Organise (
|
CREATE TABLE Organise (
|
||||||
idPortesOuverte INT NOT NULL,
|
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 (idPortesOuverte) REFERENCES Journee_Portes_Ouvertes(idPorte_Ouverte),
|
||||||
FOREIGN KEY (idPersonnel) REFERENCES Personnel(idPersonnel),
|
FOREIGN KEY (idPersonnel) REFERENCES Personnel(idPersonnel),
|
||||||
PRIMARY KEY(idPortesOuverte, idPersonnel)
|
PRIMARY KEY(idPortesOuverte, idPersonnel)
|
||||||
|
@ -213,3 +214,4 @@ CREATE TABLE Partenaire(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue