Migrating to the file geodatabase

Of the various types of geodatabases, file geodatabases are most similar to personal geodatabases in that they are designed to be edited by a single user and do not support geodatabase versioning. You also work with them the same way, whether displaying, querying, editing, or processing data or developing applications. There are a few important differences, though. For example, personal geodatabases have a 2 GB storage limit, while file geodatabases have no limits, and Structured Query Language (SQL) syntax differs slightly between the two. If you are used to working with personal geodatabases and would like to migrate to a file geodatabase, this topic points out these differences and shows you how to get started.

For an introduction to how file geodatabases differ from personal and ArcSDE geodatabases, see Types of geodatabases and How raster data is stored in a geodatabase.

Creating a new file geodatabase

To create a new, empty file geodatabase, right-click a file system folder in the Catalog tree, point to New, then click File geodatabase. See Creating a file geodatabase for more information.

Migrating existing data

File geodatabases have configuration keywords that customize the storage of an individual dataset. You can specify a keyword when you copy and paste or import data, although the default is usually adequate. For more information, see Configuration keywords for file geodatabases.

Creating new datasets

You create an empty feature dataset, feature class, raster catalog, raster dataset, and table in a file geodatabase the same way you create them in a personal geodatabase: right-click the geodatabase or feature dataset, point to New, then click the item you want to create. See any of the following topics for more information:

Creating new datasets using ArcCatalog

Creating raster datasets in a geodatabase

Creating raster catalogs in a geodatabase

Once you've created an empty feature class or table, you load data into it from the Catalog tree. For more information, see About loading data into existing feature classes and tables and Importing raster datasets.

Unlike personal geodatabases, whenever you create a new file geodatabase feature class, raster catalog, raster dataset, or table, either through the Catalog tree or a geoprocessing tool, you can optionally specify a configuration keyword. The configuration keyword customizes how the data is stored and accessed. For a description of the keywords available, see Configuration keywords for file geodatabases.

Editing, displaying, and querying data

Once in a file geodatabase, a dataset looks the same in ArcCatalog and ArcMap as in a personal geodatabase. Also, with the exception of spatial indexes and SQL queries, which are discussed next, you work with datasets the same way. All commands and tools that accept personal geodatabase datasets as input also accept file geodatabase datasets.

The spatial index of a personal geodatabase feature class uses a single grid size that cannot be modified. The spatial index of a file geodatabase feature class uses up to three grid sizes, which you can modify at any time. ArcGIS automatically rebuilds the spatial index at the end of certain update operations to ensure the index and its grid sizes are optimal. However, in some rare cases, you may need to manually recalculate the index. For more information, see Setting spatial indexes.

The SQL WHERE clause syntax you use to query file geodatabases is the same syntax you use on coverages, shapefiles, and other file-based data sources, with some additional capabilities such as support for subqueries. As a result, WHERE clause syntax differs from personal geodatabases. The dialog boxes to create SQL expressions in ArcGIS help you use the correct WHERE clause syntax for the data you're querying, as they list the field names and values with the appropriate delimiters. They also select the relevant keywords and operators for you. However, if you have a WHERE clause defined for a layer in a personal geodatabase, it may not work on the same layer once you've moved its source data into a file geodatabase. Likely reasons for a WHERE clause not working are the following:

WHERE clause syntax for a personal geodatabase

Equivalent syntax for a file geodatabase

[STATE_NAME] = 'California'

"STATE_NAME" = 'California'

[OWNER_NAME] LIKE '?atherine smith'

"OWNER_NAME" LIKE '_atherine smith'

[STATE_NAME] = 'california' (when a case-insensitive search is required)

LOWER("STATE_NAME") = 'california'

UCASE([LAST_NAME]) = 'JONES'

UPPER("LAST_NAME") = 'JONES'

[DATE_OF_BIRTH] = #06-13-2001 19:30:00#

"DATE_OF_BIRTH" = date '2001-06-13 19:30:00'

Examples of how SQL for a personal geodatabase must change before it can work in a file geodatabase

Another reason a WHERE clause may not work is that file geodatabases support fewer operators and functions than are supported by personal geodatabases, and file geodatabases provide limited support for subqueries. However, this is unlikely to be a reason the WHERE clause does not work. File geodatabases support the majority of WHERE clause capabilities you would likely need.

Geoprocessing

There is little that differs in how you use geoprocessing tools on file geodatabases compared to personal geodatabases:

Compressing vector data

Unlike personal and ArcSDE geodatabases, file geodatabases allow you to optionally store vector data in a compressed, read-only format to reduce storage requirements. The compressed data is a direct access format. You do not have to decompress data when you access it: ArcGIS and ArcReader read it directly. The data looks the same as if it was decompressed, and you perform all read-only operations the same way, whether through a command in the Catalog tree, geoprocessing, or ArcObjects. For more information, see About compressing file geodatabase data.

Migrating applications

If you have an application written in ArcObjects and want to switch the data it accesses from a personal to a file geodatabase, consider the following:

Apart from these differences, ArcObjects works the same on file geodatabases as on personal geodatabases.

Performance tips

The following can help improve and maintain file geodatabase performance:

Related Topics

3/13/2015