dbTalk Databases Forums  

Primary key

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Primary key in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alexandr
 
Posts: n/a

Default Primary key - 05-04-2005 , 08:41 AM






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

Reply With Quote
  #2  
Old   
Gang He [MSFT]
 
Posts: n/a

Default Re: Primary key - 05-04-2005 , 02:38 PM






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 (AT) trinity (DOT) ntu-kpi.kiev.ua> wrote

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



Reply With Quote
  #3  
Old   
--CELKO--
 
Posts: n/a

Default Re: Primary key - 05-04-2005 , 04:36 PM



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. .


Reply With Quote
  #4  
Old   
Anith Sen
 
Posts: n/a

Default Re: Primary key - 05-04-2005 , 09:59 PM



Quote:
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




Reply With Quote
  #5  
Old   
John Weinshel
 
Posts: n/a

Default Re: Primary key - 05-06-2005 , 09:58 PM



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 (AT) trinity (DOT) ntu-kpi.kiev.ua> wrote

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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.