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 41 42 43 44 45 46 47 48
|
create database testlock;
use testlock;
create table contact
(
contact_id int not null identity(1,1) primary key,
contact_nom varchar(50) not null
);
create table teltype
(
teltype_id int not null identity(1,1) primary key,
teltype_nom varchar(50) not null
);
create table telephone
(
telephone_id int not null identity(1,1) primary key,
teltype_id int not null references teltype(teltype_id),
contact_id int not null references contact(contact_id),
telephone_numero varchar(50) not null
);
create table salle
(
salle_id int not null identity(1,1) primary key,
salle_nom varchar(50)
);
create table rdv
(
rdv_id int not null identity(1,1) primary key,
rdv_titre varchar(50) not null,
rdv_datdeb datetime not null,
rdv_datfin datetime not null,
salle_id int not null references salle(salle_id),
contact_id int not null references contact(contact_id)
);
create table participant
(
participant_id int not null identity(1,1) primary key,
contact_id int not null references contact(contact_id),
rdv_id int not null references rdv(rdv_id),
participant_obligatoire bit not null
); |
Partager