Feature Overview: Universally Unique ID (UUID) for Records (#23741)
Overview
This feature adds a new data field called RecordID throughout the system to store data to Indicate that the column holds unique identifiers for individual records.
In this Topic:
Introduction:
When designing a database schema, choosing appropriate names for columns is crucial for clarity and maintainability. One common scenario is naming the column that stores unique identifiers for individual records within a table. In this context, RecordID emerges as a compelling option due to its intuitive usage and clear indication of purpose.
Benefit of RecordID:
- Clarity: The term
RecordIDclearly communicates that the column contains identifiers for individual records. - Intuitiveness: It is easy for developers and database users to understand that
RecordIDuniquely identifies each record. - Consistency:
RecordIDfollows a common naming convention, promoting consistency across the database schema. - Direct Referencing: When used as a foreign key in other tables,
RecordIDnaturally implies a direct reference to individual records. - Uniqueness:
RecordIDis essentially universally unique and thus can be confidently used as a reference key value when working with external systems or when field verification must be absolute.
Naming Convention:
Main RecordID:
Within a table where records are stored, the unique identifier column is simply named “RecordID.” This convention provides a clear and concise label for the primary key of the table.
Related Tables:
When referencing records from another table, the naming convention [Entity]_RecordID is employed. Here, “[Entity]” represents the name of the related entity or table, and “_RecordID” indicates that the column serves as a reference to the primary key of that entity.
Example:
ARC_OrderHeader referencing CUS_Account:
- Primary Table: In the
CUS_Accounttable, each record represents an account belonging to a user. The column, which uniquely identifies each account, is namedRecordID. - Related Table: In the
ARC_OrderHeadertable, which stores archived orders, there is a need to reference the account associated with each order. To achieve this, a column is introduced, namedAccount_RecordID, following the convention{Entity}_RecordID. This column links to theRecordIDcolumn in theCUS_Accounttable.