Databases and ArcGIS

You might have spatial or nonspatial data in a database that you want to use in ArcGIS. That database does not have to contain an enterprise geodatabase for you to connect directly to it from the Catalog tree in ArcGIS for Desktop.

The topics in the Database section of the help system describe what you can do with database data in ArcGIS. The following is a summary of that functionality:

Connect to a database

The client machine from which you will connect to the database must have a database management system client on it. You can obtain the clients from your database management system vendor. Many of the client files can also be obtained from the Esri Customer Care portal.

Once the database client is installed on a computer where ArcGIS for Desktop is installed, you can create a connection to the database from the Database Connections node in the Catalog tree. See Database connections in ArcGIS for Desktop for more information. To create a connection from other ArcGIS clients, you can use a Python script that calls the Create Database Connection tool.

View data in ArcGIS for Desktop

Once you have connected to your database from ArcGIS, you can view that data in ArcMap or ArcCatalog. To map spatial data or perform analysis on it, you can drag the table from your connection in the Catalog window in ArcMap to the table of contents. If necessary, define a unique identifier, spatial reference, and geometry type for spatial tables you add to the ArcMap table of contents. See View database data in ArcGIS for more information.

When you drag a database feature class into ArcMap, 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, 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. See Modifying a query layer for more information.

If you have ArcGIS for Server, 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.

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 columns of a data type not supported by ArcGIS, ArcGIS will not display the unsupported columns. When you move tables between databases or between databases and geodatabases using ArcGIS, unsupported data types will not be included in the destination database. See DBMS data types supported in ArcGIS for a list of supported data types per database management system.

Create a read/write user

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. See the tool topic for a list supported databases and the privileges granted to the user.

Create a view

You can create a view on tables or feature classes in your database from ArcGIS for Desktop by right-clicking the database connection in the Catalog tree, pointing to New, then clicking View. In the Create New View dialog box, type an SQL query to define the view. See Create a database view in ArcGIS for Desktop for more information. Alternatively, you can run the Create Database View geoprocessing tool to define a view.

To create a view from other ArcGIS clients, run a Python script that calls the Create Database View tool.

Create tables

You can create spatial and nonspatial tables in your database from ArcGIS for Desktop by right-clicking the database connection in the Catalog tree, pointing to New, then clicking Feature Class (for spatial tables) or Table (for nonspatial tables). The wizard that opens guides you through the creation of the table and allows you to define the columns in the table. See Create a feature class in ArcGIS for Desktop and Create a database table in ArcGIS for Desktop for more information.

Grant and revoke privileges on database tables

Table owners can use the Privileges dialog box in ArcGIS to grant privileges to or revoke them from other database users or roles. See Granting and revoking privileges on datasets for instructions.

Move data between data sources

You can move data between databases or between a database and geodatabase in ArcGIS for Desktop. Options for moving data include the following methods:

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

Edit data

If you have ArcGIS for Server, you can publish a feature service that contains data from an IBM DB2 (Linux, Unix, or Windows), IBM Informix, Microsoft SQL Server, Oracle, or PostgreSQL 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 the data. See What is a feature service? and related topics for more information.

Rename tables

If your database management system allows it, you can change the name of an existing database table from ArcGIS. See Renaming tables for instructions.

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. See Alter database table schema for more information.

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.

Enable geodatabase functionality in a database

You might decide at some point that you want to start using 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. See the topic specific to your database management system for information:

Once you have enabled a geodatabase in the database, any new tables or feature classes you add through ArcGIS is 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 for Desktop. For information on registering tables and feature classes with the geodatabase, see Registering a table with the geodatabase.

2/5/2015