Postgresql constrains on FK
From a design perspective, why would the Student_Education table be needed at all?

The information that a specific student follows a certain type of education is implied by the existence of the corresponding row in the &lt;type&gt;Education table.

If Student_Education's reason for being is for SQL joins, it could be a view returning the union of all the &lt;type&gt;Education tables.

As for the foreign keys to Education, to be sure that each entry in &lt;type&gt;Education can only refer to its corresponding type, I can see two options:


As @hypercube suggests in the comments, add a &lt;type&gt;Education.educ_type column with a fixed value and a table-level foreign key:
FOREIGN KEY (educ_id,educ_type) REFERENCES Education(unique_id,type)
Split Education into as many subtables as they are education types, and have column-level foreign keys from each &lt;type&gt;Education.educ_id to the corresponding subtable. It's also the proper design choice if the Education table should be expanded in the future with columns that are specific to certain education types. Education could also be turned into a view as the union of the subtables, at least for the common columns.