Relational Data Modeling - Primary key

Data System Architecture

About

A primary key is a one or more columns that holds the primary key of a row in a table.

A Primary Key identify:

  • the lowest level of a 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 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 avoided as:

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

Sequence vs business key as primary key

Surrogate Vs Natural





Discover More
Star Schema
Dimensional Data Modeling - Fact Table

A fact table is a table that stores fact where a fact can be seen as the representation of an event. It's also known as: Transactional history Unalterable fact. (The content of this kind of table...
Data System Architecture
Logical Data Modeling

A data model in software engineering is a graph of entity that try to represent the reality and describes how data are represented and accessed. the real world consists of entities and relationships....
Card Puncher Data Processing
Oracle Database - Rowid Scans operation

The rowidscan is a access path used by the query optimizer to produce the best explain plan. The rowid of a row specifies the datafile and data block containing the row and the location of the row in...



Share this page:
Follow us:
Task Runner