You are here:
Tables and attribute information
>
Creating tables and managing attribute information
About relating tables
Note:
This topic was updated for 9.3.1.
Relating tables simply defines a relationship between two tables. The associated data isn't appended to the layer's attribute table like it is with a join. Instead, you can access the related data when you work with the layer's attributes.
A relate is similar to a simple relationship class except it can involve data from different workspaces (such as a dBASE table can be related to a coverage) and is stored in a layer file or ArcMap document. If you already have a relationship class set up for your data, you can use it as you would a relate in ArcMap.
Relates can be used in the table and Identify windows to find data that is related to the selected record or records.
The following describes how relates behave when used in ArcMap:
- Relates are bidirectional; therefore, both tables involved will be able to use the relate regardless of which table owns the relate. For example, if a relate is created on layerA for tableB, the relate will be listed under layerA, but tableB will be able to use it to access records in layerA.
- When a selection is made on a table or layer, it is not automatically applied to the related tables as it is with links in ArcView GIS 3. You can use the related tables command from the table window's Options menu to apply ("push") a selection to a related table or layer.
- When using the related tables command described above, the related table or layer is added to the table of contents under the active data frame, if necessary, and it's table window is opened.
- If two layers in a map point to the same underlying feature class or shapefile, both are affected by and can use a relate that one of them owns. Since relates can be stored in a specific layer file, one layer can't delete a relate owned by another layer even when both layers refer to the same data.
- A relate owned by a table that is used to define a route or XY event source layer is not carried over to the event source layer. You must re-create the relate for the event source layer.
- If you relate to a table that does not have an ObjectID column (such as delimited text files or OLE DB tables), you will not be able to apply selections using the relate. The Related Tables command from the table window's Options menu will list the relate, but it will be unavailable. The Identify tool, however, can still be used to find related records.
Learn more about joining and relating tables.
How to relate tables
Relating the attributes in one table to another
- Right-click the layer you want to relate, point to Joins and Relates, and click Relate.
You can also click the Options button on an open table window to access the Relate dialog box.
- Click the first drop-down arrow and click the field in the layer on which the relate will be based.
- Click the second drop-down arrow and click the table or layer to relate to, or load the table from disk.
- Click the third drop-down arrow and click the field in the related table on which to base the relate.
- Type a name for the relate.
You'll use this name to access the related data.
- Click OK.
The relate is now established between the two tables. The next topic discusses how to access records using the relate.
- If a feature class in a geodatabase participates in a relationship class, that relationship class will be immediately available for use. You don't need to relate the tables in ArcMap.
|
Accessing related records
- Open the attribute table for which you've set up a relate.
- Select the records in the table for which you want to display related records.
- Click Options, point to Related Tables, and click the name of the relate you want to access.
The related table displays with the related records selected.
- Once you define a relate, you can access the related records from either table participating in the relationship.
- You must set up a relationship before you can access related records. See "Relating the attributes in one table to another."
- If your map contains layers from a geodatabase that participate in relationship classes, those relationship classes will be listed automatically along with any relates you define.
|
Managing related tables
- Right-click a layer or table in the table of contents and click Properties.
- Click the Joins & Relates tab.
All the relates for the layer or table are listed on the right side of the dialog box. You can add new relates, remove existing ones, and view properties about the relates.
Removing a related table
- Right-click the layer containing a relate you want to remove and point to Joins and Relates.
- Point to Remove Relate(s) and click the relate you want to remove.
- You can also click the Options button on an open table window to access the menu used to remove a relate.
|
Please visit the
Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.