Compare commits
5 commits
76256523d0
...
3316e18cb8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3316e18cb8 | ||
|
|
7878f7d25b | ||
|
|
c12d97046c | ||
|
|
0061d4e723 | ||
|
|
5da1875ba6 |
1 changed files with 43 additions and 6 deletions
|
|
@ -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)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue