3 ms·
The problem is when one has multiple FKs between the same pair of tables. Of course, if you allow naming the relation when you create a foreign key, then you c
by dragonwriter 4y ago
The problem is when one has multiple FKs between the same pair of tables.
Of course, if you allow naming the relation when you create a foreign key, then you could use the source table-qualified relationship name for joins rather than the target table name, which would be unambiguous (and more communicative of intent).
E.g., for a hypothetical table with two self-fks:
FROM employees ee
INNER JOIN ee.manager mgr
INNER JOIN ee.team_lead lead