Foreign Keys

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Foreign Keys

The Foreign Key Tab is used to show Primary key to Foreign key relationships and if there is a supporting index on the foreign key.

 

Foreign Key Supporting Index

 

When a foreign key is created SQL Server does not automatically create an index. This is an end user operation.

 

The verification of a supporting index in is the foreign key band. The reason for this is it allows you to hide the band indexes supporting foreign key and still have visibility if there is a covering index on the foreign key.

 

Example below assumes

Primary key a,b on table X

Foreign key a,b on table Y

 

Column

Index supporting Foreign Key

Example of Supporting Index keys on table Y

Exact Match

Same columns, same column order

a,b

Overlap Match

Same column order, more columns in the index than PK index

a,b,c

Covering Match

Same columns different order

b,a

FK Has Index

If any of the above conditions are met then  there is a supporting index


 

 

The view is a banded view with the following bands

 

1.Foreign Key

2.Indexes Supporting Foreign Key

3.Primary Key

 

 

The foreign key band is pinned to the left allowing this to be visible while scrolling the grid

 

 

 

 

clip0006