tables recall...... a view displays features a feature is a geographic component of a theme and must...

60
Tables • Recall...... •A view displays features •A feature is a geographic component of a theme and must have attributes to have significant meaning...... • The feature is linked to the view • The table contains/stores these attributes, that are then linked to the features.....

Upload: darion-blanchard

Post on 11-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Tables

• Recall......• A view displays features• A feature is a geographic component of a theme and must have attributes to have significant meaning......

• The feature is linked to the view• The table contains/stores these attributes, that

are then linked to the features.....

Linked Tables

• Linked implies that there must be some way of associating the attributes in the table to the features in the view...

• Tables may be in several forms:– Text files - .txt– Data Base files - .dbf– Other types of data bases - Oracle, Informix,

etc.....

Getting to the Table

Theme Table Button

The Table

Records

Attributes

“Identifying” Features/Attributes

You are “extracting” a record...

“Select” Information from the TableSelect Feature Tool Used

“Querying”

Or.....Query Tool

Query Builder

Build A Query....

Note the quotes...

Double Click

Logical Expressions

All Values of State Names - in the “DBF”

The Result....

Once these Records are Selected

• You may “Promote”

• You may Extract - save as a new theme

• Graph

• Export

• Zoom to Selected

• etc.....

Promote

New Theme/Shapefile

There it is..

Attributes and all....Attributes of Theme6.shp

Graph/Chart...

Charting....

The Chart

Sort

Export

File Type

Yet to Cover - Regarding Tables

• Some Merging & Union Features

• Linking

• Importing/Adding

• Data Base access

• Editing

Tables, cont...

• Get Statistics

• Summarize

• Merge

Statistics.......Get statistics on 1990 Population of ALL States

How to do it...

The result

Combine Query & Statistics

Result of the Query

Promote....

And get Statistics....

Note that the COUNT is now 7

Summarizing

• Very powerful and needed tool

• Allows user to produce a table of summary values...

• Can be summarized by a variety of methods : average, sum, standard deviation, etc...

• Let’s look at an example......

Sub-regional Summarization

• The U.S. is divided into sub-regions..

• The mid-Atlantic, Pacific, Mountain, etc...

• Let’s find the total population in each of those sub-regions

• The sub-regions........

Sub-regions

Activate Theme Table and Select SUMMARIZE From Field Menu

Sub-region field is ACTIVE

summarize

Summarize Window

By summing

Population 1990 will be summarized

Default table name - change it if you like...

Default table field name..

Recall we are summarizing Recall we are summarizing by sub-regionby sub-region

The Result....

Graph the Result.....

Merging Features....

• All features in the theme that have a common value within some field are merged to become a single theme.

• Polygons may be discontinuous (what does that mean?)

• This often makes managing data easier...

• Let’s merge by sub-region...

From Summarize Window...

Results....

The Table...

Join & link

The Tables

Name State_name Dep_regionBlair Pennsylvania 3

Huntingdon Pennsylvania 3Bedford Pennsylvania 3Fulton Pennsylvania 3

Tri Name Dep_region15521CRTVPPLEAS Bedford 315522BDFRDRD2BO Bedford 315522HDSTRSUNNY Bedford 315522KNNMTRD1CH Bedford 315522LBFSTWEBER Bedford 315522WSTNGRTS30 Bedford 316601PNNJC4601C Blair 316601PRCTRRD3RT Blair 316601SKFSN1000L Blair 316602FDRTD6THAV Blair 316602PHLPS3101P Blair 316603SMLLTSPRIN Blair 316603VDRRT6THAV Blair 3

16603WRNCKPOBOX Blair 316648BRWNDBERWI Blair 316652LCCRPINDUS Huntingdon 316652WNSCR12THA Huntingdon 316662CVSHC107HI Blair 316673PPLTN100PA Blair 316673YNGS FREDE Blair 316678STNC HORTO Bedford 316682GNRLRPOBOX Blair 316684PPGNDRTE22 Blair 316686CHCGRINDUS Blair 316686QLTYCINDUS Blair 316686WSTVC1600P Blair 316693WSTVCRT866 Blair 317066NRTHMEASTP Huntingdon 3

