Copyright © 2006 by Maribeth H. Price 5-1 Chapter 5 Working with Tables.

Slides:



Advertisements
Similar presentations
School of Geography FACULTY OF ENVIRONMENT Working with Tables 1.
Advertisements

Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.
CC SQL Utilities.
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
Return to Outline Copyright © 2009 by Maribeth H. Price 6-1 Chapter 6 Spatial Joins.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
Technical Support: (989) GIS and Mapping Procedures in ArcMap 9.x Creating an ArcMap Project Editing an ArcMap Project Printing an ArcMap Project.
Chapter 7 Data Management. Agenda Database concept Import data Input and edit data Sort data Function Filter data Create range name Calculate subtotal.
Querying a Database Microsoft Office Access 2003.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 3 – Finding, Filtering,
Chapter 2 Querying a Database
Lecture 4 Geodatabases. Geodatabases Outline  Data types  Geodatabases  Data table joins  Spatial joins  Field calculator  Calculate geometry 
Introduction to ArcGIS for Environmental Scientists Module 2 – Fundamentals Lecture 6 – Table Functions.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
GIS Concepts ‣ What is a table? What is a table? ‣ Queries on tables Queries on tables ‣ Joining and relating tables Joining and relating tables ‣ Summary.
Mid-Semester Lecture Exam Vocabulary Obvious steps within GIS –Selection and query processes –Working with tables –Classification concepts Projections.
Working with Tables Lesson 5 of Introduction to ArcGIS for Emergency Managers.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
ASP.NET Programming with C# and SQL Server First Edition
The Attribute Table! Without the attribute table, a polygon is just a polygon, a point is a point The attribute table defines what points, lines, or polygons.
Microsoft Access Intro Class 5 Working with Queries.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Excel Project 5 Creating, Sorting, and Querying a List.
Unit Two: Attribute Tables In this unit… ► Features & properties  Basic features  Rearranging columns  Freezing & Sorting columns  Field Labels & Hiding.
Microsoft Access 2010 Building and Using Queries.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Attributes in ArcGIS. ArcGIS Attributes FID – ESRI’s internal identifier Shape – Actual spatial data.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Filtering Data Removing a Filter Filter by Selection.
Copyright © 2006 by Maribeth H. Price 2-1 Chapter 2 Working with ArcMap.
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
Chapter 17 Creating a Database.
Copyright © 2006 by Maribeth H. Price 7-1 Lesson 7 Spatial Joins.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 23 Getting Started with Access Essentials 1 Morrison / Wells / Ruffolo.
ArcGIS: ArcMap Tables. Agenda Opening tables The interface Working with columns Working with records Making selections Advanced table tools ▫Add fields.
Data Queries Selecting features in ArcMap Data queries  Important part of a GIS project Can be a part of your data preparation or final analysis  Data.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
1/62 Introduction to and Using MS Access Database Management and Analysis Yunho Song.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
Queries Select by Attribute Select by Location. What is a Query? A query extracts information from a data table for further use –Once extracted you can:
Copyright © 2006 by Maribeth H. Price 6-1 Chapter 6 Queries.
You can sort Access data so you can view records in the order you want to view them, and you can filter data so you only see the records you want to see.
Relational Database Techniques
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
Return to Outline Copyright © 2009 by Maribeth H. Price 4-1 Chapter 4 Attribute Data.
Table formats ArcGIS reads table in many formats: dBase format (shapefile) INFO format (workstation ArcInfo) Geodatabase table (MS Access in case of personal.
Selecting features in ArcMap
Return to Outline Copyright © 2009 by Maribeth H. Price 5-1 Chapter 5 Queries.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 2 Querying a Database Using the Select Query Window.
NR 322: Editing Attributes Jim Graham Fall 2008 Chapter 6.
Chapter 6. Attribute Data & Tables. Table terminology Title Field Records Each field is specifically defined and established before any data can be entered.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
Excel Chapter 1 Creating a Worksheet and an Embedded Chart
NSF DUE ; Chérie Aukland. NSF DUE ; GeoTEd Partners.
Chapter 5 Queries.
Microsoft Office Illustrated Introductory, Windows Vista Edition
Access Chapter 2 Querying a Database.
Chapter 4 Attribute Data.
Mastering ArcGIS Attribute Data (Continued)
Microsoft Office Illustrated Introductory, Windows XP Edition
ESRM 250/CFR 520 Autumn 2009 Phil Hurvitz
Presentation transcript:

Copyright © 2006 by Maribeth H. Price 5-1 Chapter 5 Working with Tables

Copyright © 2006 by Maribeth H. Price 5-2 Outline Knowing types and structure of tables Managing table files Modifying appearance of tables and fields Editing fields and calculating new values Selecting records by queries Creating summary statistics for table fields Understanding cardinality in table relationships Creating joins and relates between tables

Copyright © 2006 by Maribeth H. Price 5-3 Tables Tables contain attribute data Many formats, one interface

Copyright © 2006 by Maribeth H. Price 5-4 Types of tables Attribute table –Stores attributes of map features –Associated with a spatial data layer –Has special fields for spatial information Standalone table –Stores any tabular data –Not associated with spatial data –OID instead of FID

Copyright © 2006 by Maribeth H. Price 5-5 Sources of tables Dbase files INFO files ASCII Text files (tab or comma delimited) –Excel csv files Records from SQL database systems

Copyright © 2006 by Maribeth H. Price 5-6 Parts of a table Title Field Right-click field name to get menu Records Status bar Options menu

Copyright © 2006 by Maribeth H. Price 5-7 Fields Fields have specific types available Must be defined before use Once defined, cannot be changed Naming rules –No more than 13 characters –Use only letters and numbers –Must start with a letter

Copyright © 2006 by Maribeth H. Price 5-8 Field types Geodatabases and shapefiles Short Integers stored as 2-byte binary numbers (value range from -32,000 to +32,000) Long Integers stored as 4-byte binary numbers (value range from -2 billion to +2 billion) Float Floating point values with 8 significant digits in the mantissa e12 Double Double-precision floating point values with 16 significant digits in the mantissa e13 Text Alphanumeric strings‘Maple St’ Date Date format07/12/92 BLOB Binary large object; any complex binary data including images, documents, etc.

Copyright © 2006 by Maribeth H. Price 5-9 Field characteristics Length –The total characters a text field can store Precision –The total width of digits a numeric field can store Scale –The number of decimal places Length = 10 Maple St. Maple Stre

Copyright © 2006 by Maribeth H. Price 5-10 Adjusting field width Temporary, does not affect stored file Hover over field break to get double arrow, then drag

Copyright © 2006 by Maribeth H. Price 5-11 Field properties tab Field alias Hide field

Copyright © 2006 by Maribeth H. Price 5-12 Shortcut to field properties

Copyright © 2006 by Maribeth H. Price 5-13 Formatting field display

Copyright © 2006 by Maribeth H. Price 5-14 Table appearance

Copyright © 2006 by Maribeth H. Price 5-15 Sorting tables Has no effect on original data

Copyright © 2006 by Maribeth H. Price 5-16 Selecting records

Copyright © 2006 by Maribeth H. Price 5-17 Show selected

Copyright © 2006 by Maribeth H. Price 5-18 Clear Selection On toolbar From table options menu From main menu

Copyright © 2006 by Maribeth H. Price 5-19 The Selection tab Right-click entry for context menu

Copyright © 2006 by Maribeth H. Price 5-20 Selection logic No selection –All features exported No selected features –No features exported Selected features –Only selected features exported Example: Exporting features to a new shapefile

Copyright © 2006 by Maribeth H. Price 5-21 Field statistics

Copyright © 2006 by Maribeth H. Price 5-22 Statistics Statistics for fields are based on the selected records

Copyright © 2006 by Maribeth H. Price 5-23 SQL Queries Some valid queries [POP1990] > “STATE_NAME” = ‘Alabama’ [POP2000] >= [POP1990] Note: DBF tables have field names enclosed in quotes Geodatabase tables have field names enclosed in brackets

Copyright © 2006 by Maribeth H. Price 5-24 Multiple Criteria Queries Multiple criteria queries using AND or OR “STATE_NAME” = ‘Alabama’ OR “STATE_NAME” = ‘Texas’ –Note that the field name must be repeated for each condition

Copyright © 2006 by Maribeth H. Price 5-25 AND vs OR “Land-use” = ‘RES’ AND “Land-use” = ‘COM’ “Land-use” = ‘RES’ OR “Land-use” = ‘COM’ “Pop2000” ≥ 5000 OR “Pop2000” < 9000 “Pop2000” ≥ 5000 AND “Pop2000” < 9000 Wrong Right Remember—you test each feature separately

Copyright © 2006 by Maribeth H. Price 5-26 Multiple conditions Use parentheses to enforce order of evaluation (“LU” = ‘RES’ or “LU” = ‘COM’) and “Value” > “LU” = ‘RES’ or (“LU” = ‘COM’ and “Value” > ) $75,000 $125,000 $75,000 $125,000 $75,000 $125,000 $75,000 $125,000 RESCOM

Copyright © 2006 by Maribeth H. Price 5-27 The Like Operator “NAME” LIKE ‘%(D)%’ –Finds all of the (D) Democrats % is wildcard Ignores Don or Danforth “NAME” LIKE ‘%New %’ –Would find New Hampshire and New York, but not Newcastle or Kennewick

Copyright © 2006 by Maribeth H. Price 5-28 Adding a new field In ArcCatalog layer properties

Copyright © 2006 by Maribeth H. Price 5-29 Adding a field In ArcMap

Copyright © 2006 by Maribeth H. Price 5-30 Editing fields Open Editor toolbarStart editing Type edits in fields Save edits, stop editing

Copyright © 2006 by Maribeth H. Price 5-31 Calculating fields Add a new field if necessary Consider whether you need decimal places!

Copyright © 2006 by Maribeth H. Price 5-32 Calculate Right-click field to calculate Enter expression

Copyright © 2006 by Maribeth H. Price 5-33 Summarize My nomination for Most Useful Function! What is it? When to use it…

Copyright © 2006 by Maribeth H. Price 5-34 How many quakes in each state? Total deaths per state? Average magnitude per state?

Copyright © 2006 by Maribeth H. Price 5-35 Summarizing tables Calculate statistics for groups of features in a table Groups by unique values in the specified field User chooses statistics to calculate Produces another table as output with groups and stats How many earthquakes in each state? Total deaths and damage in each state? Average magnitude in each state? Historic major earthquakes

Copyright © 2006 by Maribeth H. Price 5-36 Example Group earthquakes by state field Determine total deaths, total damage, and average magnitude of earthquakes in each state.

Copyright © 2006 by Maribeth H. Price 5-37 How to summarize Right-click State field Sum Deaths Sum Damage Average Mag Average MMI

Copyright © 2006 by Maribeth H. Price 5-38 Summarize Output Table Count field always generated automatically

Copyright © 2006 by Maribeth H. Price 5-39 Create map Can we now create a map of deaths by state? Standalone table

Copyright © 2006 by Maribeth H. Price 5-40 Joining tables Summarize output table States layer attributes

Copyright © 2006 by Maribeth H. Price 5-41 US Earthquake Deaths by State Join summarize output to states layer to create map of deaths

Copyright © 2006 by Maribeth H. Price 5-42 Joining tables Join tables on common field Joined table Destination tableSource table

Copyright © 2006 by Maribeth H. Price 5-43 Join facts Joins are temporary relationships between tables Tables must share a common field Treats the two tables as a single table Original stored data is not affected Can be removed when no longer needed

Copyright © 2006 by Maribeth H. Price 5-44 One-to-one joins Each record in the destination table matches exactly one record in the source table. Destination table Source table We call this a cardinality of one-to-one.

Copyright © 2006 by Maribeth H. Price 5-45 Types of Cardinality One-to-one –States to Governors –Husbands to wives One-to-many –States to cities –Districts to schools Many to one –Cities to states –Schools to districts Many-to-many –Students to classes –Stores to customers

Copyright © 2006 by Maribeth H. Price 5-46 Relational databases RestaurantRes- ID Parcel_no Jake’s Pizza Momma’s Pie Hut Big Burger Barn Res-IDNameSSN 20Jake Smith Nancy Gold Dan Smurt Karen White Judy Lewis Joshua Jones Parcel_noAddressValueOwner Maple Ave67,000Roger Clark Main St114,510Roger Clark Sherry Ave59,000Judy Lewis Store distinct tables Establish relationships between them

Copyright © 2006 by Maribeth H. Price 5-47 Rule of Joining Each record in the destination table must match one and only one record in the source table. One to one Destination table Source table Many to one

Copyright © 2006 by Maribeth H. Price 5-48 One to many Destination table Source table ? Violates the Rule of Joining Record to join to destination is ambiguous Must use a relate instead

Copyright © 2006 by Maribeth H. Price 5-49 Relates Similar to a join except that –The tables remain separate –Items selected in one table may be highlighted in the related table

Copyright © 2006 by Maribeth H. Price 5-50 States Congressional Districts Related tables

Copyright © 2006 by Maribeth H. Price 5-51 How to join or relate tables