# Matching primary and foreign keys

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* MDM Platform
* Real-Time Big Data Platform

You can create an analysis that matches foreign keys in one table to primary keys in the other table and vice versa. This redundancy analysis supports only database tables.

## Prerequisites

A database connection is created in the Profiling perspective.

## Access the actual analyzed data

To match primary and foreign keys in tables, do the following:

Through this view, you can also access the actual analyzed data via the data explorer.

To access the analyzed data rows, right-click any of the lines in the table and select an option:

* 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

Information noteWarning: The data explorer does not support connections which has empty username, such as Single sign-on of MS SQL Server. If you analyze data using such connection and you try to view data rows in the Data Explorer perspective, a warning message prompt you to set your connection credentials to the SQL Server.

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.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/KeyMatching_Analysis4.png)

From the SQL editor, you can save the executed query and list it under the Libraries &gt; Source Files folders in 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](https://help.qlik.com/talend/en-US/studio-user-guide/8.0/saving-queries-executed-on-indicators).

### In this section

* [Defining the analysis to match primary and foreign keys in tables](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-06/defining-analysis-to-match-primary-and-foreign-keys-in-tables)
* [Selecting the primary and foreign keys](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-06/selecting-primary-and-foreign-keys)