Hey,
I have a preexisting database with tables Teacher, Principal, AssistantPrincipal. I want to create a WebLogin Entity (WebLoginId, Username, Password) that shares a one to one relationship with each of the tables above. For every teacher, there is exactly one corresponding WebLogin. For every WebLogin, there is exactly one corresponding teacher.
My first thought is to create a relation such as WebLogin(WebLoginId, Username, Password, TeacherId, PrincipalId, AssistantPrincipalId).
The TeacherId, PrincipalId, and AssistantPrincipalId would be foreign keys into their respective tables. However, in this method, two of the employee IDs are always left null.
Is there a more elegant solution? I'm quite new at this.
Thanks!