Working with layer attributes: Concept of Databases & Tables 

Attribute table

Layer Fields

hiding fields and creating aliases

Delete Field through ArcCatalog

Adding a new field to an attribute table through ArcCatalog

Creating and Modifying Tables

Options

Add Field

Joining a table step1

Joining a table step2Opening the attribute table of the shapefile we are working with

The New Mexico layer''s attribute table

Joing

Joing Data Window: In Step 1, choose the name of the field in the shapefile you will use to join the data. In Step 2, select your external data source. In Step 3, select the name of the field in your external data source that you are going to join by. Then click OK

External Data is displayed in the attribute table of your original shapefile: 9) Right-click on the shapefile in the Table of Contents and select Open Attribute Table. Scroll to the right and confirm that the data from the external table have been appended onto the original data.

Add Field step 1: Using ArcCatalog, click Preview Tab > Table > click Options > click Add Field in the popup menu. Then put the name of the field and type of variable

Add Field step2: 2. Similarly, you can use ArcMap : click the layer > then right click to get the menu, click Open Attribute Table. Table will appear and click Options then Add Field

The next step is to fill this field with your calculated values. Here is step by step: Layer > Open Attribute Table > Option > add field “Density” ([In ArcMap, Start Edit session), Right click on the new field > Calculate Value ,In Field Calculator: use Density = Pop_Admin/sq_Km

Now , after adding fields, we will start the query. Do: Attribute table for new layer (with joing) - select Options, then Select by Attributes

Selected box of Attribute Table - a view of selected records

Query Builder is shown below

Remember to clear the selection set between queries. You can use maim meny or addition tables in Attribute table (option-clear selection)

Query

Creating symbology fot layer, then right-click on the layer and "Save a Layer File"

Creating a summary table for attribute table

You can work with attribute tables for the datasets referenced by each map layer. Right-click a layer in the table of contents to open its attribute table. In the table window, you can perform queries, make selections, zoom and pan to features on the map, and so on. Click the table window''s Options menu to create graphs and reports, change the font for the table, print the table, and perform various other operations. When you select an item in a table or graph, the feature is also selected on the map (and vice versa).

Before you begin to work with a layer''s attribute table, you can first set various display properties for tables. You do this by clicking the Fields tab on the Layer Properties dialog box to specify which fields will appear when you open the layer''s table, what the fields will be named (using alias names), and how numeric fields will be formatted. You can also specify these options for an individual field by right-clicking a field heading in the table window and clicking Properties.




Joins and relates between layers and attribute tables

Related data is often gathered and stored in multiple layers and tables. Some examples of related data stored in different layers and tables include;



A Parcel layer and an Owner table that contains information about the parcel owners.

A States layer and a County layer that contains census data by county for each state.

A Utility Pole layer and a Transformer layer that lists all of the transformers mounted on each utility pole.



Even though the data is stored in different layers and tables, you will often need to identify related data in order to perform queries and editing related data. ArcMap provides three methods to associate related data: relates, joins and spatial joins.


Relate: A relate defines a relationship between two attribute tables using a key common to both tables. Relates allow you to access related data when you work with a layer''s attributes. A relate is similar to a simple relationship class except it can involve data from different workspaces (For example a dBASE table can be related to a coverage) and is stored in a layer file or ArcMap document. Learn more about Relates


Join: When you join two tables, you append the attributes from one table onto the other based on a field common to both. Joins are primarily used to label and symbolize your layer based on the associated data. Learn more about Joins


Spatial Join: When the layers on your map don''t share a common attribute field, you can join them using a spatial join. This joins the attributes of two layers based on the location of the features in the layers. Spatial joins are different from attribute joins in that they are not dynamic and require the results to be saved to a new output layer. Learn more about Spatial Joins


A GIS designed to use data of a given format. A GIS is, simply stated, a way to display data in a map form. A database, in general, is a collection of related information and geographical referenced objects stored in a single file.One or more tanles make up the core of any database. Each Table contains information related to feature. Each table - fields (column heading) and records (rows).

DATABASE FIELDS:
-Numeric - this numbers must be operated (not a code)
-String – character data; can include numbers that are codes, but not operable
-Boolean – true or false, yes or no (for programming)
Date – special format for dates (yyyymmdd)

DATABASE OPERATIONS:
Link/join databases together
Sort data in ascending or descending values
Classify and group data
Create new data
Generate reports
Query records matching criteria
HOW TO QUERY DATABASES
A query is used to extract specific information from the table. In a query, a logical expression is used to specify criteria ( ex. “zones=CB” read as “find all the zones that are designated as Central Business”). The software gives it as a “selected set”, which can be viewed separately, exported to another table, or used to calculate statistics. “Not” – excludes, “not=Smith”, like – searches for specified set of characters within fields.
SUMMARY TABLE is a grouping or classification of the data generated by a different kind of query (mostly for statistics)
RELATIONSHIP IN DATABASES
Cardinalities of Relationship describe the degree of relationship between databases and how databases are connected together (one-to-one, many-to-one, one-to many, hierarchical, and others).Relationship allow for the addition of new data into a database add require a “key field” (or a common field) in each of the databases that has the same type of data so one database can relate easily to another.

ArcView works with temporary copies of tables. Tables are in dBASE format (.dbf), but can be inported from other data formats (.txt).
MODIFYING TABLES
-Shape fields
-ID fields that end in “_id” or “-“
-Area and parameter fields
-Fnode and Tnode fields – From and To node data from line layer. Fields can be ‘invisible’ to hide them from display.

These options are available from the Layer Properties dialog box in Field tab (click on the name of the field to modify, type the new name in the Alias box, and to hide the field, uncheck the box)

About setting field properties and aliases

There are table and layer properties that allow you to customize which data can be displayed and how it will be formatted. For example, you may:


Define which fields are displayed (the visible fields).

Define an alias for a field name so the field appears in the table with a name that is easy to understand. This is helpful because you cannot change the names of fields in your data once they are created.

Define the formatting for numeric data, such as for currency values or to display a relevant number of decimal places. Formatted data appears in the Identify dialog box, legends, the table of contents, table windows, and so on.

Determine the primary display field, which is used by the Identify window and other dialog boxes.

Set table display options and work with columns.



These properties are set in several different places, including the Layer or Table Properties dialog boxes, the table window, and the Tools > Options dialog box. However, there are some field properties that you cannot change. These include field type, length, precision, and scale.

When you are editing features, the customizations made for the display of attribute data will not be shown in the Attributes dialog box (displayed from the Editor toolbar) because the Attributes dialog box is designed to show the exact setup of the database rather than the "user friendly" view you may prefer in your maps.

ADDING AND DEFINING NEW FIELDS FOR ATTRIBUTE TABLES (in both ArcCatalog and ArcMap). New fields can be added using ArcCatalog. You can also access ArcCatalog from ArcMap through the Layer Properties –Open Attribute Table-Options-Add Field.

Adding a field in ArcCatalog

In ArcCatalog, click the shapefile or dBASE table to which you want to add a field.

Click the File menu and click Properties.

Click the Fields tab.

Click in the empty row below the last entry under Field Name and type the name of the new field.

Click under Data Type next to the new field name and click the appropriate data type in the list.

The properties that are appropriate to the new field''s data type appear in the Field Properties list.

Click in the Field Properties list and type the properties.
Properties may include:

Precision—The number of digits that can be stored in a number field. For example, the number 56.78 has a precision of 4.

Scale—The number of digits to the right of the decimal point in a number in a field of type Float or Double. For example, the number 56.78 has a scale of 2. Scale is only used for Float and Double field types.

Length—The length of a text field specified in characters.



Click OK.

Adding a field in ArcMap

In ArcMap, right-click the shapefile layer in the table of contents and click Open Attribute Table.

Click the Options button and click Add Field.

Type a field name in the Name text box.

Click the Type drop-down arrow and click a type.
The properties that are appropriate to the new field''s data type appear in the Field Properties list.

Click in the Field Properties list and type the properties.
Properties may include:

Precision—The number of digits that can be stored in a number field. For example, the number 56.78 has a precision of 4.

Scale—The number of digits to the right of the decimal point in a number in a field of type float or double. For example, the number 56.78 has a scale of 2. Scale is only used for Float and Double field types.

Length—The length of a text field specified in characters.



Click OK.

Adding fields

Open the table.

Click the Options button in the table window.

Click Add Field.

Type the name of the field.

Click the Type drop-down arrow and click the field type.

Set any other field properties as necessary.

Click OK.

ADDING AND DEFINING NEW FIELDS FOR ATTRIBUTE TABLES (in both ArcCatalog and ArcMap). New fields can be added using ArcCatalog. You can also access ArcCatalog from ArcMap through the Layer Properties –Open Attribute Table-Options-Add Field.

A new field must be defined and the type of its contents established. Once a field definition is set, it cannot be changed. The options fof field types in ArcView, Coverages, and Geodatabases:


-Number
-String
-Boolean
-Date
-Binary Integer (B) – integers stored as base 2 numbers. Storage width of 4 bytes (short) or 10 bytes (long)
-Integer (I) – integers stored as ASCII digits
-Numeretic (N) decimal values
-Floating point (F) – stored as exponential floating –point values
-Chjaracter ©Alphanumeretic strings composed of letters, symbols and numbers
-Date (d)
Field Type: short (4 byte), long (10 byte), double(16 significant digit), float (8 significant digit)

Text – Alphanumeric strings
-date – date format
-BLOB –Binary large object (images, documents..)
For integer fields (short and long), specify the PRECISION, which is the total number of digits a value can have in a field. For real numerical fields (float and double) specify both the precision and the SCALE, the total number of decimal places a value can have in a field. Be sure to set the fields large enough to hold desired values; otherwise numbers may be rounded up, converted, or otherwise truncated.

Deleting fields-WARNING – This action will delete the field from the data source, and there is no ‘undelete’ in ArcView.

ADDING RECORDS/EDITING RECORDS/UNDO RECORDS
To edit attribute data, an editing session needs to be opened. Edits can be made directly to a table by clicking in a table cell and changing it to the desired value. To add the4 record to a table, scroll to the bottom of the table, and type into the cells in the blank row at the end. Records can also be copied and pasted. You can undo any edits during the open edit session (Edit-Undo). To save edits, the edit session must be closed. You cannot add or delete fields during an edit session See http://educationally.narod.ru/gisgraph5photoalbum.html - editing.

EDITING AND CALCULATING FIELDS (in Attribute Table)
There are two ways to change the values in a table: type in the new information directly into the fields, or calculate the value of a field using the Field Calculator.

To type in the new information directly into the fields, open edit session.
In the Field Calculator dialog box. The expression used in the calculation – at the bottom. The Advanced button allows more complex Visual Basic expression to be entered, saved and loaded for use another time.

JOINING AND RELATING TABLES
Putting information from 2 tables together is called a Join, as Tables are combined using a common field called a KEY FIELD. The data type must match in both fields, and you cannot join ‘string’ and ‘number’ field. Joined fields can be queried, but not edited. Permanent copies of a joined field can be created by using Field Calculator to copy over the values to the new field. Join direction matters – always be certain which table is to be the SOURCE TABLE (incoming data, usually a separate database Table not linked to the spatial features) source table and which table is the DESTINATION TABLE (usually the Attribute Table for the layer that is linked to spatial features). Common fields must have same data type, but not necessarily same field name.
CREATING AND MODIFYING TABLES
Open the layer properties –Field
Select fields you want to add.
Open the Attribute Table, and select Options tab-Add Field (Precision8 – 8 digits with 2 (scale) decimal places )
Calculate values for fields you will use using Field Calculator
Join Tables one by one for your layer

JOINING A TABLE step-by-step
Methodology:
1) Open ArcMap.
2) Add the shapefile you wish to attach your data to.
3) Right-click on the shapefile and select Open Attribute Table This will display the tabular information currently within the shapefile.
You will need to identify one of these attribute columns to match up your external data too. In this scenario, we will be joining based on the NAME field.
4) Ensure that your external data is in a form that is compatible with ArcMap, either delimited text or .dbf. If you are working in Excel see the recipe Importing an Excel table to your GIS project (ArcGIS 8.x/9.x).
Also, make sure that there is a one-to-one match between the records in the external data source and the shapefile attribute table. This will allow you to join the two tables together. This may require you to do some editing of your external data source. You may have to combine or expand your data to fit the one-to-one relationship.
When you are finished editing your data there should be the same number of data entries in your external data as there are in your shapefile attribute table. Make sure you SAVE and CLOSE the external data file you have been working on.
5) In ArcMap, go to the Add Data button. Navigate to your external dataset in either .txt or .dbf form. Select it and click Add
6) Your external data set will appear in the Table of Contents beneath your shapefile. Note: You can view external data tables like this one by clicking on the Source tab at the bottom of the Table of Contents. The Display tab shows only the map layers in the map document.
7) Right-click on your shapefile within the Table of Contents and select Joins and Relates -> Join . Note: This step is always performed on the layer you want to join data TO.
8) The Join Data window will appear. In Step 1, choose the name of the field in the shapefile you will use to join the data. In Step 2, select your external data source. In Step 3, select the name of the field in your external data source

About editing attributes
About editing values in tables
Adding and deleting fields in shapefiles
Attribute tables
Setting field properties, aliases, and table display options

Hosted by uCoz