Compare commits

...

5 commits

Author SHA1 Message Date
Bonnet Ronan
3316e18cb8 merge ronan + wtf 2022-12-07 08:06:23 +01:00
Bonnet Ronan
7878f7d25b Fix oublies 2022-11-30 16:48:39 +01:00
Bonnet Ronan
c12d97046c Create Participe table 2022-11-30 16:36:19 +01:00
Bonnet Ronan
0061d4e723 Create Preside table 2022-11-30 16:35:17 +01:00
Bonnet Ronan
5da1875ba6 Create Publie_Scientifique table 2022-11-30 16:34:37 +01:00

View file

@ -8,9 +8,6 @@ CREATE TABLE Personnel
date_de_recrutement DATE, date_de_recrutement DATE,
); );
CREATE
CREATE TABLE Scientifique( CREATE TABLE Scientifique(
idScientique INT NOT NULL, idScientique INT NOT NULL,
idPersonnel INT NOT NULL, idPersonnel INT NOT NULL,
@ -18,11 +15,50 @@ CREATE TABLE Scientifique(
PRIMARY KEY(idPersonnel) PRIMARY KEY(idPersonnel)
); );
CREATE Publication (
idPublication SERIAL NOT NULL,
titre TEXT,
);
CREATE Participe(
idProjet INT NOT NULL,
idScientifique INT NOT NULL,
FOREIGN KEY (idProjet) REFERENCES Projet(idProjet),
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique),
PRIMARY KEY (idProjet, idScientifique)
);
CREATE Preside(
idCongres INT NOT NULL,
idScientifique INT NOT NULL,
FOREIGN KEY (idCongres) REFERENCES Congres(idCongres),
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique),
PRIMARY KEY (idCongres, idScientifique)
);
CREATE Publie_Scientifique(
idPublication INT NOT NULL,
idScientifique INT NOT NULL,
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique),
PRIMARY KEY (idPublication, idScientifique)
);
CREATE Publie_Doctorant(
idPublication INT NOT NULL,
idDoctorant INT NOT NULL,
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
FOREIGN KEY (idDoctorant) REFERENCES Doctorant(idDoctorant),
PRIMARY KEY (idPublication, idDoctorant)
);
CREATE TABLE Publie_Externe( CREATE TABLE Publie_Externe(
idPublication INT NOT NULL, idPublication INT NOT NULL,
idAuteurExterne INT NOT NULL, idAuteurExterne INT NOT NULL,
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication), FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
FOREIGN KEY (idAuteurExterne) REFERENCES Auteur_Externe(idAuteur) FOREIGN KEY (idAuteurExterne) REFERENCES Auteur_Externe(idAuteur),
PRIMARY KEY (idPublication, idAuteurExterne)
); );
@ -30,7 +66,8 @@ CREATE TABLE Participe_Externe(
idProjet INT NOT NULL, idProjet INT NOT NULL,
idPartenaire INT NOT NULL, idPartenaire INT NOT NULL,
FOREIGN KEY (idProjet) REFERENCES Projet(idProjet), FOREIGN KEY (idProjet) REFERENCES Projet(idProjet),
FOREIGN KEY (idPartenaire) REFERENCES Partenaire(idPartenaire) FOREIGN KEY (idPartenaire) REFERENCES Partenaire(idPartenaire),
PRIMARY KEY (idProjet, idPartenaire)
); );
CREATE TABLE Organise ( CREATE TABLE Organise (
@ -39,4 +76,4 @@ CREATE TABLE Organise (
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)
); );