You can connect to spatial or nonspatial data in a supported database from an ArcGIS Desktop app to do the following:
- Visualize and analyze existing data.
- Filter the data.
- Manage existing data.
- Load data from other sources.
- Share database content by publishing it to ArcGIS Server. When shared as a feature service, data can be edited.
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 types, you can enable a geodatabase in the database.
Visualize data
Once you have connected to your database from an ArcGIS Desktop app, 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 database feature class onto a map in ArcGIS Desktop, a query layer is created automatically and is defined to include all columns of supported data types in the table. The first row of the table is used 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.
Supported data types
To use the 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 will 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. See DBMS data types supported in ArcGIS for a list of supported data types per database management system.
Analyze data
Many geoprocessing tools can be used to analyze data in a database. Just be aware that if the tool adds records to an existing table, the table must contain a unique identifier that is maintained by the database.
When doing spatial analysis on large feature classes, though, it may be more efficient to write queries that use the database's native SQL functions in the query layer interface. These queries are processed in the database.
Filter data
You can write database 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 or feature classes in your database. You can create a view from the Catalog tree in ArcGIS Desktop, run the Create Database View geoprocessing tool or Python script, or define a view directly in the database using SQL.
Manage data
There are a number of tools available in ArcGIS that allow you to manage data in a database.
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, you would not run Rebuild Indexes 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 database from the Fields tab of the Table Properties or Feature Class Properties dialog box in ArcGIS Desktop.
Rename tables
If your database management system allows it, you can change the name of an existing database table from ArcGIS Desktop.
Load data
You can use tools in ArcGIS Desktop to load data from other data sources into your database. Options for 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 Simple Data Loader.*
- Use the Feature Class To Feature Class geoprocessing tool.*
- Use the Copy geoprocessing tool.*
- Use the Copy Features geoprocessing tool.*
- Use the Copy Rows geoprocessing tool.*
- Create a table or create a 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.
Note that to create new tables or feature classes in the database requires you to connect to the database as a user with privileges to create database objects. As the database administrator, you can use the Create Database User geoprocessing tool to create a user that has privileges sufficient to create database objects, or use SQL to grant the privileges required by your database management system to existing users.
Publish data
If you have an ArcGIS Server site, once you author a map that contains database data, you can publish a map service so other people can access your map over the web. If the ArcGIS Server site is federated with an ArcGIS Enterprise portal, the map service is added to the portal as a map image item.
To allow other people to edit your data, you can also publish a feature service.
Edit data
If you have an ArcGIS Server site, you can publish a feature service that contains data from an ALTIBASE, Dameng, IBM Db2 (Linux, Unix, or Windows), IBM Informix, Microsoft Azure Database for PostgreSQL, Microsoft Azure SQL Database, Microsoft SQL Server, Oracle, PostgreSQL, SAP HANA, or Teradata database. You can set what type of edits can be made to the data through the feature service and give people access to the feature service so they can edit. See What is a feature service? and related topics in the ArcGIS Server help for more information.
Enable geodatabase functionality
You might decide at some point that you need geodatabase functionality in your database, such as topology, networks, or versioned editing. You can create a geodatabase administrator user, then, 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.
Once you have enabled a geodatabase in the 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 if you want, or you can leave them unregistered and still access them through ArcGIS Desktop.