arcgis-data-types
arcgis-data-types
1
Tips & Tricks
Getting Started
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, or binary large object (BLOB).
Choosing the correct data type allows you to correctly store the data and will facilitate your
analysis, data management, and business needs.
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, a series of digits between 0
and 9 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.
Integers
The most basic numeric data type is the short integer. This type of numeric value is stored as a series
of 16 0s or 1s, commonly referred to as 16 bits. Eight bits are referred to as a byte, thus a short
integer takes up two bytes of data. One bit states if the number is positive or negative and the
remaining 15 translate to a numeric value with five significant digits. The actual numeric value for a
short integer is approximately between -32,000 and +32,000. A long integer is a four-byte number.
Again, one bit stores the positive or negative nature of the number while the remaining bits translate
to a numeric value with 10 significant digits. The actual range for a long integer is approximately
between -2 billion and +2 billion. Both short and long integers can store only real numbers. That is to
say that you cannot have fractions, or numbers to the right of the decimal place. To store data with
decimal values, you will need to use either a float or a double.
ArcGIS Data Types Page 3
Floats
A float and double are both binary number types that store the positive or negative nature of the
number, a series of significant digits and a coded value to define the placement of a decimal point.
This is referred to as the exponent value. Floats and doubles are coded in a format similar to
scientific notation. For example, if you wanted to represent the number -3,125 in scientific notation,
you would say -3.125x103 or -3.125E3. The binary code would break this number apart and assign
one bit to state that it is a negative number; another series of bits would define the significant digits
3125; another bit would indicate whether the exponent value is positive or negative; and the final
series of bits would define the exponent value of 3. A float is a four-bit number and can store up to
seven significant digits, producing an approximate range of values between -3.4E-38 to -1.2E38 for
negative numbers and from 3.4E-38 to 1.2E38 for positive numbers. A double is an eight-byte
number and can store up to 15 significant digits, producing an approximate range of values between
-2.2E-308 to -1.8E308 for negative numbers and 2.2E-308 to 1.8E308 for positive numbers.
It is important to note, however, that floats and doubles are approximate numbers. This is due to
two factors. First, the number of significant digits is a limiting factor. For example, you could not
express the number 1,234,567.8 as a float because this number contains more than the permissible
seven digits. In order to store the number as a float, it will be rounded to 1,234,568, a number
containing the permissible seven digits. This number could easily be expressed as a double, as it
contains less than the permissible 15 significant digits.
There are also some limitations to numbers a binary value can represent. One analogy that can be
made would be in expressing fractions versus decimals. The fraction 1/3 represents a particular
value. However, if you try to express this number as a decimal, the number will need to be rounded
at some point. It could be expressed as 0.3333333, however, this is still an approximation of the
actual value. Just as fractions cannot always be expressed as decimals, some numbers cannot be
exactly expressed in binary code, and these numbers are replaced by approximate values. One
example of such a number is 0.1. This number cannot be expressed as a binary number. However,
the number 0.099999 can be expressed in binary. Thus 0.1 would be replaced with an approximate
value of 0.099999.
ArcGIS Data Types Page 4
Text fields
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. For more information on coded value domains, see Subtypes and attribute domains.
Date fields
The date data type can store dates, times, or date 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.
BLOB fields
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.
USDA NRCS
ESRI Authorized Instructors
National Cartography and The National Cartography and Geospatial Center
Geospatial Center (NCGC) maintains seven Authorized Instructors. All
501 W Felix, Building 23 seven are authorized to teach the Introduction to
PO Box 6567 ArcGIS 1 for USDA-SCA 8.3 and 9.x courses. One
Fort Worth, Texas 76115 instructor is authorized to teach the Working with
Phone: ArcGIS Spatial Analyst 9 course. For more information
817-509-3400 on the courses, please contact one of the following
instructors. For a course in your state, please contact
Fax:
Tommie Parham, NCGC Director.
817-509-3469
Dwain Daniels 817-509-3395 dwain.daniels@ftw.usda.gov
Paul Fukuhara 817-509-3395 paul.fukuhara@ftw.usda.gov
Tommie Parham, Director
Gary Hallbauer 817-509-3347 gary.hallbauer@ftw.usda.gov
817-509-3420
Patsy Hudson 817-509-3361 patsy.hudson@ftw.usda.gov
Steve Nechero 817-509-3366 steven.nechero@ftw.usda.gov
Ron Selph 817-509-3373 ron.selph@ftw.usda.gov
Jennifer Sweet 817-509-3421 Jennifer.sweet@ftw.usda.gov