Fix oublies
This commit is contained in:
parent
c12d97046c
commit
7878f7d25b
1 changed files with 19 additions and 7 deletions
|
@ -8,39 +8,50 @@ CREATE TABLE Personnel
|
||||||
date_de_recrutement date,
|
date_de_recrutement date,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE Publication (
|
||||||
|
idPublication SERIAL NOT NULL,
|
||||||
|
titre TEXT,
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
CREATE Participe(
|
CREATE Participe(
|
||||||
idProjet INT NOT NULL,
|
idProjet INT NOT NULL,
|
||||||
idScientifique INT NOT NULL,
|
idScientifique INT NOT NULL,
|
||||||
FOREIGN KEY (idProjet) REFERENCES Projet(idProjet),
|
FOREIGN KEY (idProjet) REFERENCES Projet(idProjet),
|
||||||
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique)
|
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique),
|
||||||
|
PRIMARY KEY (idProjet, idScientifique)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE Preside(
|
CREATE Preside(
|
||||||
idCongres INT NOT NULL,
|
idCongres INT NOT NULL,
|
||||||
idScientifique INT NOT NULL,
|
idScientifique INT NOT NULL,
|
||||||
FOREIGN KEY (idCongres) REFERENCES Congres(idCongres),
|
FOREIGN KEY (idCongres) REFERENCES Congres(idCongres),
|
||||||
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique)
|
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique),
|
||||||
|
PRIMARY KEY (idCongres, idScientifique)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE Publie_Scientifique(
|
CREATE Publie_Scientifique(
|
||||||
idPublication INT NOT NULL,
|
idPublication INT NOT NULL,
|
||||||
idScientifique INT NOT NULL,
|
idScientifique INT NOT NULL,
|
||||||
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
|
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
|
||||||
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique)
|
FOREIGN KEY (idScientifique) REFERENCES Scientifique(idScientifique),
|
||||||
|
PRIMARY KEY (idPublication, idScientifique)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE Publie_Doctorant(
|
CREATE Publie_Doctorant(
|
||||||
idPublication INT NOT NULL,
|
idPublication INT NOT NULL,
|
||||||
idDoctorant INT NOT NULL,
|
idDoctorant INT NOT NULL,
|
||||||
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
|
FOREIGN KEY (idPublication) REFERENCES Publication(idPublication),
|
||||||
FOREIGN KEY (idDoctorant) REFERENCES Doctorant(idDoctorant)
|
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)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -48,7 +59,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 (
|
||||||
|
@ -57,4 +69,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)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue