Skip to content

아직 한국어로 제공되지 않습니다. 한국어로 제공되는 모든 내용 보기

Stockertim Dictionary · Technology

Primary key

Also called primary keys, unique key

In short

A column, or combination of columns, whose value identifies each row of a database table uniquely and is never allowed to be blank.

  • Advanced
  • Technology
  • Checked

In detail

In a relational database every table needs a reliable way to point at one row and only one, and the primary key does that job. It may be a single column, such as an account number, or a composite of several, such as ticker plus trading date in a table of daily prices, where neither column is unique by itself but the pair is. The database enforces the rule by rejecting any new row whose key already exists or is empty.

Keys make data trustworthy and quick to search. Duplicate rows are among the commonest causes of wrong totals, and a key stops them at the door. Other tables refer to a row through its key using a foreign key, which is how a trades table links to a clients table without copying every client's details. The database also builds an index on the key, so fetching one row among millions takes a fraction of a second.

Designers choose between natural keys, taken from the real world such as an ISIN, and surrogate keys, which are arbitrary numbers issued by the system. Natural identifiers can change, for example when a company switches ticker after a merger, so many systems use a surrogate key and keep tickers and codes as ordinary columns.

Worked example

A price table holds one row per share per day, with the key (ticker, trade_date).

  1. Loading KSTL for 3 November 2026 a second time is refused as a duplicate
  2. KSTL for 4 November and HRBR for 3 November are both accepted, because each pair is new

The composite key keeps exactly one closing price per share per day.

In practice

Exchange data feeds, bank ledgers and regulatory reporting systems all rely on keys. When analysts merge two datasets, confirming that the join columns are unique in at least one of them is the step that stops rows multiplying unexpectedly.

Watch out

  • A ticker alone is rarely a safe key, because tickers get reused and changed.
  • A key ensures uniqueness, not correctness: a wrong date in a valid format is still accepted.

Learn it properly

Official sources

Facts last checked on 4 November 2026.

Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.

English