Geodatabase field data types |
|
Release 9.2
Last modified May 14, 2008 |
Print all topics in : "Geodatabase table properties" |
When you create feature classes and tables, you select a data type for each field. 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.
The data types explained in this topic include all the data types available when creating a feature class or table with ArcMap or ArcCatalog. If you store your data in an ArcSDE geodatabase or a personal geodatabase, the data types between ArcGIS and your database management system (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 Data types in the DBMS.
You can store numbers in one of four numeric data types:
Data type | Storable range | Size (Bytes) | Applications |
Short integer | -32,768 to 32,767 | 2 | Numeric values without fractional values within specific range; coded values |
Long integer | -2,147,483,648 to 2,147,483,647 | 4 | Numeric values without fractional values within specific range |
Single-precision floating-point number (float) | approximately -3.4E38 to 1.2E38 | 4 | Numeric values with fractional values within specific range |
Double-precision floating-point number (double) | approximately -2.2E308 to 1.8E308 | 8 | Numeric values with fractional values within specific range |
Data type in ArcGIS Desktop | Precision (field length) | Scale (decimal places) |
Short integer* | 1–4 (Oracle)
5 (DB2, Informix, SQL Server) |
0
|
Long integer | 5–10 (Oracle)
6-9 (DB2, Informix, SQL Server) |
0 |
Float | 1–6 | 1–6 |
Double | 7+ | 0+ |
Range | Data type | Precision (field length) | Scale (decimal places) |
0 to 99 | Short integer | 2 | 0 |
-99 to 99* | Short integer | 3 | 0 |
0 to 99,999 | Long integer | 5 | 0 |
-99,999 to 99,999* | Long integer | 6 | 0 |
0.001 to 0.999 | Float | 4 | 3 |
1,000.00 to 9,999.99 | Float | 6 | 2 |
-123,456.78 to 0* | Double | 9 | 2 |
0 to 1,234.56789 | Double | 9 | 5 |
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 by 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 characters used for text vary by language. To allow text to more easily convert between languages, ArcGIS uses Unicode to encode characters.
Learn more about Unicode character encoding
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 is simply some data stored in the geodatabase as a long sequence of binary numbers. ArcGIS stores annotation and dimensions as BLOBs, and items such as images, multimedia, or bits of code can be stored in this type of field. You need to use a custom loader or viewer or a third-party application to load items into a BLOB field or view the contents of a BLOB field.
The ObjectID field is maintained by ArcGIS and guarantees a unique ID for each row in the table. When you look at a table or a layer's attribute table, you will usually see the ObjectID field listed under the aliases of OID or ObjectID for tables and FID for layers. Key functions, such as scrolling and displaying selection sets, depend on the presence of this field.
It should be noted that most ArcGIS Desktop functionality, such as using the identify tool, requires the ObjectID to be unique. Therefore, caution should be used when working directly with the database so that ObjectIDs are not duplicated. For example, when creating views with a one to many relationship there is the possibility that ObjectIDs will be duplicated. This will cause inconsistent behavior in ArcGIS Desktop functionality.
Global ID and GUID data types store registry style strings consisting of 36 characters enclosed in curly brackets. These strings uniquely identify a feature or table row within a geodatabase and across geodatabases. This is how features are tracked in one-way and two-way geodatabase replication. Developers can use them in relationships or in any application requiring globally unique identifiers. In a relationship, if a Global ID field is the origin key, a GUID field must be the destination key. You can add Global IDs to a feature in ArcCatalog by right-clicking it and clicking Add Global IDs. The geodatabase will then maintain these values automatically. You can create the GUID field in ArcCatalog, but you must maintain its values.
Databases with a native GUID data type, such as personal geodatabases and ArcSDE geodatabases in Microsoft SQL Server, store Global ID and GUID values as 16 bytes. Databases without a native GUID data type store them as 38 bytes.
Some notes on Global IDs
Unlike a hyperlink that simply links a feature's field to an image, a field of type raster can actually store the raster data within or alongside the geodatabase. To learn more, see Raster datasets as attributes.
In ArcGIS, the geometry data type indicates the type of geometry—point, line, polygon, multipoint, or multipatch—the table stores. The field stored as geometry type is usually called SHAPE.
Geometry is the data type used by ArcGIS. If you store your data in an ArcSDE geodatabase, how geometric data is stored in the DBMS depends on the DBMS type you are using. This is because ArcSDE for each supported DBMS uses specific geometry storage types.
For example, if you choose Polygon Features for a new feature class,
the SHAPE field added by default will have a data type of Geometry. In the Field Properties section of the New Feature Class dialog box, you will see the Geometry Type will be listed as Polygon.
If you had created a feature class with a different feature type—line, point, multipoint, multipatch, dimension, or annotation—the geometry type for the SHAPE field would change accordingly—to line, point, multipoint, multipatch, or polygon for dimension and annotation.
For the DBMSs used with ArcSDE, how the value of the SHAPE field is stored in the DBMS depends on the geometry storage type used by the DBMS. So, if you create a new feature class in an ArcSDE Personal geodatabase, the values of the SHAPE field will be stored in the geometry storage type ArcSDE Compressed Binary.
See how ArcGIS data types compare to DBMS data types
Learn more about geometry storage types in the DBMS