ArcGIS Server Banner

Registering tables to be used by ArcGIS Desktop

Registering tables to be used by ArcGIS Desktop

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
Data that you create or add to your ArcSDE geodatabase using ArcGIS Desktop software is automatically registered with ArcSDE and the geodatabase.

If instead you create spatial or nonspatial tables in the database management system (DBMS) using structured query language (SQL) or import data using the ArcSDE application programming interface (API), the tables may not be registered with ArcSDE, and they will not be registered with the geodatabase.

In most cases, to use the table with ArcGIS Desktop, you will register it with both ArcSDE and the geodatabase. However, you do have different registration options, which vary depending on whether the table is spatial (contains a geometry column) or not. The following table indicates what functionality exists for nonspatial and spatial tables depending on how they are registered:


Table type Not registered with ArcSDE or the geodatabase Registered only with the geodatabase Registered only with ArcSDE Registered with both ArcSDE and the geodatabase
Nonspatial
  • Can be previewed in ArcCatalog
  • Can be added to ArcMap to participate in joins or relates
  • Same functionality as a nonregistered table plus can participate in relationship classes and use subtypes, domains, and validation rules
  • Cannot be edited in ArcGIS Desktop or registered as versioned
  • Same functionality as nonregistered table plus can be edited (nonversioned) in ArcMap and registered as versioned*
  • Cannot use subtypes, domains, validation rules, or relationship classes
Full geodatabase functionality is available. For information on fully registered table functionality in the geodatabase, see the topic Table basics, including the section Extending tables, in the section "An overview of the geodatabase" in the help.
Spatial Cannot be used in ArcGIS Desktop Not possible; must be registered with ArcSDE before registering with the geodatabase
  • Can be previewed in ArcCatalog
  • Can be registered as versioned*
Full geodatabase functionality is available. For information on fully registered feature class functionality in the geodatabase, see the topic Feature class basics, including the section Extending feature classes, in the section "An overview of the geodatabase" in the help.

*Registering a table as versioned automatically registers it with the geodatabase.

The following sections describe adding a row ID column to allow the table to be registered with ArcSDE, registering a table with ArcSDE, and registering a table with the geodatabase. As noted in the table above, nonspatial tables can be registered with the geodatabase and not with ArcSDE. If you plan to do so, jump to the section Registering a table with the geodatabase. For spatial tables, you must first register them with ArcSDE, then with the geodatabase.

Preparing a table to register it with ArcSDE

To register a table with ArcSDE, it must meet at least the following criteria:

If you register the table as a feature class, it must meet these additional criteria:

Row ID columns

As mentioned in the preceding requirements, the row ID column does not have to exist before you register the table with ArcSDE. However, it is best to include a NOT NULL, integer column to be used as the row ID as part of the table's original definition and add a unique index to it or, at least, add the row ID column before data is inserted into the table.

If you must add the row ID column to a table that already contains data, ensure that the column is populated with unique integer values.

If you decide to use an existing column, it is also best if there is no existing data in the table. Repopulating the ID column either because it contained null values or because it contained nonunique values is an expensive process, especially if the table contains more than 100,000 records. Be aware, too, that in certain circumstances, the values in the column could be repopulated automatically by ArcSDE when you register the table. See the section Using an existing column as an ArcSDE maintained row ID for these circumstances.

When you register a nonspatial table with ArcSDE using the sdetable command, there are three options for the maintenance of the row ID column values: NONE, USER, and SDE. NONE means no row ID column is defined for the table. USER indicates you (or the third-party application) maintain the values in the row ID column, and SDE means the values in the row ID column are maintained by ArcSDE. Having a row ID that contains values automatically supplied by ArcSDE helps to ensure that each of the rows is uniquely identified. If you want to use the data with ArcGIS Desktop, it is recommended that the row ID column be registered as ArcSDE maintained. For a row ID column to be registered as ArcSDE maintained, it must be an integer type and contain only unique values; it cannot contain null values.

When you register a spatial table with ArcSDE using the sdelayer command, there are two options for the maintenance of the row ID column values: USER and SDE. SQL types require the presence of a row ID column, so NONE is not a viable option with sdelayer –o register. The USER and SDE options indicate the same things as they do with nonspatial tables, as discussed in the previous paragraph.

Be aware that if you register the row ID column in a spatial table as user maintained and subsequently register the feature class with the geodatabase, ArcGIS will add an additional row ID column, object_ID. ArcGIS will maintain the values of this column.

Creating an ArcSDE maintained row ID column

If the row ID column does not exist when the table is registered, ArcSDE adds a column of type INTEGER, with a NOT NULL constraint. If the table contains rows, ArcSDE populates the column with unique ascending values starting at your specified minimum ID value. The minimum ID value defaults to 1 if you do not specify one. It then creates a unique index on the column R<registration_id>_SDE_ROWID_UK, where registration_id is the registration identifier ArcSDE assigns the table when it is registered.

ArcSDE creates a sequence generator, R<registration_id>, and uses it to generate the next value of the row ID column whenever a value is added to the column.

Using an existing column as an ArcSDE maintained row ID

If the row ID column already exists, ArcSDE confirms that the column was defined as an integer. If the column is not an integer type, the registration fails.

Next, ArcSDE confirms that the column has a unique index. If the column was defined with a nonunique index, ArcSDE drops the index and attempts to create a unique index on the column. If the index creation fails because the column contains nonunique values, ArcSDE repopulates the column with ascending values beginning at 1 and creates the unique index. ArcSDE names the unique index R<registration_id>_SDE_ROWID_UK.

