Unique Identifiers

  • Please clear up this controversy in our office.

    Should EVERY table in a database have a keyID field to be able to identify any record (just as a standard operating procedure).

    Thanks for clearing this up.

  • For the company that I work for, it is part of the SQL Server Standards that all tables will have a Primary Key and will use Foreign Keys where required.

  • On the whole i agree with DAVNovak, that every table should have a unique reference point.

    Just because you have a PK does not mean that there is no data corruption, but is a pretty good start.

  • I'd agree that it's an accepted best practice to have a primary key on each table. What the key should consist of is usually where the fun begins. Some opt for natural keys, other for generated ones, either identity or uniqueidentifier (or some other made up key). Regardless, having a pkey should always be a requirement.

    Andy

    http://qa.sqlservercentral.com/columnists/awarren/

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply