Relational Data Modeling - Primary key

About

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

Management

Declaration

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

Multiple-column

Multiple-column primary keys should be avoid as:

Having a surrogate key as primary key will avoid a Multiple-column primary key.

Sequence vs business key as primary key


Powered by ComboStrap