LAB 6: Joins, Relates and Hyperlinks

 

Download the following  pH and tds .dbf (dBase) database files -- Lab_6.zip. Using ArcCatalog, drag the files onto ArcMap. The tds database has XY coordinates (UTM Zone 12, NAD 83). Now create a point map by selecting "Display XY Data", which is found using the context menu (right-click on the tds table name in the table of contents.

Using the context menu in a similar way, except on the new event theme, select "Data -> Export Data", and save the event theme as a shape file (name it tds_shape). You can now remove both the event theme and the tds .dbf file from the map document (leave the pH table and the tds_shape shape file).

View (inspect) both tables. You can see that they contain both different and identical fields. You can use one of the identical fields to join the tables. Open the context menu for the tds_shape shape file. Select Joins and Relates. Select Join -- you should then see a new form called "Join Data." Choose "Join attributes from a table" and then, in Box 1, choose the ID for the field. In Box 2 select the pH table and in Box 3 choose the ID field. Click on OK and then open the table for tds_shape. You should now see all of the fields from both tables.

Now, using the same context menu, choose Joins and Relates and remove the Join. Now, try a Relate, filling in information in a similar manner to that used when creating the Join. Upon completion, open the tds_shape table. Although you have related the two tables, no new fields should appear. Now create the following query (use the "Select by Attributes" option in the "Selection" pull-down menu – if it is not active, use the Options button on the table and then Select by Attributes): "TDS" > 800 AND "TDS" < 999. If the tds_shape table is not already open, open it. You can see the results from the query are highlighted. Also open the pH table. Nothing should be highlighted. To propagate the results of the query to this table do the following, select "Options" (lower right corner of the tds_shape table) and then “Related Tables.” The query results should now be shown in the pH table.

Remove the Relate and then Join the two tables (pH to tds_shape). When finished, open the tds_shape table. Add a new field called "Cl_Ratio" (double). Now open the calculator (right click the new field heading) and calculate the values of the new field to be tds divided by chlorides (make sure that no points are selected -- "Selection -> Clear Selected Features"). Using the "Options" button at the lower right corner of the table, export the table to a text file (note: click on the folder icon and then select text as the file type to save in the bottom option box).  

Now remove the Relate and Join the tds_shape table to the pH table. pH does not have any sample station names so we will calculate them using the SAMPNAM field in the tds_shape table. To do this open the pH table, create a new field called SAMPNAM (text -- length 10), and then open the calculator and calculate the new field as "tds_shape.SAMPNAM." Now, using the "Options" button at the lower right corner of the table, export the table to a text file.

 

Hyperlinks

Hyperlinks can add new dimensions to a GIS database. You can add images, documents, and web pages to points lines and polygons to facilitate even greater dissemination of information. For users, this information is just a mouse-click away.

Use the tds shapefile you created to make a hyperlink as follows:

  1. Add a new field to the tds_shape layer called “myLinks” – make sure that it is a text field.
  2. Type “www5.egi.utah.edu” into every record in the “myLinks” field (remember to start “Editing” first).
  3. Right-click on tds_shape in the Table of Contents to get the context menu.
  4. Click the Display tab.
  5. Check “Support Hyperlinks using field” and select the “myLinks” field. Also check URL.
  6. Close the Layer Properties form.
  7. Select the lightning tool on the “Tools” toolbar and click on a point.
  8. What did you see?

 

Add what you saw to the bottom of the second text file above and submit both text files as an attachment in an e-mail to me.