Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3805750
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:43:38+00:00 2026-05-19T14:43:38+00:00

Naming conventions are important, and primary key and foreign key have commonly used and

  • 0

Naming conventions are important, and primary key and foreign key have commonly used and obvious conventions (PK_Table and FK_Table_ReferencedTable, respectively). The IX_Table_Column naming for indexes is also fairly standard.

What about the UNIQUE constraint? Is there a commonly accepted naming convention for this constraint? I’ve seen UK_TableName_Column, UQ_TableName_Column, and someone recommending AX_TableName_Column – I don’t know where that comes from.

I’ve typically used UQ but I don’t particularly like it, and I do not enjoy having to defend my choice of using it against a UK advocate.

I would simply like to see if there is a consensus on the most prevalent naming, or a good reasoning as to why one makes more sense than the others.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:43:39+00:00Added an answer on May 19, 2026 at 2:43 pm

    My thinking is it isn’t a key: it’s a constraint.

    It could be used as a key of course, and uniquely identifies a row, but it isn’t the key.

    An example would be that the key is “ThingID”, a surrogate key used in place of ThingName the natural key. You still need to constrain ThingName: it won’t be used as a key though.

    I’d also use UQ and UQC (if clustered).

    You could use a unique index instead and go for “IXU”. By the logic employed, an index is also a key but only when unique. Otherwise it’s an index. So then we’d start with IK_columnname for unique indexes and IX_columnname for non-unique indexes. Marvellous.

    And the only difference between a unique constraint and a unique index is INCLUDE columns.

    Edit: Feb 2013. Since SQL Server 2008, indexes can have filters too. Constraints can not

    So, it comes down to one of

    • stick with UQ as per the rest of the SQL-using planet
    • use IK for unique indexes (IKC for clustered too) to be consistent…
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a recent VB.NET project I adopted the naming conventions I'm used to using
I have an instance function in javascript and for naming conventions I have other
Most programming languages have official naming conventions for functions, parameters, classes, etc. Official here
I have a question about C# Event naming conventions: private void button21_Click(object sender, EventArgs
But I'm wondering what the naming conventions are for this? Like.. I have object
I understand that naming conventions are important for a number of reasons, most having
C# has a few naming conventions for commonly-seen method types: BeginFoo() / EndFoo() for
I've read much about android package naming conventions, but still have no idea what
I have two interfaces and I'm confused about the naming conventions: interface InterfaceA {
Are there any naming conventions for tables/fields within MySQL? I have found a big

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.