I have an Employee table , and another table named Student. Now I have a third table named the Login. Employee has emp_id as PK , and other specific attributes for an employee. Student has std_id as PK , and other specific attributes for a student.
The login table has user_id as PK , but the user_id should also be FK from both employee and student. Means that if there is a profile for an Employee or Student then there will be a record for them in the login table. But I am not able to link the user_id of the Login table to both Employee and Student at the same time in a one-to-one relationship.
Could you please help me how to that. I am using MySQL for this.