What is the difference between join and relate in arcgis




















To join two datasets:. Unlike joining tables, relating two tables simply defines a relationship between them. The associated data aren't appended to the layer's attribute table as they are with a join. Instead, you can access the related data when you work with the layer's attributes. To relate two datasets:.

This is document ande in the Knowledge Base. Last modified on You can perform a join using the Add Join geoprocessing tool. When performing an attribute join, the joined fields are dynamically added to the existing table.

Field properties—such as aliases, visibility, and number formatting—are maintained when a join is added or removed. Depending on how your data is organized, you may want to start by summarizing the data in your table before you join it to a layer. When you summarize a table, a new static table containing the summary statistics is derived.

During this process, you can create various summary statistics including count, average, sum, minimum, and maximum. For example, suppose you want to create a population map by state instead of county, but the data you have is organized by county. By summarizing the county data by state—in this example, finding the total sum for each state population—and then joining that newly created output table to a state layer, you can create a population map by state.

When using data where a one-to-many or many-to-many relationship exists, use a relate or relationship class to establish the relationship between the datasets. However, you can create a join under these circumstances. When you create a join in such a case, there are differences between how tools and other layer-specific settings work depending on the data source.

If you are using data in the same geodatabase to create the join, all matching records are returned. If you are using nondatabase data, such as shapefiles or dBASE tables, to create the join, only the first matching record is returned.

When the layers on your map don't share a common attribute field, you can join them using the Spatial Join geoprocessing tool, which joins the attributes of two layers based on the location of the features in the layers.

With a spatial join, you can complete any of the following common workflows:. Join by location, or spatial join, uses spatial associations between the layers involved to append fields from one layer to another. Depending on the type of association , you can append the attributes or an aggregate minimum, maximum, mean, and so on of numeric attributes, from a matched feature to the target features.

Spatial joins by default are different from attribute-driven joins, relates, and relationship classes, in that they are not dynamic and require you to save the results to a new output layer. If you use the Spatial Join tool in a script or model, you can improve performance using an in-memory workspace, instead of creating output.

To remove a join, use one of the previously mentioned methods to access the Joins menu items, and open the Remove Join tool. For example, you could associate a table of parcel ownership information with the parcels layer, since they share a parcel ID field.

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. Typically, you'll join a table of data to a layer based on the value of a field that can be found in both tables. The name of the field does not have to be the same, but the data type has to be the same; you join numbers to numbers, strings to strings, and so on.

You can perform a join with either the Join Data dialog box , accessed by right-clicking a layer in ArcMap, or the Add Join tool.

Suppose you have obtained data that describes the percentage change in population by county and you want to generate some population growth maps based on this information. As long as the population data is stored in a table in your database and shares a common field with your layer, you can join it to your geographic features and use any of the additional fields to symbolize, label, query, or analyze the layer's features. When you join tables in ArcMap, you establish a one-to-one or many-to-one relationship between the layer's attribute table and the table containing the information you want to join.

The example below illustrates a one-to-one relationship between each county and that county's population change data. In other words, there's one population change for each county.

Here's an example of a many-to-one relationship. Suppose you have a layer where each polygon is classified according to its land-use type. The layer's attribute table only stores a land-use code; a separate table stores the full description of each land-use type.

Joining these two tables establishes a many-to-one relationship because many records in the layer's attribute table join to the same record in the table of land-use descriptions. You might then use the more descriptive text when generating the legend for your map. When using data where a one-to-many or many-to-many relationship exists, you should use a relate or relationship class to establish the relationship between the datasets.

However, it is possible to create a join under these circumstances. When you create a join in such a case, there are differences between how tools and other layer-specific settings work depending on the data source. If you are using geodatabase data to create the join, all matching records are returned. If you are using nondatabase data, like shapefiles or dBASE tables, to create the join, only the first matching record is returned.

This means that if you have created a 1:M or M:M join with geodatabase data and you generate a report, you see multiple records in the report, one for each corresponding match. The multiple matches are also seen when using a join field while symbolizing a joined layer, labeling, identifying features, generating a graph, and using either the Find or Hyperlink tool. If you are using the joined layer as input to a geoprocessing tool or in an export operation, the multiple matching records are used.

When the layers on your map don't share a common attribute field, you can join them using a spatial join, which joins the attributes of two layers based on the location of the features in the layers.



0コメント

  • 1000 / 1000