Relationships between datasets in a geodatabase in Informix

リレーションシップは、あるテーブルのオブジェクトと別のテーブルのオブジェクトとの関連付けを管理します。ジオデータベース内のテーブル間のリレーションシップ クラスを作成すると、参照整合性が維持され、関連テーブルの編集が効率的になり、関連テーブルへのクエリも実行できるようになります。次のような種類のジオデータベース内のテーブル間のリレーションシップがサポートされています。

フィーチャがフィーチャクラスに格納され、非空間行がテーブルに格納されるのと同様に、リレーションシップはリレーションシップ クラスに格納され、管理されます。

リレーションシップとリレーションシップ クラスの基数の詳細については、「リレーションシップ クラスのプロパティ」をご参照ください。

Relationships in ArcGIS Desktop

カタログ ツリーでは、リレーションシップ クラスはフィーチャ データセットの一部として表示されます。リレーションシップ クラスは次のアイコンで表示されます。

リレーションシップ クラスに関する情報を表示するには、リレーションシップ クラスを右クリックして [プロパティ] を選択し、[リレーションシップ クラス プロパティ] ダイアログ ボックスを表示します。

フィーチャリンク アノテーションはリレーションシップ クラスの一種です。[リレーションシップ クラス プロパティ] ダイアログ ボックスでは、Distribmains フィーチャクラスが 1 対多のリレーションシップで DistDiam アノテーション フィーチャクラスに属していることを確認できます。テーブル内のレコードは、Distribmains フィーチャクラスの objectidDistDiam フィーチャクラスの col_featureid に基づいて結合されます。これはコンポジット リレーションシップ クラスなので、あるテーブルの変更が、関連テーブルを変更するなどの影響を与えます。このケースでは、関連元クラス(Distribmains)に対する変更が関連先フィーチャクラス(ud_reldestfc)の変更につながります。これは正方向通知と呼ばれます。

Relationship classes in an IBM Informix database

リレーションシップ クラスは gdb_items および gdb_itemrelationships テーブルに格納されます。

Relationship classes in an XML document

XML ドキュメントのリレーションシップ クラスは、データ エレメントのタイプとして定義されます。次に、リレーションシップ クラスが含まれたデータセットからエクスポートした XML ドキュメントの一部を示します。

  <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>

7/10/2012