1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| create table Employe
(
NumEmploye int identity,
NomEmploye varchar(20),
PrenomEmploye varchar(20),
SexeEmploye char(1),
DNaissEmploye datetime,
FonctionEmploye varchar(30),
constraint PK_Employe_NumEmploye primary key (NumEmploye)
)
create table Inscription
(
NumEmploye int,
CodeProjet varchar(10),
DateInscription datetime,
constraint FK_Inscription_CodeProjet foreign key (CodeProjet) references Projet(CodeProjet),
constraint FK_Inscription_NumEmploye foreign key (NumEmploye) references Employe(NumEmploye),
constraint PK_Inscription_NumEmploye_CodeProjet primary key (NumEmploye, CodeProjet)
)
create table Projet
(
CodeProjet varchar(10),
Typeproj varchar(20),
DateDebut datetime,
DateFin datetime,
constraint FK_Projet_TypeProjet foreign key (TypeProj) references TypeProjet(TypeProj),
constraint PK_Projet_CodeProjet primary key (CodeProjet, Typeproj)
)
create table TypeProjet
(
Typeproj varchar(20),
LibelleProjet varchar(50),
DureeProjet int,
constraint PK_TypeProjet_TypeProj primary key (TypeProj)
) |
Partager