ArcGIS Server Banner

Keyset tables in a geodatabase in Oracle

Keyset tables in a geodatabase in Oracle

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
A keyset table is used to store a list of selected rows when an ArcGIS Desktop client executes a geodatabase relationship query that joins tables using attributes that are type integer, number, date, or string.

As discussed in Log file configuration options, log file tables store the OBJECTIDs of the selected features. Keyset tables are used to accommodate joins using attributes other than the OBJECTID.

One keyset table is created per connection per session when there are more than 99 rows in the source set in the database query.

Keyset tables in ArcCatalog and ArcMap

You will not see keyset tables in ArcCatalog or ArcMap. However, you will cause a keyset table to be created and populated when you select more than 99 records in a dataset involved in a relationship class in ArcMap, then open the attribute table and use the Related Tables list in the Options menu to retrieve the related table. You will also cause a keyset table to be created if you edit.

Keyset tables in an Oracle DBMS

No keyset tables are present in the geodatabase until one of two things happens:

When a user who has CREATE TABLE privileges causes a keyset table to be created, the keyset table is created in that user's schema. If a user does not have CREATE TABLE privileges, a procedure is invoked to create a keyset table in the ArcSDE administrator's schema. The keyset table is deleted when the user disconnects from the database.

Keyset table names are in this format:

<user_schema>.keyset_<process_id>

They store a keyset ID number for each selection set and values for the field on which the relationship between the feature classes is based.

The following is a keyset table for a selection made between the related tables LATERALS and CONTRACTORS. In this case, the LONG_VAL field would be populated and contain the values of the CONTRACTOR_ID field on which the relationship class between LATERALS and CONTRACTORS is based. Notice that the user schema is SDE, which would indicate the user who caused the keyset table to be created did not have CREATE TABLE permission in the SDE database.

Keyset table and its associated business tables in Oracle

<user_schema>.keyset_<process_id>

The following is the definition for a keyset table in Oracle.


Field name Field type Description
KEYSET_ID NUMBER(38) Identifier of the keyset selection

NOT NULL
LONG_VAL NUMBER( Value of the field on which the relationship class is based, if that field is a number field
STR_VAL NVARCHAR2(256) Value of the field on which the relationship class is based, if that field is a string field
DBL_VAL DOUBLE Value of the field on which the relationship class is based, if that field is a floating-point number field
DATE_VAL DATE Value of the field on which the relationship class is based, if that field is a DATE field

Keyset tables in an XML document

Keyset tables do not get stored in an XML document because they are temporary tables.

See Also

  • Relationships between datasets in a geodatabase in Oracle