AdventureWorks LT: The Foreign Key’s Name in Visio is not the same as the Name in Real DB



  1. SQL Server Katmai
  2. SQL Samples

Repro Steps:

  1. Open ‘<SampleRoot>\ Tools\Samples\AdventureWorks LT\ AdventureWorksLT.vsd’ via Visio
  2. Check Name of Relation between Tables ‘Customer’ and ‘CustomerAddress’
  3. Select the associated Foreign Key’s Name in DB ‘AdventureWorks LT’:
    select name from sys.foreign_keys
    where parent_object_id=(select object_id from sys.tables where name='CustomerAddress')
    and referenced_object_id=(select object_id from sys.tables where name='Customer')
  4. Compare the two names


The two Names should be the same

Actual Result:

The two names are not the same.
The Name in Visio is ‘Customer_CustomerAddress_FK1’
The Name in real DB is ‘FK_CustomerAddress_Customer_CustomerID’
Actually, all foreign key’s names in Visio are not the same with it in real DB. The Visio file should be updated.