Logical Data Modeling - Primary Key (Id, Name)

Data System Architecture

About

A Primary Key is a key that identify indefinitely uniquely an element:

in their local scope.

It's a part of the fully qualified identifier.

Characteristic

Immutable

A real primary key is immutable as it should identify the entity for ever.

Note that if the data is:

  • meaningful,
  • visible (to end users)
  • external such as natural key.

the data will change in some time and are not truly good candidate for a real primary key.

That's why the primary key should be generated (surrogate key)

Storage

The less, the beter has a primary key is used everywhere:

Generally a primary key is stored via a traditional 4-byte index value.

Data Type

Numeric

A numeric primary key is called an id

Textual

A textual primary key is called a name

Type

Entity

A entity key is a key that:

  • identify uniquely a single entity
  • doesn't change over time. If the primary key has a chance – however remote – of changing, well, then it is NOT the primary key.
  • define, in dimensional modeling, the lowest level of an entity

This is one or a group of attributes such that the relationship between the entity set and the attribute value sets has a one-to-one cardinality.

Relationship

The primary key of a relationship is the primary keys of the involved entities.

Type

There are two fundamental types of primary keys:

  • natural
  • and surrogate (artificial/generated)

Synthetic / Surrogate key

What is a Surrogate Primary key? known also as Substitute, Synthetic or Generated Key - Logical Data Modeling - - A synthetic key is a generated one.

Natural

What is a natural key in data modeling

Implementation





Discover More
Data Modeling Chebotko Logical
Cassandra - Primary Key

This page talks the primary key of a cassandra table. The primary key is composed of: in first position: the partition keys columns that defines the data location and partition in successive position:...
Jpa Mapping Method
JPA - Entity Annotations

A key feature of EJB 3.0 and JPA is the ability to create entities that contain object-relational mappings by using (metadata) annotations rather than deployment descriptors (orm.xml) as in earlier versions....
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....
Data System Architecture
Logical Data Modeling - Global Identifier (Fully Qualified Name, Canonical Form)

A global identifier identify uniquely a primary element (entity or relationship) in the global scope It's also generally known as: the fully qualified id the fully qualified name the canonical...
Data System Architecture
Logical Data Modeling - Id attribute

An id is an label attribute with a numeric representation that identify uniquely an entity or a relationship in a local scope. name If the id attribute is chosen as the local identifier, it will be:...
Data System Architecture
Logical Data Modeling - Key

A key refers to a attribute, or a group of attributes, which assumes a unique value for: each entity in a entity set. or relationship in a relationship set. keyidentifier... database primary...
Data System Architecture
Logical Data Modeling - Primary Modeling Elements

In data modeling, the primary elements are: entity and relationship They are uniquely identifiable and therefore can be considered as resources. They are identified with the help of a primary key...
Data System Architecture
Logical Data Modeling - Relationship

A relationship is a model element that relates two entities . In its simple form (semantic form), it's a description that has a verb such as: has consists of uses ... entityentity setrelationship...
Data System Architecture
Logical Data Modeling - Scope

The scope is a (depth|level) of a hierarchical namespace. As namespace, the scope groups name but at a hierarchical level. the global scope of a linux file system is / the local scope for a file...
Data System Architecture
Logical Data Modeling - Unique Key

A Unique Key identifies: the lowest level of an entity the unique identifier of a single instance remains unique over time butcan change over time. and enforces uniqueness primary key The set...



Share this page:
Follow us:
Task Runner