Esri mobile geodatabases were introduced in ArcGIS Pro 2.7, with desktop GIS support only in ArcGIS Pro 2.7, 2.8 and subsequent. This documentation refers to mobile geodatabases as mobile GDB for short. Mobile geodatabases are basically SQLite files with a .geodatabase extension. They require installation of an Esri-supplied .dll file called stgeometry_sqlite.dll. As one commentator put it, mobile geodatabases seem to be "recreating the personal geodatabase for the 2020s."
To use mobile geodatabases, we must install the optional stgeometry_sqlite.dll file. This file is an Esri-provided DLL that extends SQLite with Esri's ST_GEOMETRY type. The stgeometry_sqlite.dll file comes in two versions, a 64-bit version and a 32-bit version. The easiest way to install this file is to visit the product downloads page for Release 9, Manifold Viewer, or SQL for ArcGIS Pro, and to download and install the optional package with DLLs for Postgres, MySQL, and Esri Mobile Geodatabases. Follow instructions on the download page to install that optional package.
Manifold products like Release 9, Manifold Viewer, and SQL for ArcGIS Pro include built-in support for SQLite, to connect to GPKG and to SQLite databases. Manifold will automatically load Esri's stgeometry_sqlite.dll file for use with Manifold's internal implementation of SQLite.
Esri utilizes several different "geodatabase" formats for data, in four main types:
Mobile geodatabases - Esri mobile geodatabases are SQLite databases with specialized ST_GEOMETRY types. Reading and writing ST_GEOMETRY data requires installation of an ESRI SQLite extension. This topic discusses Esri mobile geodatabases.
File geodatabases - Stored as files and folders within a file system. These exist in two versions, the old format used by ArcGIS 9 and the new format used by ArcGIS 10 and subsequent. For discussion of new format file geodatabases, see the GDB, ESRI File Geodatabase topic. For discussion of old format file geodatabases, see the GDB, ESRI File Geodatabase, Old Format topic.
Personal geodatabases - Stored in Microsoft Access file format and limited to 2 GB. Personal geodatabases are now a legacy Esri format. They have been replaced with file geodatabases in most uses. For information on personal geodatabases, see the MDB, ESRI Personal Geodatabase topic.
Enterprise geodatabases - Also referred to as "SDE" style geodatabases and stored within a database server such as Oracle or SQL Server. When connecting to popular databases like Oracle or SQL Server, if there is an Esri SDE installation in there, Manifold will automatically be able to use that as well. See the ESRI SDE Geodatabase topic.
Esri introduced mobile geodatabases for support of mobile application. According to Esri, they are "the foundation for interoperable workflows between ArcGIS Pro and ArcGIS Runtime. In the future, mobile geodatabases will enable enhanced workflows and applications in ArcGIS Runtime and the Esri suite of mobile apps."
Mobile geodatabases are basically SQLite files with a .geodatabase extension. To function as a mobile geodatabase, they require installation of an Esri-supplied .dll file called stgeometry_sqlite.dll. Although SQLite is open source, Esri's implementation of mobile geodatabase using SQLite is not open source: it depends on a proprietary Esri .dll file to implement Esri's proprietary ST_GEOMETRY type.
That leads to a key inconsistency for SQL users: On the one hand Esri states "Using a SQL client, you can access your spatial data through SQL statements that implement the ISO SQL/MM Spatial Standard and the Simple Feature Specification of the OGC," while on the other hand in the next paragraph Esri warns, "Caution: Using SQL to alter or edit the data or schema of datasets stored within your mobile geodatabase could corrupt your schema." That does not indicate Esri has confidence in the robustness of their implementation or their API.
Therefore, although Manifold has enabled all geodatabase features within the mobile geodatabase dataport, Manifold recommends using mobile geodatabases in read-only mode. The Manifold mobile geodatabase data port can read and write mobile geodatabases, and it can create new tables and drawings in existing mobile geodatabases, but it will not create a new geodatabase from scratch.
The Manifold Mobile GDB Dataport is Read / Write
Manifold products like Release 9, Viewer, and SQL for ArcGIS Pro use Esri's own API to connect to mobile geodatabases. The Manifold mobile GDB dataport is fully read/write and allows Manifold to edit Esri mobile geodatabases in place. Manifold includes numerous technical features to facilitate read/write use of Esri mobile geodatabases without problems.
The Manifold Mobile GDB dataport:
See the Third Party Release Levels topic for the version of Esri's API currently used.
Allows creating, renaming, and deleting components of all types, storing component definitions inside the geodatabase.
Supports storing Manifold MFD_META properties inside the geodatabase. This allows overriding coordinate systems, setting up styles, and other Manifold features within the mobile GDB.
Supports creating Manifold virtual computed fields within a mobile GDB table.
Allows inserting, deleting and updating records in mobile GDB tables.
Supports and utilizes Esri spatial indexes on vector data.
Supports datetime fields.
Exposes btree indexes on mobile GDB data.
Refers to components using their query names whenever possible.
Exposes coordinate system data.
Reads multi-patch geometry.
Reads geometry with curves, including circular arcs and ellipsoidal arcs.
Reads and writes geometry with Z values.
Forces index names to be different from field names.
Re-uses API objects when reading data from mobile GDB tables, providing higher performance.
Automatically adjusts variants of produced BTREE indexes for unique / nullable field properties.
Forces use of unique indexes on OID and similar special fields in mobile GDB tables, avoiding problems caused when the API sometimes fails to describe them as such.
Logs errors returned by the API if the geodatabase fails to open.
Caches data for btree indexes on the OID field on demand, for significantly faster searches on those indexes.
Verifies the type of geometry values to match the type specified for the table when writing geometry data to a mobile GDB table. If the type of a new geometry value does not match the type of values in the table, the write fails.
Optimizes memory used during reads.
Export to mobile GDB adds zero Z to geoms that do not have it.
Handles renames and deletes of components and changes to table schemas.
Supports refreshing data from the Project pane (right click on the mobile GDB data source and choose Refresh). This is useful for picking up changes to the geodatabase made outside of Manifold.
Supports autogenerated fields, such as OBJECTID.
Supports non-NULL constraints.
Translates coordinate systems with WKID values matching the correspondent EPSG code to EPSG:xxx to let Manifold enable coordinate transforms. Small differences between the definition of the coordinate system used by the database and the definition of the EPSG code used by Manifold are put into the coordinate system overrides.
Attaches EPSG codes to coordinate systems with equivalent WKID codes, to allow using grid-based and other EPSG coordinate transforms when re-projecting components with these systems.
The mobile GDB dataport attempts to work around an Esri bug that frequently occurs in geodatabases created by recent versions of ArcGIS Pro. The bug makes a newly created table fail to register completely. The dataport examines the state of the geodatabase and, if the table has been created and is operable, reports that the table has been created and marks it in the metadata to prompt execution of special workaround logic within Manifold that compensates for the table not being registered completely in the geodatabase.
Deleting a table in a mobile GDB from Manifold attempts to work around an issue in Esri geodatabase code that can cause a table to become unregistered in a geodatabase when a delete fails. The problem occurs when a table that is being deleted is locked in ArcGIS Pro. In that case the delete cannot succeed but it still starts and fails mid-way after unregistering the table from geodatabase structures. If the delete fails, the dataport checks the status of the geodatabase and if the table remains operable, the dataport marks the table in the metadata to trigger execution of special logic within Manifold that compensates for the table being partly unregistered.
The mobile GDB dataport does not report Esri indexes on tables returned by mobile GDB modules as BTREExxx, as Esri's indexes can only be efficiently used to search for individual records, with other operations being unoptimized. This lets the query engine optimize around not having these indexes instead of being tricked into using them with subpar results. Built-in Esri indexes on the OBJECTID field are reported as BTREE, with all operations optimized internally by the dataport.
Exporting a drawing to mobile GDB does not create a feature data set. Creating a feature data set for each drawing, for example, when exporting a map with multiple layers, is not necessary and often is not desired by the user. Manifold now only creates a feature class and leaves adding any desired feature data sets up to the user.
Limitations of the Esri API:
The Esri API does not support rasters (Raster Dataset, Raster Catalog, Mosaic Datasets and Raster Attributes).
Spatial queries using the File Geodatabase API are limited to the envelope-intersects operator.
The Esri API is not thread-safe, so Manifold cannot utilize it for parallel computation. For maximum speed and parallel performance, copy mobile GDB data into the Manifold project and do intensive work within Manifold storage.
The Esri API snaps coordinates of geometry objects to an internal grid, so the final coordinates of the written geometry values within the mobile geodatabase usually will differ slightly from the coordinates supplied by Manifold data.
File geodatabases cannot handle mixed geometry types in the same table. However, the Esri API allows mixing geometry types in the same table even though mobile geodatabases cannot handle that. For example, a point object can be added into a table that contains areas, with the API not throwing any errors during the write; however, the spatial index then without warning stops returning half of the objects in the table. To avoid such internal inconsistency by the API, Manifold rejects attempts to write mixed geometry types via the API.
When creating a table in a mobile geodatabase, Esri requires the geometry type be specified in a property. That is easy to do in Manifold SQL, since the Manifold query engine allows specifying properties for the fields of a table when that table is created. We can also specify properties for a table created by SELECT INTO, for example, using the syntax SELECT ... INTO t (PROPERTY ..., ...) ...; This allows using SELECT INTO to create tables on the fly in an Esri mobile GDB to which Manifold is connected. For example, when creating a table within an Esri mobile GDB if we want to store areas in that table we must specify the FieldGeomType.geom property to have a value of area (types can be area, line, point, or pointmulti):
SELECT [area], [code], [name], [geom]
INTO [gdb]::[states] (
PROPERTY 'FieldGeomType.geom' 'area' -- the default would be 'point'
) FROM [states];
For an example of connecting to an Esri GDB, please see the Example: Connect to an ESRI GDB File Geodatabase topic.
Working with mobile geodatabases is very similar to working with file geodatabases, except that we link or open a file ending in a .geodatabase extension instead of a gdb file (no extension) within a folder that is the file geodatabase.
For examples, see the GDB, ESRI File Geodatabase topic.
Mobile GDB drawings cannot handle a mix of object types. Therefore when writing to mobile GDB, Manifold will split a drawing that contains a mix of points, lines and areas into three different drawings within the mobile GDB. Likewise, when writing to a mobile GDB that is linked, for example, when copying a drawing from a Manifold project and pasting into a linked mobile GDB data source, Manifold automatically splits a drawing containing geoms of different object types into separate drawings for each type within the mobile GDB.
Manifold can write drawings and tables to an existing mobile geodatabase, but the mobile geodatabase dataport cannot create a new mobile geodatabase.
Pass through of mobile GDB to third party applications - When an Esri mobile GDB is connected as a data source within a Manifold project, that data source then becomes available to any third party application which connects to the Manifold .map project by using the Manifold ODBC driver. This provides the ability to read/write Esri mobile geodatabases even to those applications which on their own cannot connect to Esri mobile geodatabases. See examples cited below.
Esri is not Manifold - When connecting to mobile GDB we must be aware we are no longer using Manifold code but instead are using Esri code. Esri products are high quality and there are many advantages to using Esri's own code to connect to intricate Esri formats such as mobile GDB, since presumably Esri's code can handle all the many internal and undocumented quirks of the format. One major disadvantage is that Esri's code in general is not anywhere near as bulletproof as the Radian technology used in Manifold. Esri code can and does crash, so connections to mobile GDB fall outside of Manifold's reputation for never crashing.
Manifold Viewer - View GDB Faster than ArcGIS Explorer - Esri's ArcGIS Explorer product is a free viewer that allows Esri people to view Esri GDB Geodatabases, along with other data. Unfortunately, Esri has stopped producing Explorer and has replaced it with ArcGIS Earth, which cannot connect to and display Esri GDB Geodatabases. The video compares Explorer to Viewer side-by-side so Esri users can see that if they need to continue viewing GDB Geodatabases for free they can reliably use Viewer for fast, high quality GDB viewing.
GDB, ESRI File Geodatabase
GDB, ESRI File Geodatabase, Old Format
GDBmobile, ESRI Mobile Geodatabases
MDB, ESRI Personal Geodatabase
ESRI SDE Geodatabase
Example: Convert an ESRI File Geodatabase into a .map Project - How to convert data in ESRI's current file geodatabase format into a Manifold .map project in a single step. We convert ESRI's example NapervilleGas GDB geodatabase, all 857 files, into a single, unified Manifold .map project.
Example: Convert an ESRI Personal Geodatabase into a .map Project - How to convert data in ESRI's legacy personal geodatabase format into a Manifold .map project in a single step.
Example: Create an ODBC Data Source with Windows - How to create an ODBC data source (a DSN) using dialogs built into Windows 10.
Example: Connect to Manifold from Release 8 - Step by step procedure to connect from Manifold System Release 8 to a Manifold .map file using Manifold's ODBC driver.
Example: Connect to an ESRI GDB File Geodatabase - Connect Manifold to an ESRI GDB file geodatabase, display the contents, make a selection in the GDB and overlay in a map.
Example: Connect to an ESRI GDB usng GDAL/OGR - Instead of using Manifold's built-in ability to connect to modern ESRI GDB file geodatabases, use the Manifold GDAL/OGR dataport to take advantage of the GDAL library's ability to connect to deprecated GDB formats.
Example: Connect Through Manifold ODBC to a Third Party - With Release 8, use an ODBC connection to a Manifold .map to connect through the .map project to a third party, external data source, an ESRI GDB file geodatabase. We use Manifold facilities as an intermediary to give Release 8 capabilities it does not have on its own, to link into data stored within an ESRI file geodatabase.
Example: Connect LibreOffice Through Manifold to an ESRI GDB - A companion example topic to the Example: Connect Through Manifold ODBC to a Third Party topic. Shows how to connect LibreOffice Base, the database part of LIbreOffice, through Manifold to link an ESRI GDB file geodatabase table into LibreOffice.