Frequently asked question
To answer this question, it is important to understand the strength and agility of data stored in shapefiles, when compared to file geodatabases (FGDBs). This is due to general technological improvements in data storage since the creation of the shapefile data model by Esri.
In general, if working with data outside of ArcGIS, it is recommended to use shapefiles to store data. To learn more, read ArcMap: Geoprocessing considerations for shapefile output.
Outlined below are some of the technical definitions and differences in the file format and precision/scale of shapefiles, DBFs, and file geodatabases.
What are the allowed field data types?
The allowed field types for file geodatabases are:
For more information, refer to ArcMap: ArcGIS field data types.
The allowed field types for shapefiles are:
If working with fields in a shapefile, refer to ArcMap: Geoprocessing considerations for shapefile output - Attribute limitations for more information on allowed field types.
How is numeric data stored?
Numeric data can be stored as one of the four data types below.
Warning: Values in numeric fields in a geodatabase and shapefile are stored in the binary format. Converting numbers for viewing may result in values that are less exact than expected.
It is important to select the right numeric data type to store data. Factors such as range and fractional values must be considered.
The table below describes the storable range, applications, precision (field length), scale (decimal places), and size (bytes) for each of the numeric data types.
Data Type | Storable Range | Applications | Precision (field length) | Scale (decimal places) | Size (Bytes) |
---|---|---|---|---|---|
Short Integer | -32,768 to 32,767 | Numeric values without fractional values within specific range; coded values | 1–5 (Oracle, SQL Server, PostgreSQL, Netezza); 5 (DB2, Informix) | 0 | 2 |
Long integer | -2,147,483,648 to 2,147,483,647 | Numeric values without fractional values within specific range | 6–10 (Oracle and PostgreSQL); 6–9 (DB2, Informix, Netezza, and SQL Server) | 0 | 4 |
Float | approximately -3.4E38 to 1.2E38 | Numeric values with fractional values within specific range | 1–6 | 1–6 | 4 |
Double | approximately -2.2E308 to 1.8E308 | Numeric values with fractional values within specific range | 1–19 | 1–11 | 8 |
The following table provides examples on how numeric data can be stored in an enterprise, workgroup, or desktop geodatabase.
* Negative numbers require additional precision to store the negative sign.
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 32,767 | Short integer | 5 | 0 |
32,768 to 99,999 | Long integer | 5 | 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 |
How are Date (time) values stored, and what are the supported formats?
It is recommended to store time values in a Date field, which is a special database field type specifically for storing time and date information. The default format of the Date field is mm/dd/yyyy hh:mm:ss, with a specification of AM or PM.
Warning: In shapefiles, the Date field supports only date, not time. The nonsupport of time in Date fields can be a serious limitation for any tool that performs temporal analysis, such as those found in the Space Time Pattern Mining toolbox. Avoid using shapefiles for any kind of temporal analysis or date time calculation.
Time values can also be stored in string or numeric field types. When specifying time values in these field data types, the Time field must be specified. The supported data format for time values are described in ArcMap: Supported field formats.
What are the supported geometry data types for shapefiles and file geodatabases?
Geometry Types |
---|
Point |
Point M |
Point Z |
Polyline |
Polyline M |
Polyline Z |
Polygon |
Polygon M |
Polygon Z |
Multipoint |
Multipoint M |
Multipoint Z |
Multipatch |
For more information on geometry in geodatabases, refer to ArcMap: ArcGIS field data types - Geometry.
If working with a shapefile, refer to ArcMap: Geoprocessing considerations for shapefile output - Geometry limitations.
Get help from ArcGIS experts
Download the Esri Support App