Show Navigation | Hide Navigation
You are here:
ArcMap > Working with tables

Joining attribute tables

Release 9.1
Last modified December 7, 2006
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Working with tables"


Related Topics

About joining attribute tables

Data comes from a variety of sources. Often, the data you want to display on your map is not directly stored with your geographic data. For instance, you might obtain data from other departments in your organization, purchase commercially available data, or download data from the Internet. If this information is stored in a table, such as a dBASE, INFO, or geodatabase table, you can associate it with your geographic features and display the data on your map.

Learn more about joining attribute tables

Joins versus relates

ArcMap provides two methods to associate data stored in tables with geographic features: joins and relates. When you join two tables, you append the attributes from one onto the other based on a field common to both. Relating tables defines a relationship between two tables—also based on a common field—but doesn't append the attributes of one to the other; instead, you can access the related data when necessary.

Which one should I use?

You'll want to join two tables when the data in the tables has a one-to-one or a many-to-one relationship.

You'll want to relate two tables when the data in the tables has a one-to-many or many-to-many relationship.

Joins and relates are reconnected whenever you open the map, so if the underlying data in your tables changes, it will be reflected in the join or relate.

When you're through using a join or relate, you can remove it.

If your data is stored in a geodatabase and has relationship classes defined, you can use them directly without having to establish a relate in ArcMap. The relationship classes will automatically be available when you add a layer that participates in a relationship class to the map. Note that the many-to-many relationship is defined differently when your data is stored in a geodatabase. In general, if you have relationship classes defined in your geodatabase, you should use them instead of creating new ones in ArcMap.

Learn how to perform a spatial join

How to join attribute tables


Joining attributes in one table to another

  1. Right-click the layer or table you want to join, point to Joins and Relates, and click Join.
  2. Click the first dropdown arrow and click Join attributes from a table.
  3. Click the second dropdown arrow and click the field name in the layer on which the join will be based.
  4. Click the third dropdown arrow to choose the table to join to the layer.
  5. If the table is not currently part of the map, click the Browse button to search for it on disk.
  6. Click the fourth dropdown arrow and click the field in the table on which to base the join.
  7. Click OK.
  8. The attributes of the table are appended to the layer's attribute table.


Tips

  • If you want to permanently save joined data with your geographic features, export the data to a new dataset (for example, shapefile), right-click the layer in the table of contents, point to Data, and click Export data.
  • You can also join two tables using a predefined relationship class.
  • When editing joined data, you cannot edit the joined columns directly. However, you can directly edit the columns of the origin table. To edit the joined data, you must first add the joined tables or layers to ArcMap. You can then perform edits on this data separately. These changes will be reflected in the joined columns.


Removing a joined table

  1. Right-click the layer containing a join you want to remove and point to Joins and Relates.
  2. Point to Remove Join(s) and click the join you want to remove.


Tip

  • If you want to permanently save joined data with your geographic features, export the data to a new dataset (for example, shapefile), right-click the layer in the table of contents, point to Data, and click Export data.


Managing joined tables

  1. Right-click a layer or table in the table of contents and click Properties.
  2. Click the Joins & Relates tab.
  3. All the joins for the layer or table are listed on the left side of the dialog box. You can add new joins or remove existing ones.


Tip

  • If you want to permanently save joined data with your geographic features, export the data to a new dataset (for example, shapefile), right-click the layer in the table of contents, point to Data, and click Export data.


Relating the attributes in one table to another

  1. Right-click the layer you want to relate, point to Joins and Relates, and click Relate.
  2. Click the first dropdown arrow and click the field in the layer on which the relate will be based.
  3. Click the second dropdown arrow and click the table or layer to relate to, or load the table from disk.
  4. Click the third dropdown arrow and click the field in the related table on which to base the relate.
  5. Type a name for the relate.
  6. You'll use this name to access the related data.
  7. Click OK.
  8. The relate is now established between the two tables. The next topic discusses how to access records using the relate.


Tip

  • 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

  1. Open the attribute table for which you've set up a relate.
  2. Select the records in the table for which you want to display related records.
  3. Click Options, point to Related Tables, and click the name of the relate you want to access.
  4. The related table displays with the related records selected.


Tips

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


Removing a related table

  1. Right-click the layer containing a relate you want to remove and point to Joins and Relates.
  2. Point to Remove Relate(s) and click the relate you want to remove.



Managing related tables

  1. Right-click a layer or table in the table of contents and click Properties.
  2. Click the Joins & Relates tab.
  3. All the relates for the layer or table are listed on the right side of the dialog box. You can add new relates or remove existing ones.


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.