The cross-reference database

The cross-reference database is a database utilized by the Data Loader tool to map the object classes and fields of a source to those in a target. A source type can be a shapefile, coverage, or a geodatabase defined by a specific schema. A cross-reference database must be defined for each source type and schema. Sources of the same type with different schemas may require separate cross-reference databases.

The cross-reference database contains several tables with ID fields that define the relationships between the source and target schemas. For instance, if you want to create a cross-reference database based on two different schemas, and they both contain the RoadL feature class, there would be a row in the DatasetMapping table that maps the ID for the feature class in the source schema to the ID for the feature class in the target schema. These IDs would be from the SourceDatasets and TargetDatasets tables, respectively. The same happens if there are common fields within the mapped feature classes. If the Create Cross-Reference tool finds fields with common names in the two RoadL feature classes, the FieldMapping table will contain a row that maps the ID for the field in the SourceFields to that of the row in the TargetFields table.

The tables in the cross-reference database and how they relate to each other
The tables in the cross-reference database and how they relate to each other

SourceDatasets table

This table contains the names of all the feature classes and tables in the source schema, along with an identifier that is assigned to each one. This table may contain all the tables in the source dataset, regardless of whether they match what is in the target dataset.

There is one row created for each table in the dataset.

Field

Description

Id

A unique number that is automatically generated by the database. This identifier is used to reference the source dataset in the DatasetMapping and SourceFields tables.

Name

The name of the feature class or table in the source schema.

SourceDatasets table fields

TargetDatasets table

This table contains the names of all the feature classes and tables in the target schema, along with an identifier that is assigned to each one. This table contains all the tables in the target dataset, regardless of whether they match what is in the source dataset.

There is one row created for each table in the dataset.

Field

Description

Id

A unique number that is automatically generated by the database. This identifier is used to reference the target dataset in the DatasetMapping and TargetFields tables.

Name

The name of the feature class or table in the target schema.

SourceDatasets table fields

DatasetMapping table

This table defines the relationships between the source and target datasets. Additional information, such as WHERE clauses and subtype names, can be added to the table to further define which source features are loaded and into which target subtypes they are going to be loaded.

Field

Description

Id

A unique number that is automatically generated by the database. This identifier is used to reference the dataset mapping in the FieldMapping table.

SourceDatasetId

A reference to a feature class or table as defined in the Id field on the SourceDatasets table.

TargetDatasetId

A reference to the feature class or table as defined in the Id field on the TargetDatasets table.

WhereClause

This field allows you to define a subset of the source dataset to be loaded into the target dataset. For example, if you are loading lake features from a Hydrography_Areas source feature class into a Lakes target feature class, you can use the WhereClause field to define what condition needs to be met before the features are loaded into the Lakes feature class. In this instance, your WhereClause could be something like F_CODE = 'BH080', when the feature code of BH080 is defined as a lake.

Subtype

Defines the subtype within the target dataset into which the data should be loaded. It must be populated when the target dataset is a subtyped feature class, or your data loading will result in null subtype codes.

DatasetMapping table fields

SourceFields

This table contains a list of all the fields from each table in the source schema. There is one row for each field in each feature class. This means that even if a field is common throughout all the tables in the schema, each instance is accounted for in the table. The DatasetId value corresponds to the Id in the SourceDatasets table.

Field

Description

Id

A unique number that is automatically generated by the database. This identifier is used to reference the source field in the FieldMapping table

Name

The name of the field in the table

DatasetId

A reference to the feature class or table as defined in the Id field on the SourceDatasets table

SourceFields table fields

TargetFields

This table contains a list of all the fields from each table in the target schema. There is one row for each field in each feature class. This means that even if a field is common throughout all the tables in the schema, each instance will be accounted for in the table. The DatasetId value corresponds to the Id in the TargetDatasets table.

Field

Description

Id

A unique number that is automatically generated by the database

Name

The name of the field in the table

DatasetId

A reference to the feature class or table as defined in the Id field on the TargetDatasets table

SourceFields table fields

FieldMapping table

This table defines the relationship between fields in the source schema and the target schema. As a result, this table contains references to source and target dataset mapping information in the DatasetMapping table, as well as the identifiers for the source and target fields to be mapped, which are from the SourceFields and TargetFields tables, respectively.

The feature class that contains the field is identified through the DatasetMappingId field. There is one row for each field to be mapped within the common tables in the source and target datasets. For instance, if there are 10 rows in the table that have a DatasetMappingId value of 1, it means the fields all belong in the same table.

Field

Description

Id

A unique number that is automatically generated by the database. This identifier is used by the UpdateValues table to reference the field mapping.

DatasetMappingId

A reference to the dataset mapping record as defined by the Id field in the DatasetMapping table.

SourceFieldId

A reference to the source field as defined in the Id field on the SourceFields table.

TargetFieldId

A reference to the target field as defined in the Id field on the TargetFields table.

FieldMapping table fields

UpdateValues table

This table allows you to override values contained in a source field. For example, if the source schema contains a domain value of 1, but in the target schema the corresponding value is 29, you can use this table to replace the value of 1 with 29. This table is only necessary if you need to override source values.

Field

Description

Id

A unique number that is automatically generated by the database.

FieldMappingId

The identifier of the field whose values are being overridden. This value corresponds to the Id field on the FieldMapping table.

FromValue

The value in the source field that you want to overwrite.

ToValue

The value you want to use to replace the FromValue.

UpdateValues table fields

SDEOwner table

When working with ArcSDE data, by default, the Data Loader tool assumes you are connected to the source and target schemas as the data owner. As the owner of the data, you have privileges to append to the database and know the location of the schema, which is also known as a qualified connection to the data. If you are not connected as the data owner, then it will be necessary to populate the SDEOwner table.

The SDEOwner table allows the Data Loader tool to resolve table names by providing the data owner names, which are part of the qualified table name. The table contains two main columns, SDESourceOwner and SDETargetOwner, which allow you to specify the owner of the source schema and the owner of the target schema, respectively.

Field

Description

Id

A unique number that is automatically generated by the database.

SDESourceOwner

This field is optional. When you navigate to the source database using the Data Loader and you connect as the data owner, this field can be left empty. If you connect as a user that is not the data owner, you must populate this field with the data owner name for the database from which you want to load data.

NoteNote:

The user must have read privileges for the schema from which you want to load data.

SDETargetOwner

This field is optional. When you navigate to the target database using the Data Loader and you connect as the data owner, this field can be left empty. If you connect as a user that is not the data owner, you must populate this field with the data owner name for the database into which you want to load data.

NoteNote:

The user must have write privileges for the schema into which you want to load data.

SDEOwner table fields

Version table

This table contains current version information for the cross-reference database. It is intended for internal use only and is only utilized by the Upgrade Cross-Reference tool to ensure that the cross-reference database is at the current version.

Field

Description

Id

A unique number that is automatically generated by the database

Version

The number associated with the current cross-reference version

Version table fields

Related Topics


7/31/2012