17066WNSCRUSROU Huntingdon 317233JLGNDJLGDR Fulton 317238MLLTTRD1BO Fulton 3

Tri Name Dep_region15521CRTVPPLEAS Bedford 315522BDFRDRD2BO Bedford 315522HDSTRSUNNY Bedford 315522KNNMTRD1CH Bedford 315522LBFSTWEBER Bedford 315522WSTNGRTS30 Bedford 316601PNNJC4601C Blair 316601PRCTRRD3RT Blair 316601SKFSN1000L Blair 316602FDRTD6THAV Blair 316602PHLPS3101P Blair 316603SMLLTSPRIN Blair 316603VDRRT6THAV Blair 3

16603WRNCKPOBOX Blair 316648BRWNDBERWI Blair 316652LCCRPINDUS Huntingdon 316652WNSCR12THA Huntingdon 316662CVSHC107HI Blair 316673PPLTN100PA Blair 316673YNGS FREDE Blair 316678STNC HORTO Bedford 316682GNRLRPOBOX Blair 316684PPGNDRTE22 Blair 316686CHCGRINDUS Blair 316686QLTYCINDUS Blair 316686WSTVC1600P Blair 316693WSTVCRT866 Blair 317066NRTHMEASTP Huntingdon 3

17066WNSCRUSROU Huntingdon 317233JLGNDJLGDR Fulton 317238MLLTTRD1BO Fulton 3

Summarize by Name......

How many unique Names are there?

15522BDFRDRD2BO Bedford 315522HDSTRSUNNY Bedford 315522KNNMTRD1CH Bedford 315522LBFSTWEBER Bedford 315522WSTNGRTS30 Bedford 316601PNNJC4601C Blair 316601PRCTRRD3RT Blair 316601SKFSN1000L Blair 316602FDRTD6THAV Blair 316602PHLPS3101P Blair 316603SMLLTSPRIN Blair 316603VDRRT6THAV Blair 3

16603WRNCKPOBOX Blair 316648BRWNDBERWI Blair 316652LCCRPINDUS Huntingdon 316652WNSCR12THA Huntingdon 316662CVSHC107HI Blair 316673PPLTN100PA Blair 316673YNGS FREDE Blair 316678STNC HORTO Bedford 316682GNRLRPOBOX Blair 316684PPGNDRTE22 Blair 316686CHCGRINDUS Blair 316686QLTYCINDUS Blair 316686WSTVC1600P Blair 316693WSTVCRT866 Blair 317066NRTHMEASTP Huntingdon 3

17066WNSCRUSROU Huntingdon 317233JLGNDJLGDR Fulton 317238MLLTTRD1BO Fulton 3

There are 4 unique county names......

Bedford

Blair

Fulton

Huntingdon

And how many TRI’s are in each unique name?

15522BDFRDRD2BO Bedford 315522HDSTRSUNNY Bedford 315522KNNMTRD1CH Bedford 315522LBFSTWEBER Bedford 315522WSTNGRTS30 Bedford 316601PNNJC4601C Blair 316601PRCTRRD3RT Blair 316601SKFSN1000L Blair 316602FDRTD6THAV Blair 316602PHLPS3101P Blair 316603SMLLTSPRIN Blair 316603VDRRT6THAV Blair 3

16603WRNCKPOBOX Blair 316648BRWNDBERWI Blair 316652LCCRPINDUS Huntingdon 316652WNSCR12THA Huntingdon 316662CVSHC107HI Blair 316673PPLTN100PA Blair 316673YNGS FREDE Blair 316678STNC HORTO Bedford 316682GNRLRPOBOX Blair 316684PPGNDRTE22 Blair 316686CHCGRINDUS Blair 316686QLTYCINDUS Blair 316686WSTVC1600P Blair 316693WSTVCRT866 Blair 317066NRTHMEASTP Huntingdon 3

17066WNSCRUSROU Huntingdon 317233JLGNDJLGDR Fulton 317238MLLTTRD1BO Fulton 3

Name State_name Dep_regionBlair Pennsylvania 3

Huntingdon Pennsylvania 3Bedford Pennsylvania 3Fulton Pennsylvania 3

Summarize Window

By summing

