I’ve a Person table which needs to record data on the person’s past and current occupation. I have an Occupation table with the list of occupation names and codes. Since within the Person table I can’t have current_occupation as a foreign key referencing Occupation and also past_occuption as a foreign key referencing Occupation, how do I get around this? Even if I add a secondary table to record the relationship between Person and Occupation, I’ve still got the same problem of requiring two pieces of data from Occupation for each Person.
Share
Why not have a
PersonOccupationtable with additional fields to index them by ‘most recent’ or simply the date from which they apply. Then derive thecurrentandpast_occupationfrom that?Then you only need one Foreign Key relating the
OccupationIdbetweenPersonOccupationandOccupation.