Relationships Between Primary Indexes and Primary Keys - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
jiv1600056352873.ditamap
dita:ditavalPath
jiv1600056352873.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantageā„¢

The following table describes some of the relationships between PKs and PIs.

Primary Key Primary Index
Identifies a row uniquely. Distributes rows.
Does not imply access path. Defines most common access path.
Must be unique. May be unique or nonunique.
May not be null. May be null.
Causes a Unique Primary Index (UPI) or Unique Secondary Index (USI) to be created. N/A
Constraint used to ensure referential integrity. Physical access mechanism.
Required by Teradata Database only if referential integrity checks are to be performed. Defined for most production tables. Some staging tables may not have a primary index (NoPI table).
  • If Teradata Database performs referential integrity checks, then the column limit is 64.
  • If Teradata Database performs no referential integrity checks, then there is no arbitrary column limit.
64-column limit.
Values should not be changed if you want to maintain data integrity and preserve historical relations among tables. Values can be changed.

The columns chosen for the UPI of a table are frequently the same columns identified as the PK during the data modeling process, but no hard-and-fast rule makes this so. In fact, physical database design considerations often lead to a choice of columns other than those of the primary key for the PI of a table.