Primary key

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexandr

    Primary key

    Prompt me, what for need "primary key" in the database table?
  • Gang He [MSFT]

    #2
    Re: Primary key

    Primary key is the other way to create a unique clustered index, just like
    unique key is equal to create unique nonclustered index. There is no big
    difference between primary/unique key contraint v.s direct create unique
    clustered/nonclustered index statement.

    --
    Gang He
    Software Design Engineer
    Microsoft SQL Server Storage Engine

    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Alexandr" <alex@trinity.n tu-kpi.kiev.ua> wrote in message
    news:2005050416 5710.GA11372@tr inity.ntu-kpi.kiev.ua...[color=blue]
    > Prompt me, what for need "primary key" in the database table?[/color]


    Comment

    • --CELKO--

      #3
      Re: Primary key

      If a table does not have a primary key, then BY DEFINITION it is not a
      table. You need to read a book on RDBMS foundations and the relational
      model. .

      Comment

      • Anith Sen

        #4
        Re: Primary key

        >> Prompt me, what for need "primary key" in the database table?

        Logical identification of an entity.

        A key, by definition, is an attribute or set of attributes which can
        uniquely identify an entity in the conceptual model. In the logical
        representation, a column or set of columns which can uniquely identify a row
        in a table is termed as a key. In practice, an entity may have many such
        candidates for key ( hence called candidate key ), however for practical
        purposes one out of those candidate keys has to be considered primal ( hence
        called primary key ). The considerations should include Familiarity (
        meaningful & familiar to the user ), Stability ( should not be altered
        frequently ), Simplicity ( so that relational expressions can be effective )
        and Irreducibility ( or Minimality which loosely suggests no subset of the
        key should uniquely identify a row in the table )

        --
        Anith


        Comment

        • John Weinshel

          #5
          Re: Primary key

          Keys are objects in rows, not tables; each row requires one PK.

          It is the unique identifier, without which a row cannot be positively
          identified.

          It allows a row to be connected ('related') to other rows, when the other
          row has a field with the same data type and the same value. From there, you
          can build relational database systems.


          "Alexandr" <alex@trinity.n tu-kpi.kiev.ua> wrote in message
          news:2005050416 5710.GA11372@tr inity.ntu-kpi.kiev.ua...[color=blue]
          > Prompt me, what for need "primary key" in the database table?[/color]


          Comment

          Working...