As the title of this issue suggests, the proper way to map foreign keys should not be based on the primary key, since most SQL databases allow more general foreign key constraints that do not require the referenced set of columns to be the primary key.
Foreign key constraints in the DB (and consequently also those in our schema) ensure that len(columns) == len(ref_columns).
This should also eliminate the limitation of our code that requires a foreign key constraint to consist only of a single column.
https://github.com/LukasZahradnik/deep-db-learning/blob/393c6e2e6abeadf76550732fc3973be21706f9fc/db_transformer/data/dataset.py#L270-L279
As the title of this issue suggests, the proper way to map foreign keys should not be based on the primary key, since most SQL databases allow more general foreign key constraints that do not require the referenced set of columns to be the primary key.
Foreign key constraints in the DB (and consequently also those in our schema) ensure that
len(columns) == len(ref_columns)
.This should also eliminate the limitation of our code that requires a foreign key constraint to consist only of a single column.