Foreign key detection is the automated process of identifying columns in one table that refer to the primary key in another table, revealing referential integrity relationships between datasets. This process is fundamental to data discovery and schema inference, as it maps how data entities are connected without relying on pre-existing documentation or explicit database constraints. It is a critical component of building a comprehensive data catalog and understanding data lineage.




