Say I have a table called People
into which people are inserted from the moment they are born. Now lets say I want some subclasses of people based on their job. So there are also tables for Plumber
, Carpenter
and Electrician
. Now, when a person is born, I don't know if they're going to grow up to be plumbers, or carpenters, or electricians - So I can't have reference the person in every table via a foreign key.
So when little Johnny grows up, how can I bind him to being a Plumber
. Is there some sort of pattern for this, or is this a stupid question with an obvious answer? Either way I'd appreciate some help, thanks!