Population 1990 will be summarized

Default table name - change it if you like...

Default table field name..

Recall we are summarizing Recall we are summarizing by sub-regionby sub-region

The data base file (dbf)

Name CountBlair 6

Bedford 18Fulton 4

Huntingdon 2

There is no shape file at this point...

What would the shape file do for us?

What should you have done if you wanted to make a shapefile?

From Summarize Window...

I forgot to make the shapefile--or I have a dbf that is related to

an existing shapefile.....

You may JOIN the tables.....

Recall the Tables

Name State_name Dep_regionBlair Pennsylvania 3

Huntingdon Pennsylvania 3Bedford Pennsylvania 3Fulton Pennsylvania 3

Tri Name Dep_region15521CRTVPPLEAS Bedford 315522BDFRDRD2BO Bedford 315522HDSTRSUNNY Bedford 315522KNNMTRD1CH Bedford 315522LBFSTWEBER Bedford 315522WSTNGRTS30 Bedford 316601PNNJC4601C Blair 316601PRCTRRD3RT Blair 316601SKFSN1000L Blair 316602FDRTD6THAV Blair 316602PHLPS3101P Blair 316603SMLLTSPRIN Blair 316603VDRRT6THAV Blair 3

16603WRNCKPOBOX Blair 316648BRWNDBERWI Blair 316652LCCRPINDUS Huntingdon 316652WNSCR12THA Huntingdon 316662CVSHC107HI Blair 316673PPLTN100PA Blair 316673YNGS FREDE Blair 316678STNC HORTO Bedford 316682GNRLRPOBOX Blair 316684PPGNDRTE22 Blair 316686CHCGRINDUS Blair 316686QLTYCINDUS Blair 316686WSTVC1600P Blair 316693WSTVCRT866 Blair 317066NRTHMEASTP Huntingdon 3

17066WNSCRUSROU Huntingdon 317233JLGNDJLGDR Fulton 317238MLLTTRD1BO Fulton 3

Name CountBlair 6

Bedford 18Fulton 4

Huntingdon 2

Table you created....

Join....Name State_name Dep_regionBlair Pennsylvania 3

Huntingdon Pennsylvania 3Bedford Pennsylvania 3Fulton Pennsylvania 3

Name CountBlair 6

Bedford 18Fulton 4

Huntingdon 2

Name State_name Dep_region CountBlair Pennsylvania 3 6

Huntingdon Pennsylvania 3 2Bedford Pennsylvania 3 18Fulton Pennsylvania 3 4

How do I know which table gets “added” to the other?

This was a one-to-one join....

What if I have a situation with one-to-many?

For example...

Name State_name Dep_regionBlair Pennsylvania 3

Huntingdon Pennsylvania 3Bedford Pennsylvania 3Fulton Pennsylvania 3

Tri Name Dep_region15521CRTVPPLEAS Bedford 315522BDFRDRD2BO Bedford 315522HDSTRSUNNY Bedford 315522KNNMTRD1CH Bedford 315522LBFSTWEBER Bedford 315522WSTNGRTS30 Bedford 316601PNNJC4601C Blair 316601PRCTRRD3RT Blair 316601SKFSN1000L Blair 316602FDRTD6THAV Blair 316602PHLPS3101P Blair 316603SMLLTSPRIN Blair 316603VDRRT6THAV Blair 3

16603WRNCKPOBOX Blair 316648BRWNDBERWI Blair 316652LCCRPINDUS Huntingdon 316652WNSCR12THA Huntingdon 316662CVSHC107HI Blair 316673PPLTN100PA Blair 316673YNGS FREDE Blair 316678STNC HORTO Bedford 316682GNRLRPOBOX Blair 316684PPGNDRTE22 Blair 316686CHCGRINDUS Blair 316686QLTYCINDUS Blair 316686WSTVC1600P Blair 316693WSTVCRT866 Blair 317066NRTHMEASTP Huntingdon 3

17066WNSCRUSROU Huntingdon 317233JLGNDJLGDR Fulton 317238MLLTTRD1BO Fulton 3

LINK the tables for a one-to-many relationship...

With the tables opened and the desired “receiving” table the active

one - go to TABLE...LINK