ArcGIS data types |
|
Release 9.1
Last modified April 26, 2005 |
Print all topics in : "Creating new items in geodatabases" |
When creating tables, you will need to select a data type for each field in your table. The available types include a variety of number types, text, date, binary large objects (BLOBs), or globally unique identifiers (GUIDs). Choosing the correct data type allows you to correctly store the data and will facilitate your analysis, data management, and business needs.
View a table
Numeric fields can be stored as one of four numeric data types: short integers; long integers; single-precision floating point numbers, often referred to as floats; and double-precision floating point numbers, commonly called doubles. Each of these numeric data types varies in the size and method of storing a numeric value.
In numeric data storage, it is important to understand the difference between decimal and binary numbers. The majority of people are accustomed to decimal numbers, which are a series of digits between zero and nine with negative or positive values and the possible placement of a decimal point. On the other hand, computers store numbers as binary numbers. A binary number is simply a series of 0s and 1s. In the different numeric data types, these 0s and 1s represent different coded values, including the positive or negative nature of the number, the actual digits involved, and the placement of a decimal point. Understanding this type of number storage will help you make the correct decision in choosing numeric data types.
In choosing the numeric data type, there are two things to consider. First, it is always best to use the smallest byte size data type needed. This will not only minimize the amount of storage required for your geodatabase but will also improve the performance. You should also consider the need for exact numbers versus approximate numbers. For example, if you need to express a fractional number, and seven significant digits will suffice, use a float. However, if the number must be more precise, choose a double. If the field values will not include fractional numbers, choose either a short or long integer.
A text field represents a series of alphanumeric symbols. This can include street names, attribute properties, or other textual descriptions. An alternative to using repeating textual attributes is to establish a coded value. A textual description would be coded with a numeric value. For example, you might code road types with numeric values assigning a 1 to paved improved roads, a 2 to gravel roads, and so on. This has the advantage of using less storage space in the geodatabase; however, the coded values must be understood by the data user. If you define your coded values in a coded value domain in the geodatabase and associate the domain with the integer field storing your codes, the geodatabase will display the textual description when the table is viewed in ArcMap or ArcCatalog.
Learn more about subtypes and attribute domains
The date data type can store dates, times, or dates and times. The default format in which the information is presented is mm/dd/yyyy hh:mm:ss and a specification of AM or PM. When you enter date fields in the table, they will be converted to this format.
A BLOB, or binary large object, is simply some data stored in the geodatabase as a long sequence of binary numbers. Items such as images, multimedia, or bits of code can be stored in this type of field.
GlobalID and GUID data types store registry style strings that uniquely identify a feature or table row within a geodatabase and across geodatabases. Developers can use them in relationships or in any application requiring globally unique identifiers. In a relationship, if a GlobalID field is the origin key, a GUID field must be the destination key. You must add the GlobalID field programmatically; however, once you add it, ArcGIS maintains its values. You can create the GUID field in ArcCatalog, but you must maintain its values.
The data types explained in this section include all the data types available when creating a table using ArcMap or ArcCatalog and storing the table in a personal geodatabase. However, you might choose to store your tables in another DBMS, such as Oracle or dBASE. When this is done, the data types between ArcGIS and your DBMS might not match directly. The types are matched to the closest data type available in the DBMS. This process is referred to as data type mapping. In this process, it is possible that the values will be stored in the DBMS as a different type, applying different criteria to the data attribute. To learn more about the data type mapping process with your database management system, see the Configuration and Tuning Guide for <DBMS> PDF file.