Viewing database data in ArcGIS

You can view the data in your database tables by dragging them from the Catalog window in ArcMap to the table of contents or previewing them in ArcCatalog.

When you drag a feature class (spatial table) or table into ArcMap, it creates a query layer. To define the query layer, ArcMap does the following:

  1. It queries the database for information about the table, such as dimensionality, spatial reference, and geometry type.
  2. If that information is not defined for the table as a whole, ArcMap reads the first row in the table and uses the information from that feature.
  3. If the spatial reference, geometry type, or dimensionality cannot be determined by looking at the first row—for example, if the table doesn't contain data or the row is using a custom spatial reference—you will be prompted to supply this information to use for the layer definition.
  4. ArcMap queries the database to find a not null column that can be used as a unique identifier (ObjectID) for the rows in the specific table. If a qualifying row cannot be found, you will be prompted to define an ObjectID for the table.
  5. Lastly, ArcMap calculates the extent of the layer when you add it to the map.

A query layer is defined to allow ArcGIS to work with your data. There are some rules ArcGIS has for working with data:

However, because what gets displayed in ArcMap is based on a query layer, you can open the query layer definition and change it. For example, if your feature class contains both points and polygons, you can open the query layer definition and choose which geometry type to display. Similarly, if your feature class contains multiple spatial columns, you can open the query layer definition and change the query to include one of the other spatial columns instead. Be aware, though, that the query cannot be altered to display unsupported data types.

The following steps describe how you can view your data in ArcMap.

  1. Start ArcMap, open the Catalog window, then connect to your database.

    You see a list of tables to which you have access in the database. Tables that contain a spatial column (feature classes) have a table icon with a square at the bottom Spatial table of unknown entity type.

  2. Click the table in the Catalog tree to select it.

    If the data contains a spatial column, double-click the table to connect to it. The icon changes to reflect the geometry type that ArcMap has determined is stored in the table.

  3. To view the data, drag the table from the Catalog window in ArcMap to the table of contents.
  4. As described previously, if ArcMap cannot determine some of the information necessary to define the query layer, the New Query Layer dialog box will open to allow you to define the missing information. Click Finish when you have provided the required information.
  5. If you dragged in a feature class, ArcMap calculates the spatial extent of the data.
    • In many cases, you can let ArcMap complete its calculation; it likely will not take long and will be more accurate.
    • If you are adding a feature class that contains a lot of features, though, extent calculation can take a while. If you know the extent of the data or want to use the extent of your spatial reference instead of waiting for the extent to be calculated, you can do so. Click the appropriate button on the Calculate Extent dialog box. If you click Input Extent, you must type a valid extent that includes all the features in the table. If you click Use Spatial Reference Extent, the data extent is set to the full extent of the spatial reference you are using.

    The feature class (or table) is listed in the table of contents and spatial data is rendered on the map.

  6. To see the attribute data in both feature classes and tables, right-click the table in the table of contents and click Open.

If you need to change what data is displayed, open the query layer definition and change the properties or query. See Modifying a query layer for information on changing the properties and definition of a query layer.

Related Topics