Database Reference
In-Depth Information
Tableau A-4 : Création des clés étrangères et suppression des tables
Clés étrangères
Suppression des objets
ALTER TABLE horaire
ADD CONSTRAINT fk_horaires_ligne_jo
FOREIGN KEY (id_ligne, id_jour, id_sta)
REFERENCES ligne_jour_sta (id_ligne,
id_jour,id_sta);
ALTER TABLE horaire
DROP CONSTRAINT
fk_horaires_ligne_jo;
ALTER TABLE ligne_jour
DROP CONSTRAINT
fk_ligne_jo_planning_jour;
ALTER TABLE ligne_jour
DROP CONSTRAINT
fk_ligne_jo_planning_ligne;
ALTER TABLE ligne_jour_sta
DROP CONSTRAINT
fk_ligne_jo_stations_ligne_jo;
ALTER TABLE ligne_jour_sta
DROP CONSTRAINT
fk_ligne_jo_stations;
ALTER TABLE ligne_jour
ADD CONSTRAINT
fk_ligne_jo_planning_jour
FOREIGN KEY (id_jour)
REFERENCES jour (id_jour);
ALTER TABLE ligne_jour
ADD CONSTRAINT
fk_ligne_jo_planning_ligne
FOREIGN KEY (id_ligne)
REFERENCES ligne (id_ligne);
DROP INDEX horaires_fk;
DROP TABLE horaire CASCADE
CONSTRAINTS;
DROP TABLE jour CASCADE CONSTRAINTS;
DROP TABLE ligne CASCADE
CONSTRAINTS;
DROP INDEX planning_annuel_fk2;
DROP INDEX planning_annuel_fk;
DROP TABLE ligne_jour CASCADE
CONSTRAINTS;
DROP INDEX stations_fk2;
DROP INDEX stations_fk;
DROP TABLE ligne_jour_sta CASCADE
CONSTRAINTS;
DROP TABLE station CASCADE
CONSTRAINTS;
ALTER TABLE ligne_jour_sta
ADD CONSTRAINT
fk_ligne_jo_stations_ligne_jo
FOREIGN KEY (id_ligne,id_jour)
REFERENCES ligne_jour (id_ligne,
id_jour);
ALTER TABLE ligne_jour_sta
ADD CONSTRAINT fk_ligne_jo_stations
FOREIGN KEY (id_sta)
REFERENCES station (id_sta);
 
Search WWH ::




Custom Search