CREATE TABLE "StationSite" ( "id" int PRIMARY KEY, "site_type" int ); CREATE TABLE "Intervention" ( "id" int PRIMARY KEY, "intervention_date" datetime, "station_id" int FOREIGN KEY("station_id") REFERENCES "StationSite" ("id") ); CREATE TABLE "IntervStation" ( "id" int, "intervention_id" int FOREIGN KEY("intervention_id") REFERENCES "Intervention" ("id"), "station_state" varchar(255) FOREIGN KEY("station_state") REFERENCES "station" ("state") );