Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Attribute Data.

Similar presentations


Presentation on theme: "Chapter 4 Attribute Data."— Presentation transcript:

1 Chapter 4 Attribute Data

2 References Price, M. (2013). Mastering ArcGIS (6th ed.). McGraw-Hill
Price, M. (2013). Mastering ArcGIS (6th ed.). McGraw-Hill. Mastering ArcGIS, 6/e Instructor Edition Chapter 4: PowerPoint Notes and Figures

3 Outline What is a table? Queries on tables.
Joining and relating tables. Summary statistics. Database storage concepts.

4 What is a table? Data stored as an array of rows and columns, with each row representing an object (feature) and each column representing an attribute (property) of that object. Field Title Records

5 Types of tables Attribute table Standalone 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.

6 Database Management Systems
Dedicated systems for managing tables of data. Provide data management for agencies, universities, companies, etc. Designed for multi-user environments with enhanced security needs. Focus on data tables with tools for queries, reporting, graphing, etc.

7 Queries on tables. A query extracts certain records from a table based on a specified condition How many students have GPA > 3? How many states have population > 1 million? How many counties had greater population in 2000 than in 2010? How many customers have last names beginning with “Mac” or “Mc”?

8 SQL (Structured Query Language )
Many databases use a special query language called Structured Query Language. Can write queries that work in multiple DBMS environments. Queries can be saved and reused. Nearly always case-sensitive.

9 SQL Query Examples Some Valid Queries
SELECT *FROM cities WHERE "POP1990" >= SELECT *FROM counties WHERE “BEEFCOW_92” < “BEEFCOW_87” SELECT *FROM parcels WHERE “LU-CODE” = 42 AND “VALUE” > 50000 SELECT *FROM rentals WHERE “RENT” > 700 AND “RENT” < 1500 In most databases, SQL expressions are case-sensitive “Smith” ≠ “SMITH”

10 Query results The result of a query is a set of selected records that meet the criteria. Subsequent operations on the table will use only the selected records and ignore the others. A user might… Export the selected records to a new table, Calculate statistics on the selected records, Calculate new values for the selected records, and Produce a report based on the selected records.

11 Joining and relating tables
Destination table Source table Common field Joined table

12 Join facts Joins are temporary relationships between tables used by a relational DBMS. Tables must share a common field (key). Treats the two tables as a single table. Original stored data is not affected. Can be removed when no longer needed.

13 One-to-one joins Destination table Source table
(always imagine on the left) Source table (always imagine on the right) When each record in the destination table matches exactly one record in the source table, we call it a cardinality of one-to-one.

14 Types of Cardinality One-to-one Many-to-one States to Governors
Husbands to wives Cities to states Schools to districts

15 ? 3. One-to-many Violates the Rule of Joining
States to cities Districts to schools Violates the Rule of Joining Record to join to destination is ambiguous Must use a relate instead

16 Relates Similar to a join except that The tables remain separate.
Items selected in one table may be highlighted in the related table

17 Summary statistics Grouping records in a table according to one categorical field and calculates statistics.

18 Database storage concepts
Database fields typically are defined by ASCII vs binary type storage Bytes of storage allocated Integer vs floating point Definition limits the values that can be stored Important to match type to storage requirements Try to minimize storage space while making sure all potential values will fit in the field Text (ASCII) field with 10 bytes “Mississipp” Binary 2-byte signed integer: -32,767 to +32,767 Single-precision floating point x.xxxxxxxeyy

19 ArcGIS field data types


Download ppt "Chapter 4 Attribute Data."

Similar presentations


Ads by Google