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
| create database vols
use vols
--CREATION DE LA TABLE AVIONS
create table avions
(
av int primary key,
marque varchar(20),
typee varchar(10),
capacite int,
localisation varchar(20)
)
--CREATION DE LA TABLES PILOTES
create table pilotes
(
pil int primary key ,
nom varchar(20),
adresse varchar(20)
)
--CREATION DE LA TABLE VOLS
create table vols
(
vol varchar(6) primary key ,
av int ,
constraint fk_avions foreign key (av) references avions(av),
pil int ,
constraint fk_pil foreign key (pil) references pilotes(pil),
ville_depart varchar(20),
ville_arrivee varchar(20),
heure_depart int,
heure_arrivee int,
) |
Partager