Relationships between datasets in a geodatabase in Informix

Relationships manage associations between objects in one table and objects in another. Creating relationship classes between tables in your geodatabase can help maintain referential integrity, allows you to more efficiently edit related tables, and gives you the ability to query related tables. The following types of relationships between tables in a geodatabase are supported:

Just as features are stored in a feature class and nonspatial rows are stored in tables, relationships are stored and managed in a relationship class.

For details on relationships and relationship class cardinality, see Relationship class properties.

Relationships in ArcGIS Desktop

In the Catalog tree, relationship classes appear as part of a feature dataset. Relationship classes are represented with the following icon:

You can view information about relationship classes by right-clicking the relationship class and clicking Properties to open the Relationship Class Properties dialog box.

Feature-linked annotation is a type of relationship class. On the Relationship Class Properties dialog box, you can see that the Distribmains feature class participates in a one-to-many relationship with the DistDiam annotation feature class. The records in the tables are joined based on the objectid in the Distribmains feature class and the col_featureid in the DistDiam feature class. This is a composite relationship class, which means changes in one table affect or alter features in the related table. In this case, changes made to the origin class (Distribmains) triggers a change in the destination feature class (ud_reldestfc). This is referred to as forward notification.

Relationship classes in an IBM Informix database

Relationship classes are stored in the gdb_items and gdb_itemrelationships tables.

Relationship classes in an XML document

