Introduction to the Unique_Identifier_Links Table
The unique_identifier_links table is designed to establish and manage relationships between unique identifiers in a hierarchical structure. This table plays a crucial role in tracking the assembly and disassembly of components, associating process entries with unique identifiers, and maintaining a historical record of these relationships.Table Structure
The unique_identifier_links table is structured to capture the complex relationships between unique identifiers and their associated data. Here’s a detailed breakdown of its columns:Usage and Functionality
The unique_identifier_links table is designed to be flexible and informative, capturing the dynamic relationships between components. Here are some key points about its usage:-
Hierarchical Component Structure: The table allows for the creation of a hierarchical structure of components through the
unique_identifier_idandhas_child_of_idcolumns. This enables the system to track complex assemblies and sub-assemblies. -
Active Status Tracking: The
is_activecolumn allows for soft deletion of links. When a link is no longer valid, it can be marked as inactive rather than being permanently deleted, preserving the historical record. -
Removal Information: When a link is deactivated, the
removed_at,removed_by_user_id, andremoval_reasoncolumns capture important metadata about the removal process, enhancing traceability. -
Process Association: Each link is associated with a specific process entry through the
process_entry_id, allowing for detailed tracking of assembly or disassembly operations.
Notes
-
The table is used extensively in genealogy queries, such as in the
sn_lookup_pagefunction, to trace relationships between unique identifiers and construct component hierarchies. -
Example usage in TypeScript:

