Skip to end of banner
Go to start of banner

Logical Primary Key

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

In relational database terms, a "logical primary key" refers to a column or combination of columns in a database table that is designated as the unique identifier for each row or record in that table. The primary key serves as a reference point for establishing relationships between different tables in a relational database.

The logical primary key is a conceptual designation rather than a physical attribute. It represents the logical or conceptual uniqueness of a record and is typically implemented using a unique constraint or index in the database.

By enforcing uniqueness, the primary key ensures that each row in the table can be uniquely identified and accessed. It provides a means to uniquely identify and relate records across different tables through foreign key relationships, enabling efficient data retrieval and maintaining data integrity.

In most cases, a logical primary key consists of a single column, often an auto-incrementing numeric value. However, it can also be composed of multiple columns if the combination of those columns guarantees uniqueness across the table.

Use in SQL Server Analysis Services (SSAS)

Define Logical Primary Keys in a Data Source View (Analysis Services)
… If a table, view, or named query does not have a physical primary key defined, you can manually define a logical primary key on the table, view or named query in Data Source View Designer.

The Data Source View Wizard and Data Source View Designer automatically define a primary key for a table that is added to a data source view based on underlying database table.

Occasionally, you may need to manually define a primary key in the data source view. For example, for performance or design reasons, tables in a data source may not have explicitly defined primary key columns. Named queries and views may also omit the primary key column for a table. If a table, view, or named query does not have a physical primary key defined, you can manually define a logical primary key on the table, view or named query in Data Source View Designer.

https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/define-logical-primary-keys-in-a-data-source-view-analysis-services?view=asallproducts-allversions


SQL Server Analysis Services (SSAS) is a powerful tool for building and deploying analytical solutions. One of the key components of SSAS is the data source view (DSV),

What are logical primary keys and relationships?
Logical primary keys and relationships are metadata properties that you can assign to tables and columns in your SSAS DSVs. They are not the same as physical primary keys and foreign keys in your data sources, although they can be derived from them. Logical primary keys and relationships are used by SSAS to identify unique rows, enforce referential integrity, and support dimension and attribute relationships. – https://www.linkedin.com/advice/0/how-do-you-use-logical-primary-keys-relationships#:~:text=What%20are%20logical%20primary%20keys,can%20be%20derived%20from%20them.

Use in SAP

The term primary key refers to a logical primary key for a table. The SAP ASE server expects that every logical primary key has a unique index defined on it … – https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36273.1600/doc/html/san1393052111466.html

Natural vs. Physical Primary Keys

A natural primary key is a primary key that is an inherent feature of the data occurrences.  It is usually assigned outside the organization and is inherited by the organization.  A natural primary key is usually, though not always, a meaningful primary key. 

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.

Disambiguate

  • A Logical Table's Primary Key.

Logical Table's Primary Key

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.