Relational Data Modeling - Primary key


A primary key is a column that holds the primary key of a row in a table.

A Primary Key identify:

  • the lowest level of an table
  • the unique identifier of a single row
  • doesn't change over time. If the primary key has a chance – however remote – of changing, well, then it is NOT the primary key. This would be like you changing your DNA halfway through your life.

A primary key is created with a primary key constraint



A primary key is declared with the creation of a primary key constraint.

Sequence vs business key as primary key

Sequence as primary key


  • You can't search on the business key in an external table.
  • You need to do an extra action to get the primary key (join in SQL or show the information on the screen)


  • Gain on IO in the internal table but also in the external table
  • If the grain of a (external|dimension) table changes, you don't need to add a column in the fact table

Powered by ComboStrap