Databases and ArcGIS

You can connect to a supported database from ArcGIS Pro to access spatial and nonspatial data. What you can do with the data varies by the type of database.

To access nonspatial data in databases that ArcGIS doesn't directly support, see Work with OLE DB connections.

Types of databases supported with ArcGIS

Databases can be categorized based on their data models, transaction support, deployment types, and options. Because of these differences, ArcGIS functionality differs for each database type.

Relational databases

Relational databases store and organize highly structured data in tables that are composed of rows (or records) and columns (or fields). Tables are related to one another through key columns in each table.

This model of data storage provides a more linear but predictable model of data relationships.

You can connect to a relational database to do the following:

If you need to extend your database to include such functionality as networks, topologies, attachments, or archiving and you use one of the following database management systems, you can enable a geodatabase in the database.

Cloud data warehouses

Data warehouses hold structured data that is infrequently edited. Data is added to the warehouse often from multiple sources, providing a centralized data storage system that you access to analyze and create reports.

Cloud data warehouses are software-as-a-service offerings of data warehouses that are hosted in cloud environments.

You can connect to a cloud data warehouse from ArcGIS Pro to do the following:

Nonrelational databases

Nonrelational databases—also referred to as NoSQL databases—have less defined schemas and can store unstructured and semistructured data. They are distributed in nature, usually contain large amounts of data, and provide strong analysis functionality. ArcGIS supports the following nonrelational database types.

Graph databases

A graph database stores the entities and relationships that compose a model of interconnected data. Each entity can be related to multiple other entities, and each of those relationships may differ from one another. The graph data model allows you to visualize and analyze relationships in complex data structures.

You can register a supported graph database (a NoSQL database data store) with an ArcGIS Knowledge Server site to create and access knowledge graphs. See ArcGIS Knowledge Server system requirements for information about supported graph databases.

Visualize data

Once you connect to a database from ArcGIS, you can view spatial data in a map by dragging the table from your database connection to the map. If necessary, define a unique identifier, spatial reference, and geometry type for spatial tables you add to the map.

When you drag a spatial table (feature class) from most supported databases onto a map, ArcGIS creates a query layer. The query layer definition includes all columns of supported data types. ArcGIS uses the first row of the table to determine the geometry type (point, multipoint, line, or polygon), spatial reference, and dimensionality (that is, 2D or 3D). If you don't want to use those properties—for example, if you want to display the three-dimensional records in the table, but the first record is two dimensional—you can alter the query layer definition.

To view data from a spatial table that contains a large number of features—several thousand or more—add a query layer to a map in ArcGIS Pro instead of dragging the data onto the map from the Catalog pane. See the following for instructions to add a query layer to a map:

To improve drawing performance for large numbers of features, create a materialized view when you define a query layer for data in a cloud data warehouse.

Another way to improve drawing performance is to aggregate feature into bins. For point data in most cloud data warehouses and relational databases, you can enable feature binning to aggregate features at different scales to improve drawing performance and map large numbers of points in a useful way at smaller scales.

Supported data types

To use data with ArcGIS, the data types in your database table must map to those supported by ArcGIS. If your table contains data types that ArcGIS does not support, ArcGIS does not display the unsupported columns. When you move tables between databases or between databases and geodatabases using ArcGIS, unsupported data types are not included in the destination database. When you publish, the unsupported data types will not be included in the web service. See Database data types supported in ArcGIS for a list of supported data types per database management system.

If you connect to a table in a cloud data warehouse that contains data types that ArcGIS does not support, ArcGIS does not display the unsupported columns. When you publish, the unsupported data types will not be included in the web service. See Cloud data warehouses data types supported in ArcGIS for more information.

Tip:

ArcGIS Pro added support for the following data types:

  • Big integer
  • Date only
  • Time only
  • Timestamp offset
If the new data types are present in the source table when you create or modify a query layer, they will be recognized as the new types. To retain the data type mapping used in ArcGIS Pro 3.1 and earlier, you can configure a Map and Scene setting for the ArcGIS Pro installation.

Support for the new data types varies by database and cloud data warehouse platform. See Database data types supported in ArcGIS for more information.

Analyze data

You can use many different geoprocessing tools to analyze data in a relational database or cloud data warehouse. However, if the tool adds records to an existing database table, the table must contain a unique identifier that is maintained by the relational database. Tools that add records to a table are not supported for cloud data warehouses.

