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, `station_state` varchar(255), FOREIGN KEY(`intervention_id`) REFERENCES `Intervention` (`id`), FOREIGN KEY(`station_state`) REFERENCES `station` (`state`) );