I have one common table that is referenced by two other tables in a database. Primary key of that two other tables is also a foreign key that points to a value of a primary key of common table.
I was wondering is there a way, MySQL could prevent that both tables have a same value as a reference? My idea is something like this:
Login row should be referenced in one of two tables (students or professors), but not in both.