EUID - A Summary

<< Click to Display Table of Contents >>

Navigation:  Professional > Database >

EUID - A Summary

The EQuIS Unique Identifier (EUID [yoo-id]) exists so that every record in the database can have a unique ID that distinguishes it from any other record in the database, regardless of what table it is in. This differs from IDs in the past (version 5 and earlier) that have been unique within a table (and sometimes the combination of table and facility). Originally, EUIDs were tracked in a system table called ST_ID. Over time, EUID tracking moved to a database sequence, SQ_EUID, and ST_ID became a view that queried this sequence.

 

EUID columns are not always required. In some cases, a EUID column can exist on a table that allows NULL values. This is not the case with the IDs that have been converted, such as SAMPLE_ID, TEST_ID, etc.; they are already required fields in the database.

 

Running the EQUIS.POPULATE_EUID stored procedure for a table will do the following:

populate the EUID field for every record in that table

make the EUID field for that table required

add a trigger to ensure that EUIDs are populated

 

Enabling auditing for a table or column will call this stored procedure. Not requiring EUIDs to be populated on every table reduces the number of IDs that are assigned and the overhead on the database for such.

 

EUIDs are required for some EQuIS features like notes; opening the Notes form for a record will automatically create a EUID for that record if one does not already exist.

 

The EQUIS.FIND_EUID procedure will find the primary data object based on the EUID. Executing the procedure returns the details of the primary data object to which the specified EUID is assigned (e.g. a record in DT_LOCATION or DT_SAMPLE or some other primary table).

 

The EQUIS.ADD_EUID_INDEX function will add indexing (to increase performance) to the table, regardless of whether or not the EUID column is computed. If the EUID column is computed, the index is added on the underlying ***_ID column.