Add foreign keys to the "affiliations" table
At the moment, the affiliations table has the structure {firstname, lastname, function, organization}, as you can see in the preview at the bottom right. In the next three exercises, you're going to turn this table into the form {professor_id, organization_id, function}, with professor_id and organization_id being foreign keys that point to the respective tables.
You're going to transform the affiliations table in-place, i.e., without creating a temporary table to cache your intermediate results.
Deze oefening maakt deel uit van de cursus
Introduction to Relational Databases in SQL
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
-- Add a professor_id column
___ ___ ___
___ COLUMN ___ ___ REFERENCES ___ (___);