Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts

Monday, March 12, 2012

Primary key

Prompt me, what for need "primary key" in the database table?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.ntu-kpi.kiev.ua> wrote in message
news:20050504165710.GA11372@.trinity.ntu-kpi.kiev.ua...
> Prompt me, what for need "primary key" in the database table?|||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. .|||>> 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|||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.ntu-kpi.kiev.ua> wrote in message
news:20050504165710.GA11372@.trinity.ntu-kpi.kiev.ua...
> Prompt me, what for need "primary key" in the database table?