Problem Description
In SDV 2779, we'll be allowing schemas where the primary key of a table is also the foreign key into a different table. This type of data pattern is typically used when there is a 1-to-1 relationship between the tables.
In that issue, we'll make sure the metadata will validate and that we can make synthetic data for it down-the-line. But it would be nice if the metadata were able to auto-detect this as well.
Expected behavior
For SDV Community, only the 'column_name_match' algorithm is support when inferring foreign keys (see API). For this algorithm, we should ensure that a primary key also become a candidate to be a foreign key into another table.
Note that we should be careful in making sure that our updated algorithm does not create any cycles in the graph, as that is no longer valid.