Matching primary and foreign keys
Before you begin
A database connection is created in the Profiling perspective.
Through this view, you can also access the actual analyzed data via the Data Explorer.
- View match rows: access a list of all rows that could be matched in the two identical column sets.
- View not match rows: access a list of all rows that could not be matched in the two identical column sets.
- View rows: access a list of all rows in the two identical column sets
The figure below illustrates in the data explorer the list of all analyzed rows in the two columns.
![Example of a list of analyzed rows in two columns.](/en-US/studio-user-guide/8.0-R2024-07/Content/Resources/images/KeyMatching_Analysis4.png)
From the SQL editor, you can save the executed query and list it under the DQ Repository tree view if you click the save icon on the editor toolbar. For more information, see Saving the queries executed on indicators.
folders in theDefining the analysis to match primary and foreign keys in tables
Procedure
Selecting the primary and foreign keys
Procedure
Results
![Table and graphic from the Analysis Results section.](/en-US/studio-user-guide/8.0-R2024-07/Content/Resources/images/KeyMatching_Analysis3.png)
In this example, every foreign key in the sales_fact_1998 table is identified with a primary key in the customer table. However, 98.22% of the primary keys in the customer table could not be identified with foreign keys in the sales_fact_1998 table. These primary keys are for the customers who did not order anything in 1998.