• This is an interesting topic, which needs further discussion. As an example I have several tables that have duplicated foreign keys to the same relationship. When resolving system generated foreign keys into something more developer/support friendly, there are two options.

    1.FK_ForeignTableName_ForeignColumnName(s)_PrimaryTableName_PrimaryColumnName(s) (SQL-92, so some degree)

    Or in the parent child order of:

    2.FK_PrimaryTableName_PrimaryColumnName(s) _ForeignTableName_ForeignColumnName(s)

    The standard doesn't seem to be well established for SQL Server if you want to name your own foreign keys, so from my perspective, this must be decided within the organization or enterprise. I have never liked the system generated method and the number one method above is more to SQL-92 standards. I personally like the second option, for it has a natural flow.

    The problem I have had is the renaming of the system established foreign keys is best resolved using 4-points names Option 1 or 2 above. Failure to use something that has just three qualifiers will result in duplicate names for foreign keys and thus be un-usable.

    I welcome any return comments.

    Hank Freeman
    Senior SQL Server DBA / Data & Solutions Architect
    hfreeman@msn.com
    678-414-0090 (Personal Cell)