Best Practices for Making Legacy Data Semantic and AI-Ready - Discover relationships from foreign keys and other sources
Best Practices for Making Legacy Data Semantic and AI-Ready
Chapter 11. Discover relationships from foreign keys and other sources
Executive Summary: Chapter Overview
IF4ITThe Bottom Line
Core Concepts
| Concept | Definition & Strategic Role |
|---|---|
| Foreign Key Evidence | A technical relationship, such as a database constraint or join path, that can reveal a candidate semantic relationship between instances. |
| Candidate Relationship | A discovered connection that appears meaningful but has not yet been approved, named, and governed as a Semantic Relationship. |
| Non-FK Relationship Source | A source of relationship evidence outside formal database constraints, including APIs, reports, lineage, event logs, configuration, workflow definitions, and steward knowledge. |
| Predicate Assignment | The act of converting a candidate connection into a meaningful relationship by assigning a descriptive predicate and, when useful, an inverse predicate. |
Quick Q&A
Question: Why are foreign keys useful but insufficient for semantic relationships?
Question: Why should relationship discovery include sources beyond database constraints?
Read More Below
Overview
Foreign keys are useful evidence because they reveal where one table, record, or object depends on another. However, many legacy systems have weak, undocumented, partial, or application-enforced relationships that do not appear as formal database constraints.
Relationship discovery should therefore inspect more than foreign keys. Candidate relationships can be discovered from join tables, shared codes, API contracts, event logs, lineage, application configuration, reports, dashboards, workflow definitions, business rules, data steward knowledge, and AI-assisted inference.
The important distinction is that discovery does not equal approval. A discovered relationship is only a candidate until the Ontology defines what it means, which predicate describes it, which direction matters, and whether it belongs in the governed Semantic Layer.

Figure: Relationship Discovery Sources shows that semantic relationships can be discovered from many technical and business evidence sources, not just foreign keys, and converted into governed Subject–Predicate–Object relationships.
Technical clue: ORDER.CUSTOMER_ID -\> CUSTOMER.CUSTOMER_ID
Candidate relationship: Order relates to Customer
Approved semantic relationship: Order was placed by Customer
Inverse relationship: Customer placed Order
Examples
The following illustrate this step in practice.
Example 1: A team discovers that an application uses a database by combining connection strings, configuration files, query logs, and a database administrator’s confirmation.
Example 2: A customer-to-product relationship is inferred from shared identifiers in orders, billing records, and support tickets, then validated by a business steward before publication.
Best Practice
Use foreign keys, join tables, and existing join logic as evidence for candidate Semantic Relationships, but do not treat them as complete semantic meaning.
Benefit(s)
This preserves the value of legacy relational design while preventing AI from inferring business meaning from technical joins alone. The enterprise gains a practical starting point for relationship discovery without confusing connectivity with semantics.
Best Practice
Inspect non-foreign-key sources such as APIs, event logs, lineage, reports, dashboards, workflow definitions, application configuration, shared codes, business rules, and steward knowledge to identify additional relationship candidates.
Benefit(s)
This captures relationships that legacy databases often hide or enforce outside the schema. AI receives a richer map of real business connections instead of a narrow map of formal database constraints.
Best Practice
Require every approved Semantic Relationship to have a descriptive predicate, direction, source evidence, approval status, and relationship governance owner.
Benefit(s)
This turns relationship discovery into governed meaning. AI can traverse approved relationships with clearer context, and stewards can audit where the relationship came from and why it is valid.
Best Practice
Use AI to assist relationship discovery, but require Ontology-based review before inferred relationships are accepted.
Benefit(s)
AI can accelerate discovery by finding repeated patterns, hidden joins, naming similarities, and likely predicates. Governance prevents inferred relationships from becoming authoritative merely because a model suggested them.
How to cite this page
When referencing this page in academic work, internal standards, or external publications, include the page title, IF4IT as author and publisher (The International Foundation for Information Technology (IF4IT), LLC), the URL, and your access date.
Example (informal web citation):
The International Foundation for Information Technology (IF4IT), LLC. Discover relationships from foreign keys and other sources | Best Practices for Making Legacy Data Semantic and AI-Ready. https://if4it.org/best-practices/best-practices-for-making-legacy-data-semantic-and-ai-ready/discover-relationships-from-foreign-keys-and-other-sources/ (accessed 2026-07-17).
See About Us for content governance and site-wide citation guidance.
Copyright for The International Foundation for Information Technology (IF4IT), LLC: 2008 - Present
Legal Disclaimers