The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....

Database Item IDs

Accessing a particular entry of the database is normally performed by using its database entry number p (see figure below). However, entry numbers may change during the lifetime of a database (i.e. after deleting one or more entries). Consequently, they must not be used to set up relations between database entries. In order to have a reliable, never-changing and unique key to the data in the database, each new entry automatically receives an item ID (parameter ItemID) which can be used to access a particular database entry even when the entry number has changed.

In order to retrieve the current database entry number of a particular item the method SearchForItemID should be used. Alternatively, the method GetClosestItemIDIx can be applied, which is, however, not so simple to use as the SearchForItemID method,

Hint: Please note that SearchForItemID performs a binary search in the index of item IDs (array IxItemID). Thus, searching an item ID is extremely fast and requires only very little time even in large databases with millions of entries.

Last Update: 2012-Oct-20