Vous êtes sur la page 1sur 36

Part II: Microsoft Access

With extensions to ArcGIS and Google Earth

Excel Access
Excel and Access are very similar when it comes to running
powerful queries, running sophisticated calculations, generating
reports and forms, and connecting to external data.

Access
Access is a data management system with relational data.

Access Excel stores information in worksheets; Access stores data in tables for
complex querying in relation to data stored in other locations.
Access is a data management system with relational data.

- Require non-relational view of data (especially - Require relational database


if data is mostly numeric) - May need to add more tables in future
- Want to run calculations and statistical - Have a very large amount of data
comparisons - Have a lot of data that is mostly text
- Dataset is manageable in size (<=15,000 - Want to run complex queries
rows) - Need to maintain connectivity to external
databases

Access Excel stores information in worksheets; Access stores data in tables for
complex querying in relation to data stored in other locations.
Access
Interface
Create a new
query

Retrieve, export or
connect-to data
outside of Access

Navigate-to and filter


tables, queries, Select the view of
forms, and reports your table or query
(Datasheet,
PivotTable,
PivotChart, Design)

Access
Interface
Access
Query Design
Perform summary
calculations (sum, count,
average, etc.)

Select fields to
Run/execute display and
the query perform
calculations on +
set relationships

Create new table or edit existing


Fields and calculations in resulting query
tables when query runs

Access You can write the query in SQL, but the Design View is a graphical
Query Design user interface (GUI) that requires no knowledge of SQL language.
Field: Field from existing
table to be queried
Table: Table where selected
field exists
Total: When Σ Totals is
selected, can perform
summary calculations (min,
max, avg, etc.); default is
“Group By”
Sort: Ascending,
Descending, or not sorted
Show: Field will be displayed
in query result if checked
Criteria: Query for that field
Or: Same as “OR” Boolean

Access Lines below “or:” are the Criteria for fields other than the first. Including different Criteria
on the same horizontal line is the same as the “AND” Boolean; different Criteria on
Query Design
different horizontal lines is the same as the “OR” Boolean
1

Access 1. Select the Create tab 2. Select Query Design


Query Design
1

Access In the Show Table, select AREA_FAR, buildingclass,


LOCATION and USE. Double-click to add each table to the
Query Design
query design.
Access Every table should have a unique identifier (the
Primary Key, which is the BBL in our case for most
You can relate to other tables by dragging one
identifying field to another (BBL to BBL,
Setting Relationships tables). BLDGCLASS TO BLDGCLASS).
5 2

3 4

1. Double click each of 2. Select Σ Totals 3. Uncheck Show for 4. Under the Total dropdown, 5. Select Run
Access the fields shown above BLDGCLASS and in the select Sum for LOTAREA and
Query Design to add them to query. Criteria set it to LIKE ‘I*’ BLDGAREA and Sort the
LOTAREA by Descending
Selecting the View returns back to the Query Design

LIKE ‘I*’ selects LIKE ‘*I’ selects LIKE ‘*I*’ selects


Access
anything that anything that anything with an “I”
LIKE Statement begins with “I” ends with “I” in it
2

1. Back in Design View, change the 2. Save the query 3. Click Run
Access
BLDGCLASS Criteria to ‘I1’ to list only
Query Design Hospitals, Sanitariums, Mental Institutions
Oftentimes there are multiple spellings for the same owner. TIP: Save a copy of the
Access
Selecting one name and replacing the others with the database before making
Updating Records correct name can be accomplished via a query. updates.
1

1. Create a new query 2. Double-click OWNERNAME and in the Criteria 3. Click Run
Access (Create > Query Design) enter LIKE ‘*PRESBYTERIAN H*’ in one row;
Updating Records and add the Location table LIKE ‘*PRESPYTERIAN H*’ in another
4
6+7

4. Select Update table 5. After removing the *, in the 6. Click Run 7. A dialog will appear
Access Update To row type in to confirm the update.
Updating Records PRESBYTERIAN HOSPITAL Click Yes
Access Updating the table for Columbia LIKE ‘*COLUMBIA U*’
Updating Records University properties LIKE ‘*ROYAL CHARTER*’
LIKE ‘*S.K.I.*’
Access Updating the table for Memorial Sloan- LIKE ‘*SLOAN-KETT*’
Updating Records Kettering Cancer Center properties LIKE ‘*MEMORIAL HOSP*’
LIKE ‘*SKI REAL*’
Access Updating the table for St. Luke’s- LIKE “*ST LUKE’S/R*”
LIKE ‘*ST LUKES-R*’
Updating Records Roosevelt Hospital properties.
LIKE ‘*LUKES H*’
4

1. Create a 2. Add LOCATION, 3. Select 4. Create an


Access new query AREA_FAR, and OWNERNAME, Expression
Complex Queries/Builder USE BLDGCLASS using Builder
1 2

1. Navigate to your database and 2. Double-click on the desired Expression


Access select the table(s) that contain the Categories to form an expression for the
Complex Queries/Builder fields for the calculation (AREA_FAR) available built floor area; set the Criteria to >0
Access
Complex Queries/Builder
Access To determine where the developable parcels are, return to Design View
Complex Queries/Builder and add the BBL and ADDRESS
1
3

Access 1. Back in Design View, 2. Enter a Table 3. Click Run to add


select Make Table Name and click OK the table to the
Complex Queries/Builder
database
1 2

1. Add Manhattan Tax 2. Navigate to ArcCatalog and select


Access
Lots 2011 data to a new Add OLE DB Connection under
Relating to GIS ArcMap document Database Connections
1

1. Under the Provider tab, select Microsoft 2. Click Next


Access
Office 12.0 Access Database Engine OLE
Relating to GIS DB Provider
1

1. Enter the location of the 2. Click Test Connection 3. Click OK if the


Access
Access database in the Data to verify that you can connection was
Relating to GIS Source field connect to the database successful
Navigate to the database in ArcCatalog and add the
Access
HOSP_OPP table to the document (drag and drop into the
Relating to GIS Table of Contents).
1

2. Make a copy of the Manhattan tax lots 3. Join the HOSP_OPP table to the
Access
data (right click to copy, paste into Layers) copied layer on BBL
Relating to GIS
Access
Relating to GIS
2

1. Select the Layer To KML 2. Select the new layer and 3. Click OK
Access
tool under ArcToolbox > designate the output file; set
GIS to Google Earth Conversion Tools > To KML the output scale to 1
Access File > Open > navigate to the Google Earth will maintain symbology
GIS to Google Earth recently-created KMZ file and data descriptions from ArcMap
Access
GIS to Google Earth
Columbia University intent to
redevelop existing parking garage

Applied Sciences NYC


– Cornell University
and Israel Institute of
Technology

MSK to expand
existing hospital Hunter College to
move to E76th Street
DSNY garage site; to
relocate garage on
E25th Street

Access
GIS to Google Earth

Vous aimerez peut-être aussi