In my database there are four databases: Teachers, Students, Parents and Addresses.
Teachers, students, parents can have any number of addresses (zero or more).
I would like to use foreign keys to link between teachers and their addresses (and between students and their addresses etc).
Since records in Addresses can originate in either a teacher, a student or a parent, I cannot use a (single) foreign key in Addresses. And since Teachers etc can have any number of addresses, I cannot use an unlimited number of foreign keys in a Teacher record.
What would be a good strategy here?
I was thinking of using intermediate tables but that seems a bit cumbersome. Also, is it a good idea to have each Address record include 3 (NULLable) foreign keys, and only use one?