Uniquely Naming Database Objects

The database catalog in the database contains one row for each object (constraint, default, log, rule, stored procedure, and so on) created within a database. Because the name of any object must be unique in the database, you cannot assign the same name to two different objects, even if they are different object types (for example, a table and a CHECK constraint).

When you name database objects in a database diagram, you are alerted if the name you choose is being used by another object. An error occurs in the following situations when you attempt to give an object a name already defined in the database catalog.

Object you
attempt to name
Object already named in the database catalog
Outcome
Table Table Error
  Relationship Error
  Column Accepted
  Constraint Accepted in the diagram, but causes an error when you attempt to save
  Index Accepted
Relationship Table Error
  Relationship Error
  Column Accepted
  Constraint Error
  Index Accepted
Column Table Accepted
  Relationship Error
  Column Error if within same table; accepted across tables
  Constraint Error
  Index Accepted
Constraint Table Error
  Relationship Error
  Column Accepted
  Constraint Error
  Index Error
Index Table Error
  Relationship Error
  Column Accepted in the diagram, but causes an error when you attempt to save
  Constraint Error
  Index Error

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.