Relationship classes appear in XML documents as a type of data element. The following is a portion of an XML document from a dataset containing a relationship class.

  <DataElement xsi:type="esri:DERelationshipClass">
    <CatalogPath>/V=sde.DEFAULT/FD=sde:gdb.Water/RC=sde:gdb.Anno_DistMains</CatalogPath> 
    <Name>sde:gdb.Anno_DistMains</Name> 
    <DatasetType>esriDTRelationshipClass</DatasetType> 
    <DSID>-1</DSID> 
    <Versioned>true</Versioned> 
    <CanVersion>true</CanVersion> 
    <HasOID>true</HasOID> 
    <OIDFieldName>objectID</OIDFieldName> 
    <Fields xsi:type="esri:Fields">
      <FieldArray xsi:type="esri:ArrayOfField">
        <Field xsi:type="esri:Field">
          <Name>objectID</Name> 
          <Type>esriFieldTypeOID</Type> 
          <IsNullable>false</IsNullable> 
          <Length>4</Length> 
          <Precision>10</Precision> 
          <Scale>0</Scale> 
          <Required>true</Required> 
          <Editable>false</Editable> 
        </Field>
        <Field xsi:type="esri:Field">
          <Name>Type</Name> 
          <Type>esriFieldTypeInteger</Type> 
          <IsNullable>true</IsNullable> 
          <Length>4</Length> 
          <Precision>10</Precision> 
          <Scale>0</Scale> 
        </Field>
        <Field xsi:type="esri:Field">
          <Name>Main_id</Name> 
          <Type>esriFieldTypeInteger</Type> 
          <IsNullable>true</IsNullable> 
          <Length>4</Length> 
          <Precision>10</Precision> 
          <Scale>0</Scale> 
        </Field>
      </FieldArray>
    </Fields>
  <Indexes xsi:type="esri:Indexes">
    <IndexArray xsi:type="esri:ArrayOfIndex">
      <Index xsi:type="esri:Index">
        <Name>R249_SDE_ROWID_UK</Name> 
        <IsUnique>true</IsUnique> 
        <IsAscending>true</IsAscending> 
        <Fields xsi:type="esri:Fields">
          <FieldArray xsi:type="esri:ArrayOfField">
            <Field xsi:type="esri:Field">
              <Name>objectID</Name> 
              <Type>esriFieldTypeOID</Type> 
              <IsNullable>false</IsNullable> 
              <Length>4</Length> 
              <Precision>10</Precision> 
              <Scale>0</Scale> 
              <Required>true</Required> 
              <Editable>false</Editable> 
            </Field>
          </FieldArray>
        </Fields>
      </Index>
    <Index xsi:type="esri:Index">
      <Name>GDB_9_dist_main</Name> 
      <IsUnique>false</IsUnique> 
      <IsAscending>true</IsAscending> 
      <Fields xsi:type="esri:Fields">
        <FieldArray xsi:type="esri:ArrayOfField">
          <Field xsi:type="esri:Field">
            <Name>APN</Name> 
            <Type>esriFieldTypeInteger</Type> 
            <IsNullable>true</IsNullable> 
            <Length>4</Length> 
            <Precision>10</Precision> 
            <Scale>0</Scale> 
          </Field>
        </FieldArray>
      </Fields>
    </Index>
    <Index xsi:type="esri:Index">
      <Name>GDB_9_annoclass_id</Name> 
      <IsUnique>false</IsUnique> 
      <IsAscending>true</IsAscending> 
      <Fields xsi:type="esri:Fields">
        <FieldArray xsi:type="esri:ArrayOfField">
          <Field xsi:type="esri:Field">
            <Name>bldg_id</Name> 
            <Type>esriFieldTypeInteger</Type> 
            <IsNullable>true</IsNullable> 
            <Length>4</Length> 
            <Precision>10</Precision> 
            <Scale>0</Scale> 
          </Field>
        </FieldArray>
      </Fields>
    </Index>
  </IndexArray>
  </Indexes>
  <CLSID>{A07E9CB1-9A95-11D2-891A-0000F877762D}</CLSID> 
  <EXTCLSID /> 
  <RelationshipClassNames xsi:type="esri:Names" /> 
  <AliasName>sde:gdb.Anno_DistMains</AliasName> 
  <ModelName /> 
  <HasGlobalID>false</HasGlobalID> 
  <GlobalIDFieldName /> 
  <RasterFieldName /> 
  <ExtensionProperties xsi:type="esri:PropertySet">
    <PropertyArray xsi:type="esri:ArrayOfPropertySetProperty" /> 
  </ExtensionProperties>
  <ControllerMemberships xsi:type="esri:ArrayOfControllerMembership" /> 
  <Cardinality>esriRelCardinalityOneToMany</Cardinality> 
  <Notification>esriRelNotificationBoth</Notification> 
  <IsAttributed>false</IsAttributed> 
  <IsComposite>false</IsComposite> 
  <OriginClassNames xsi:type="esri:Names">
    <Name>sde:gdb.Distribmains</Name> 
  </OriginClassNames>
  <DestinationClassNames xsi:type="esri:Names">
    <Name>sde:gdb.DistDiam</Name> 
  </DestinationClassNames>
  <KeyType>esriRelKeyTypeSingle</KeyType> 
  <ClassKey>esriRelClassKeyUndefined</ClassKey> 
  <ForwardPathLabel>sde:gdb.Distribmains</ForwardPathLabel> 
  <BackwardPathLabel>sde:gdb.DistDiam</BackwardPathLabel> 
  <IsReflexive>false</IsReflexive> 
  <OriginClassKeys xsi:type="esri:ArrayOfRelationshipClassKey">
    <RelationshipClassKey xsi:type="esri:RelationshipClassKey">
      <ObjectKeyName>ObjectID</ObjectKeyName> 
      <ClassKeyName /> 
      <KeyRole>esriRelKeyRoleOriginPrimary</KeyRole> 
    </RelationshipClassKey>
    <RelationshipClassKey xsi:type="esri:RelationshipClassKey">
      <ObjectKeyName>featureid</ObjectKeyName> 
      <ClassKeyName /> 
      <KeyRole>esriRelKeyRoleOriginForeign</KeyRole> 
    </RelationshipClassKey>
  </OriginClassKeys> 
  <DestinationClassKeys xsi:type="esri:ArrayOfRelationshipClassKey">
    <RelationshipClassKey xsi:type="esri:RelationshipClassKey">
      <ObjectKeyName>Main_ID</ObjectKeyName> 
      <ClassKeyName /> 
      <KeyRole>esriRelKeyRoleDestinationPrimary</KeyRole> 
    </RelationshipClassKey>
    <RelationshipClassKey xsi:type="esri:RelationshipClassKey">
      <ObjectKeyName>main_id</ObjectKeyName> 
      <ClassKeyName /> 
      <KeyRole>esriRelKeyRoleDestinationForeign</KeyRole> 
    </RelationshipClassKey>
  </DestinationClassKeys>
  <RelationshipRules xsi:type="esri:ArrayOfRelationshipRule" /> 
</DataElement>

8/19/2013