DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

Database

DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

hI,

iam new to teradata . So please tell me the diff between primary key and primary index.

Regards,
Sai
6 REPLIES

Re: DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

Using Primary Index Teradata distributes the data in it's AMP's.
Primary Key is an logical concept used by all the RDBMS, and it helps to uniquely identify each record in a Table.

Re: DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

If you are absolutely looking for the differences then below are few -

PRIMARY KEY PRIMARY INDEX

1 It cannot be NULL It can be NULL
2 It is not mandatory in Teradata It is mandatory in Teradata
3 It does not help in data distribution It helps in data distribution
4 It has to be unique It can be unique or non-unique
5 It is logical implementation It is physical implementation
6 It cannot be changed It can be changed.

Re: DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

Sorry about the formatting, but not sure, why teradata forum is removing all the lines and spaces today.
Teradata Employee

Re: DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

@KS42982,

The formatting glitch has been repaired.

Re: DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

That's a good news. I am trying again here.

PRIMARY KEY PRIMARY INDEX

1 It cannot be NULL It can be NULL
2 It is not mandatory in Teradata It is mandatory in Teradata
3 It does not help in data distribution It helps in data distribution
4 It has to be unique It can be unique or non-unique
5 It is logical implementation It is physical implementation
6 It cannot be changed It can be changed.
N/A

Re: DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

thanx @KS42982 for your post on the diff between primary key and primary index