One must not get confused between Primary Key and Primary Index in Teradata. Primary KEY is more of a logical thing however Primary INDEX is more of physical thing. In Teradata, Primary INDEX is used for finding best access path for data retrieval and data insertion and Primary KEY is used for finding each rows uniquely just like in other RDBMS. So below are few differences between PRIMARY KEY and PRIMARY INDEX:
PRIMARY KEY
|
PRIMARY INDEX
| |
1
|
PRIMARY KEY cannot be NULL
|
PRIMARY INDEX can be NULL
|
2
|
PRIMARY KEY is not
mandatory in Teradata |
PRIMARY INDEX is mandatory
In Teradata |
3
|
PRIMARY KEY does not help
in data distribution. |
PRIMARY INDEX helps in data
distribution. |
4
|
PRIMARY KEY should be
unique. |
PRIMARY INDEX can be UNIQUE
(Unique Primary Index)
or NON UNIQUE (Primary Index).
|
5
|
PRIMARY KEY is logical
implementation. |
PRIMARY INDEX is physical
implementation. |
No comments:
Post a Comment