Table to Attributed Relationship Class Tool

Description:

The geodatabase supports both many-to-many (M-N) relationship classes, and attributed relationships. Both M-N and attributed relationship classes are stored as rows in a table. This is conceputally similar to modeling M-N relationships using a join table in the database, and many existing databases have such join tables. This tool will allow you to convert such a table that links values between two other tables into an attributed relationship class. It allows you to choose the source table, specify the properties of the relationship class (such as the origin and destination classes, the primary and foreign keys, etc), creates the relationship class (with the same fields as are present in the input table), and then inserts the rows from the input table in to the relationship class table. Note: you require either an ArcInfo or ArcEditor license to use this sample.

How to use:
  1. View the source code to see how the component was implemented.
  2. Run the batch file called '_INSTALL.bat' to register the dll and it's appropriate component categories.
  3. In ArcCatalog, browse to the StatesCities.mdb persoanl geodatabase.
  4. Right-click the OldJoinTab table in the tree view and click Table to relationship class.
  5. Select states as the origin class.
  6. Select cities as the destination class.
  7. Click Next.
  8. Select OBJECTID as the origin primary key and STATEID as the origin foreign key.
  9. Select OBJECTID as the destination primary key and CITYID as the destination foreign key.
  10. Click Finish.

Application:
ArcCatalog

Difficulty: Intermediate


Visual Basic
File Description
_INSTALL.BAT Installation script that installs the dll.
RelClass.frm VB Form to guide you through the relationship class creation process.
Tab2RelClass.cls VB Class File for sample.
Table2AttrRel.vbp VB Project File for sample.
Table2AttrRel.dll ActiveX DLL file for the project.