When doing spatial analysis on large feature classes, it may be more efficient to write queries that use the database or cloud data warehouse's native SQL functions in the query layer interface. These queries are processed in the database or data warehouse.

Filter data

You can write SQL queries in the query layer interface to filter the data returned in the map.

If you want the filter to persist outside of the map or project, create a view on tables in your database. You can create a view in a database by running the Create Database View geoprocessing tool, a Python script that calls that tool, or define a view directly in the database using SQL. Use SQL from a third-party tool to create a view in a cloud data warehouse.

Manage data

There are a number of tools available in ArcGIS that allow you to manage data in a relational database. These tools are not supported with cloud data warehouses or nonrelational databases.

Grant and revoke privileges on database tables

Table owners can use the Privileges dialog box or the Change Privileges geoprocessing tool to grant privileges to or revoke them from other database users or roles. See Grant and revoke dataset privileges for instructions.

Manage indexes and statistics

You can use the Rebuild Indexes and Analyze Datasets tools to re-create indexes and update database statistics for the tables you own in the database.

Note that SAP HANA does not have user-created indexes; therefore, there is no need to run the Rebuild Indexes tool on tables in SAP HANA.

Alter the schema of database tables

You can add fields to or drop fields from tables you own in the relational database from the Fields tab of the Table Properties or Feature Class Properties dialog box.

Rename tables

If your relational database management system allows it, you can change the name of an existing database table.

Add data

You can use tools in ArcGIS to create tables and load data from other data sources into a relational database. Options for creating tables and loading data using ArcGIS include the following:

  • Copy tables from a source database and paste them into a destination database.
  • Drag tables from one database connection into another database connection.
  • Use the Copy geoprocessing tool.*
  • Use the Copy Features geoprocessing tool.*
  • Use the Copy Rows geoprocessing tool.*
  • Create a table or feature class in the database and use the Append geoprocessing tool to bring in records from another source.*

*Cannot be used with tables that do not contain a unique identifier that is maintained by the database.

To create tables or feature classes in the database, connect to the database as a user with privileges to create database objects. The database administrator can use SQL to create users and grant the required privileges or run the Create Database User geoprocessing tool to create a user that has privileges sufficient to create database objects for those databases the tool supports.

Publish data

From ArcGIS Pro, you can publish web layers (web services) that access data in a relational database or cloud data warehouse. What you can publish varies depending on which data source you use.

When you create a knowledge graph from data in a NoSQL database, a knowledge graph services is created, but you don't publish the service directly as you do for relational database or cloud data warehouse data. See Configure a knowledge graph for more information.

Publish relational database data

If you have a stand-alone or federated ArcGIS GIS Server site, once you author a map that contains database data, you can publish a map image layer so other users can access your map over the web. If the GIS Server site is federated with an ArcGIS Enterprise portal, a map image layer item is added to the portal.

To allow other users to edit your database data, publish a web feature layer.

Publish cloud data warehouse data

If the map contains data from a cloud data warehouse, you can publish a map image layer or a read-only feature layer to the hosting server of an ArcGIS Enterprise portal.

What data the service accesses—the source data, a view of the data, or data that is copied to a system-managed data store—varies depending on the type of data you publish and the options you choose when you publish.

Edit data

How you edit data in a database from ArcGIS depends on the database source.

  • SQLite databases and OGC GeoPackage files—You can add data from these sources to a map in ArcGIS Pro and edit the data.
  • Supported relational databases—Publish an editable web feature layer, and edit through the feature layer.

    If you have a GIS Server site federated with an ArcGIS Enterprise portal, publish a web feature layer that references the source data. This creates a feature layer item in the portal that you can share with groups whose members need to edit the data. Set the level of editing you want to allow through the web feature layer.

    If you have a stand-alone GIS Server site, publish a map service with feature capabilities enabled, enable editing on the service, and give users access to the service so they can edit the data.

  • You cannot edit data in a cloud data warehouse from ArcGIS.

Enable geodatabase functionality

If you need geodatabase functionality in your relational database, such as topology, networks, or versioned editing, you can create a geodatabase administrator user, and, while connected to the database as that user, you can enable a geodatabase in those databases in which it is supported. This creates the system tables, types, procedures, and functions needed to use a geodatabase.

Note:

You cannot enable a geodatabase in a cloud data warehouse or nonrelational database.

After you enable a geodatabase in a supported relational database, any new tables or feature classes you add through ArcGIS are automatically registered with the geodatabase. You can also register existing database tables with the geodatabase, or you can leave them unregistered and still access them through ArcGIS.