Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A logical primary key is a primary key that uniquely identifies each data occurrence in a data subject and is used to properly normalize the data during logical data design.  It must be meaningful to the business, and is usually natural.  A physical primary key is a primary key that is useful for unique identification of data records in a data file and can be used for navigating between data files in a database.  It may or may not be meaningful to the business, and can be natural or artificial.

Business primary key (natural primary key): In the database table, fields with business logic meanings are used as the primary key, which is called "natural primary key )".

Logical primary key (proxy primary key, surrogate key): In a database table, a field irrelevant to the logic information in the current table is used as its primary key, which is called "proxy primary key ".
-- https://topic.alibabacloud.com/a/thoughts-on-logical-primary-font-colorredkeyfont-business-primary-font-colorredkeyfont-and-composite-primary-font-colorredkeyfont_6_103_31694731.html

Disambiguate

  • A Logical Table's Primary Key.

Logical Table's Primary Key

It is unfortunate that that SQL constraint was named primary key because it confuses the related but different concepts of the Logical Entity primary key and the Physical Storage primary key of the entity. While it is certainly possible, and not infrequently the case, that the same fields are used for both the logical and physical primary key, this is not required and also frequently not desirable.

The Logical Entity primary key is the object referred to in Database textbooks discussing relational theory. It is this object that one refers to when Normalizing relation structures, and it is (of course) one of the candidate keys that exist for the Entity in the logical model.

The Physical Storage primary key is an attribute in the Physical Model, possibly in addition to those attributes defined in the Logical Model for the Entity, which is used by the DBMS to uniquely identify the storage for an instance of the Logical Entity. This is the object being referred to in the primary key constraint when defining the (physical) schema for an entity's storage. When this Physical Storage primary key differs from the Logical Entity primary key it is most commonly because an artificial key has been appended to the logical attributes in order to:
-- https://stackoverflow.com/questions/19200344/difference-between-a-primary-key-attribute-and-other-attributes-in-a-table Stackoverflow

Panel
panelIconId1f4ad
panelIcon:thought_balloon:
panelIconText💭
bgColor#F4F5F7

The primary key constraint belongs to the physical model.
With the understanding that the so-called physical aspect actually refers to source code, database schemas and the like.