Next, ArcSDE verifies that the column has been defined as NOT NULL. If the column was defined as NULL, ArcSDE attempts to redefine it as NOT NULL. If this action fails because there are null records present in the table, ArcSDE repopulates the column and defines it as NOT NULL.

Registering a table with ArcSDE

Registering a spatial table with ArcSDE creates a feature class and adds records for the table in the LAYERS and TABLE_REGISTRY system tables, a record for the spatial column in the GEOMETRY_COLUMNS system table, and one record for each column in the table to the COLUMN_REGISTRY system table. (These are the sde_layers, sde_table_registry, sde_geometry_columns, and sde_column_registry tables in SQL Server and PostgreSQL.) Registering the table with ArcSDE as a feature class allows you to view the data in ArcGIS Desktop and register the feature class as versioned. Spatial queries can be performed against the feature class if a spatial index has been created on it.

Registering nonspatial tables adds a record for the table in the TABLE_REGISTRY system table and one record for each column in the table to the COLUMN_REGISTRY system table. Registering the table with ArcSDE allows you to view and select the data in ArcGIS Desktop, perform nonversioned edits, and register the table as versioned.

To register a nonspatial table (one that does not contain a geometry field) with ArcSDE, use the sdetable command with the register operation. The basic syntax to register the table with ArcSDE is as follows:

sdetable –o register –t <table_name> 
[(–c <row_id_column> –C {SDE | USER| NONE}]
[–M <minimum_row_id>] [–S <table_description>]
[–k <configuration_keyword>] [–i <service>]
[–s <server_name>] [–D <database>] –u <database_user>

NOTE: You do not have to register nonspatial tables with ArcSDE before registering them with the geodatabase. However, if you do not register a table with ArcSDE, the table cannot be edited.

To register a table containing a spatial column with ArcSDE, use the sdelayer command with the register operation. The following is the syntax to register a layer with ArcSDE:

sdelayer –o register –l <table_name,spatial_column_name> –e <entity_mask>
{[–C <row_id_column>[,{SDE | USER}[,<minimum_row_id>]]]}
[{–R <spatial_reference_id> | [Spatial_Ref_Options]}] [–k <configuration_keyword>] 
[–t <storage_type>] [–S <layer_description_str>] 
[–i <service>] [–s <server_name>] [–D <database>] 
–u <database_user> –p <database_user_password>

Where [Spatial_Ref_Options] include

[-x <xoffset,yoffset,xyscale[,xyClusterTol]>]
[-z <zoffset,zscale[,zClusterTol]>] [-m <moffset,mscale[,mClusterTol]>]
[-G {<projection_ID> | file=<proj_file_name>}]

Options in square brackets, [], are optional depending on your situation.

As stated in the previous section, if you do not specify the row ID column, ArcSDE creates one for you to use. If you do specify an existing row ID column and want the geodatabase to use that same column as the object ID, be sure to specify SDE with the –C option.

Only the owner of the table can register it, so the database user specified with the –u option should be the user who owns the table.

NOTE: For instructions on using the sdetable or sdelayer commands, see the ArcSDE Administration Command Reference provided with the ArcSDE component of ArcGIS Server Enterprise.

Registering a table with the geodatabase

Registering a table or feature class with the geodatabase adds a record to the GDB_OBJECTCLASSES system table. Registering a feature class also adds a record to the GDB_FEATURECLASSES system table.

In addition, registering a feature class or table with the geodatabase adds an ObjectID field to the table. This field is populated by the geodatabase with unique ID numbers.

If you register a nonspatial table with the geodatabase and the table already contains an ObjectID field, you are presented with a dialog box that allows you to use the existing field or add a new field, ObjectID_1.

NOTE: If you choose to use the existing field, be aware that any existing values in the field will be overwritten.

If you register with the geodatabase a feature class that already contains a field named ObjectID, an ID field is automatically added to the business table. This ID field's data type is Object ID. The field is populated with unique values for each record in the business table. These values are generated by the geodatabase.

Be aware that there can be only one field with a data type of Object ID in a feature class registered with the geodatabase. If the existing ObjectID field was registered with ArcSDE as a user-maintained ObjectID, the data type on the existing ObjectID field will be changed to Long Integer. If the existing ObjectID field was registered with ArcSDE as ArcSDE maintained, the existing ObjectID will be used for the ObjectID.

Feature class properties of a feature class registered with the geodatabase

NOTE: Because ArcGIS cannot add an ObjectID field to a view nor update the values in an existing ObjectID field in a view, you cannot register a view with the geodatabase.

To register a nonspatial table or a feature class with the geodatabase in ArcCatalog, follow these steps:

  1. Start ArcCatalog.
  2. Right-click the table or feature class you want to register with the geodatabase.
  3. Click Register with Geodatabase.
  4. If you are registering a nonspatial table that already contains an ObjectID field, choose either to use the existing field to store ObjectIDs or create a new field. Click OK.

Once the dataset is registered with the geodatabase, you can use functionality such as relationship class participation, adding subtypes to it, and using domains with it. In addition, for feature classes, you can move them into a feature dataset so the feature class can be used in topologies, networks, terrains, and other feature dataset constructs. (To use functionality such as network datasets, terrains, schemas, and cadastral fabrics, you must have the required ArcGIS extension installed and enabled.)

NOTE: You cannot copy and paste the feature class into a feature dataset in the same geodatabase; you must move it into the feature dataset by dragging it. Copying the feature class would create a second feature class with the same name. Since feature class names must be unique in the geodatabase, copying the feature class fails. Also, remember that both the feature dataset and the feature class that is added to it must be owned by the same user.