Wednesday, October 7, 2009

What Is Row Id?


The unique identifier associated with every record in a Siebel Enterprise database is known as a Row Id. The column in which this value is found is ROW_ID and it is present on every table. The Row Id is unique for an entity. For example, the Row Ids for the same person in S_PARTY, S_CONTACT, and S_CONTACT_X are the same because they each refer to the same person.

Row Ids are used extensively throughout Siebel Enterprises to access specific records. Although users access records by a User Primary Key such as Opportunity Name, it is more efficient for the Siebel Enterprise to store and access related data via the Row Id.

The Row Id is a base-36 sequence number generated using a confidential, proprietary algorithm that ensures no duplication, thus protecting the referential integrity of the database. The ROW_ID column is VARCHAR(15), which may contain one or two non-numeric symbols (plus signs or hyphens, or both).

The format of the Row Id is one of the following:

CP-NS - Records created through the user interface
CP+NP+NS - Records created by Interface Manager (EIM)
CP-NP-NS - Records created by EIM (Starting in Siebel versions 6.2 and higher, and Siebel version 7)

Where:

CP = Corporate Prefix, up to 2 alphanumeric characters
NP = Next Prefix, up to 6 alphanumeric characters
NS = Next Suffix, up to 7 alphanumeric characters

The maximum length of the Row Id is 15 alphanumeric characters.

The corporate prefix will always be unique for any database (main or local). The server maintains its original value, and mobile databases created against that particular server database are always assigned a new, unique value.

All connected users share the same Next Prefix (NP), which is obtained from the table S_SSA_ID on the server database. Remote users are each assigned a unique prefix during extraction, which is also stored in the S_SSA_ID table, but on the local database.

Next Suffix (NS) is the heart of the Row Id and is generated with a proprietary algorithm. When a new record is created through the user interface, the Siebel application reads the value of the current NS column from S_SSA_ID table and increments this value by a value more than 1, for performance reasons. In Siebel applications version 7.5.3 and earlier, this value is generally incremented by 50. Starting in Siebel 7.7, the value is generally incremented by 1000. The client caches these potential Row Ids for future inserts. A new record entered from the user interface may result in many inserts to the underlying tables, depending on the business components used. When the client disconnects, cached Row Ids are lost.

In Siebel applications version 7.5.2 and earlier, the caching of Row Ids occurred on individual Application Object Manager (AOM) tasks. In Siebel applications version 7.5.3 and later, Row Id caching occurs on the AOM process itself. This change reduced the potential for contention issues on the S_SSA_ID table.

NOTE: If the client is in a database transaction when it needs to create a new Row Id, the object manager updates the S_SSA_ID table in a separate transaction and commits the transaction immediately.

NOTE: The logical schema reports the ROW_ID column as a VARCHAR, as does the physical schema.


1 comment:

Share/Bookmark