Assignment 4: Data Management and Query in ArcGIS Due February 10, 2012 Introduction This week’s lectures introduced you to the basic concepts employed to handle attribute data and spatial-attribute data integration in geographic information systems. To paraphrase the text (Heywood et al., 2011: 131), an understanding of these aspects of GIS is essential for being an intelligent user of this powerful analytical tool. This understanding, however general it may seem, will help you to formulate research questions that can be answered using GIS as well as to choose appropriate analytical procedures and techniques for each project. Theory section of this assignment will help you to review what you learned this week. The two practical sections will give you an opportunity to learn more about and to practice the two basic data management operations available in ArcGIS – querying data and joining attribute tables. Both of these sections fall into the category of a guided tutorial. Section 1: Theory Textbook readings: Chapter 4 and lectures Answers to these questions can be found in the textbook, in the guided tutorial, or online. (each question is worth 2 marks) 1. What is the difference between a database and a database management system? 2. Describe the main characteristics of the relational database model. 3. How relationships between entities are modeled in a relational database? 4. Describe the main principles of the object-oriented database approach. What are its advantages and disadvantage compared to the relational database model? 5. In ArcGIS, what is the difference between a shapefile and a geodatabase? Section 2: Querying data In this part of the assignment you will continue working on the Getting Started with GIS ESRI web course you began working on in Assignment 1. You will learn more about types of data queries that can be performed in ArcGIS and how to perform them. You will also learn some other useful data manipulation techniques, such as sorting records in the attribute table and saving results of your query as a separate dataset. 1|Page Instructions 1. Go to: http://training.esri.com and select My Training from the left-hand menu. 2. Select My Virtual Campus Courses and then log in using the username and password you created earlier. 3. Under Courses in Progress heading, click on the title of Getting Started with GIS course to get back to this course. 4. In Module 3, complete the Query section. 5. If you have not done this before, save the data provided for this course on your H:\ drive. 6. When you finish examining results of the last query you need to perform in Step 5 of Query data based on attributes exercise, do not Clear Selected Features. Instead: in the Table of Contents, right-click on the name of the Florida cities layer and select Data Export data option. In the window that opens, leave all the default settings and make sure that you are exporting the data to proper folder on your personal drive. Change the name of the file to LargeCities and click OK. When prompted, choose Yes and add the new dataset to the map document. Make sure that the new layer is turned on. Right click on the Florida Cities layer and choose Delete. Change the symbol for LargeCities layer to something more presentable. Create a map showing your work using LetterPotrait template on the Traditional Layouts tab of the Select Template window. Add your name to the layout and export your map. 7. Repeat the steps above after your complete Step 4 in Query based on location exercise. Question 6 Submit a map showing result of attribute queries. 2 marks each Question 7 Submit a map showing result of spatial queries. Section 3: Performing a Join In this part of the assignment, you will learn how to join a standalone table to the attribute table of dataset. Datasets you will be working with are located in T:\Class\Geography\geog303\Assignment 4 folder. If you want to learn more about this operation, go to Help menu and select ArcGIS Desktop Help. In the window that opens, click on Search tab and type in ‘join.’ 2|Page Instructions 1. If necessary, start ArcMap and add the data from the Assignment 3 folder to map document. This folder contains the following files: province.shp – a shapefile containing Saskatchewan provincial boundary places.shp – a shapefile containing location and attributes of Saskatchewan communities. 200106skpop – an Excel file containing 2001 and 2006 population data for Saskatchewan communities Start with adding the province shapefile following by the rest of the data sets in this folder. You will have transform places data sets to match the coordinate system of the province shapefile. 2. To make your map more appareling, change the coordinate system of the data frame to NAD_1983_CORS96_UTM_Zone_13N. (Hint: look for this option in Predefined Projected Coordinate Systems UTM). 3. Open attribute table of the places dataset and examine it. Note that it contains two fields with community names, a sure sign that additional attributes were added to the original attribute table. You will clean up the table’s appearance by hiding the fields that are redundant or not needed for this exercise. To hide a field, click on the field’s name at the top of the Tables window to select it; then right-click and choose Turn Field Off option. Hide PPN_CODE and PREC_CODE fields. Close the attribute table. 4. In the Catalog Window, locate the 200106skpop.xlsx file. Click on the plus sign to expand its contents. Select Sheet1 and drag it all the way to the Table of Contents. Note: since this is a standalone table with no spatial data, ArcGIS cannot add it to the map display. For the same reason, the Table of Contents window automatically switches to List by Sources tab to display this table. 5. Right-click on the table’s name, choose Open and examine its contents. The table contains 2001 and 2006 population data for Saskatchewan communities collected in corresponding censuses. Instead of community names each community is identified by a unique code assigned by Statistics Canada to municipalities or equivalent administrative units, like Indian reserves. In Statistics Canada terminology these units are called census subdivisions, hence the unique code is abbreviated as ‘CSDIUD.’ The table also contains other records for bigger units of census geography, which contain census subdivisions. More information on Standard Geographic Classification used by Statistics Canada could be found here. 6. Open again the attribute table of the places layer and scroll through its fields. Do you see a field containing the same unique identified you saw in the Excel file? Click on the name of this filed and drag it all the way to the beginning of the table and drop it immediately to the right of Shape field. In the next step you will use fields containing this unique identified to append the attribute table of the places dataset with the data in the Excel file. 7. Right-click on the name of the places layer in the Table of Contents and choose Joins and Relates Join. In the window that opens, carefully read all the instructions on how to define parameters of this operation – they follow very simple logic. Remember that your join is going to be based on the CSD unique identifier. Find the corresponding field’s name in the first drop-down list. Since you do not have that many datasets in this map document, ArcGIS has no problem suggesting the right match for this field in the Excel file. (Note: make sure that Sheet1 is selected as the table you wish 3|Page to join to the places attribute table.) Under Join Options select Keep only matching records. Click OK. 8. Open the attribute table of the places layer and examine it. Three new fields with population data (from the Excel file) have been added to it. Note that when you perform an attribute join, the data is dynamically joined together. This means that the tables only ‘appear’ to be joined into one table. If you need to make the join permanent, you will need to save the its results as a separate dataset. 9. In the Table of Contents, right-click on the places layer name and choose Data Export data. Change the name of the new dataset to something more meaningful and click OK. When prompted, add the new dataset to the map document. Delete the places file from the map document. 10. Now you are going to select the communities that in 2006 had population more than 5,000. To avoid saving results of this query as yet another new dataset, your will make the rest of the communities ‘disappear’ in the current dataset using a definition query. Double-click of the new communities dataset to open the Properties window and click on the Definition Query tab. Click on the Query button. In the window that opens enter the required expression and click OK. Click OK to close the Properties window. 11. Change the communities layer symbol to something more suitable and examine your map. If necessary zoom to the clusters of points. Open attribute table of this layer again and sort the 2006_POP field in Descending order. Examine the names of the communities that appear to have the highest population values. What do you think has happened? Hint: compare the names in the Name and CSD_Name fields. On what kind of relationship between the two tables the join you just performed was based? 12. In the real world we often deal with datasets that are imperfect. To make a proper make of Saskatchewan large cities, we would need to address the issues in our dataset. But since this is an exercise that is supposed to focus on particular techniques (and it is quite long already), you will just make a map showing ‘Saskatchewan communities with population more than 5,000.’ Use the same template you used in the Section 2. Question 8 Submit answers to the questions in Step 11 above Question 9 Submit a map showing Saskatchewan communities with population more than 5,000 5 marks 2 marks 4|Page