Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway...

58
GIS by ESRI Understanding ArcSDE ®

Transcript of Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway...

Page 1: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

GIS by ESRI ™

Understanding ArcSDE®

Page 2: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

���������� ��������������

�����������������

���������������� ���!�"���# �

$����!��" ���#�� �����������#%"�������&#�%������������!�����$���'��(������#��%���������� ��#�������� ' ����#�������� '��!�������#�%������!������ �� ����# )������� ��� �� '���� ���� ��*��#����������+�� ��!���'��(" �)�������%#����� ��"����� ��!��"��)� ��"� ������#����#��"�#� ��# ����#�%��������#����������#���������)� ����!��" ������ ���������� �����"��&#�� ��&����������"�����'�����)�����������,%������%��)�����������-���� #�. � ���������/0�+�'1��(��������� ������ �/2/30��������

$����!��" ���#�� �����������#%"�����%)4�#�#� ���'���%���#��

���������������� ������ � ���� ����

�����!' �����#%"�� ���� ��*��� �������������%�������%)4�#�����"��!��5�#���������"������������� ��������6�����"�� #,%������ ��� ����$���$�7*5�.�$�7��68$��� "���"%"�%����%���# ���������#���%��)�������6�����"�����%)4�#������#���� ���!�����9��:;����23�<����� ������� �����=>�+� 02?@9��:;����23� =>�+� 02? ��*��9��:������*������=��""��#� �$�#���# �7 *��"�%����!' ��?@ ��79���:�;����232��;=+AB� ;?=$�#���# �7 ? ��*��79���:��2�2���=��"�%����!' ��?� � ����# )������� #��*. �%! #%����������/0�+�'1��(��������� ������ �/2/30��������

������7����#B��'�. �A)4�#�����������)��������#��!����#�7����#� ������#6�����#. ����#$���)�&���#�&���������#�.����#A)4�#������%����#���"��� � �7 ) �����������#��������#������#��!�5�C�����+�6��)����������#�&���������������#B��'���������#��!����������#�.����������#�7���7������������. �A)4�#���������������������� ��'''������#�" ��� ��" �(������������ ��" �(���������#�" �(��!�������������� ������%���� ���""%������#�� ������4%�����#�����+��# �� ����+��# ��+���� �� ��������� � ��" �(� �!+��# ����""%��# ���������� ��� �� ������� � �� �� ���� #�%������ $��.�#����!�������&������������ � ��" �(�!.�#����!������ ����

$��� "���!����#�"� ���� ������%#������� ��� ��" �(������������� ��" �(��!���������#���� ��" �(�'�����

attribution.p65 11/12/2002, 12:47 PM2

Page 3: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

iii

Contents

INTRODUCING ARCSDE ............................................................................................. 1

Welcome to ArcSDE ................................................................................................... 2

ArcSDE benefits ......................................................................................................... 3

ArcSDE: a key part of ArcGIS .................................................................................... 5

Additional applications using the ArcSDE gateway ....................................................... 8

The ArcSDE developer’s API ...................................................................................... 9

A message to SDE 3 users .......................................................................................... 10

GEODATABASES ............................................................................................................ 11

What is a geodatabase? .............................................................................................. 12

The geodatabase repository ........................................................................................ 13

Vector data in a geodatabase ...................................................................................... 14

Raster data in a geodatabase ...................................................................................... 17

Other data in a geodatabase ....................................................................................... 20

Working with geodatabases ........................................................................................ 21

Implementing geodatabases ........................................................................................ 23

DATA STORAGE ............................................................................................................ 25

Data storage with ArcSDE ........................................................................................ 26

Organizing features ................................................................................................... 27

Types of features ....................................................................................................... 28

Feature storage .......................................................................................................... 29

Geometry storage options .......................................................................................... 31

Spatial indexing ......................................................................................................... 32

Relational access and object relational access .............................................................. 33

Raster data storage .................................................................................................... 35

contents.p65 01/31/2001, 2:51 PM3

Page 4: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

iv • Understanding ArcSDE

THE ARCSDE ARCHITECTURE ................................................................................ 37

What is an application server? .................................................................................... 38

Direct connections .................................................................................................... 40

Connecting with a direct connect driver ..................................................................... 41

Licensing .................................................................................................................. 42

ARCSDE FOR COVERAGES ....................................................................................... 45

Introducing ArcSDE for Coverages ............................................................................ 46

ArcSDE for Coverages .............................................................................................. 47

WHERE TO GO NEXT ............................................................................................... 49

Administrators .......................................................................................................... 50

Developers ................................................................................................................ 51

End users .................................................................................................................. 52

ArcSDE resources ..................................................................................................... 53

contents.p65 01/31/2001, 2:51 PM4

Page 5: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

1

1 IntroducingArcSDE

ESRI® ArcSDE® is the geographic informationsystem (GIS) gateway to relational databases.It allows you to choose the relational databasemanagement system (DBMS) you want touse in your organization to fully integrate GISand DBMS. This chapter introduces you toArcSDE and its many roles.

In this chapter:

• Welcome to ArcSDE

• ArcSDE benefits

• ArcSDE: A key part of ArcGIS

• Additional applications using the ArcSDEgateway

• The ArcSDE developer’s API

• A message to SDE® 3 users

Ch01.p65 11/12/2002, 1:53 PM1

Page 6: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

2 • Understanding ArcSDE

Welcome to ArcSDE, the GIS gateway to your DBMS.

ArcSDE is the tool that allows you to store and managespatial data in your chosen DBMS. ArcSDE is open; itworks with a variety of different databases—includingOracle®, Informix®, IBM® DB2®, and Microsoft® SQLServer™—that scale from work groups to large enterprisedatabases.

ArcSDE plays a fundamental role in a multiuser GIS. WithArcSDE, your ArcGIS™ software (ArcInfo™,ArcEditor™, ArcView®, and ArcIMS™) can workdirectly with spatial data managed in your DBMS.ArcSDE also works as an application server, deliveringspatial data to many kinds of applications and servingspatial data across the Internet.

ArcSDE provides the gateway between the GIS and theDBMS to share and manage your spatial data as tables. In a

WELCOME TO ARCSDE

heterogeneous database environment, where a number ofdifferent departmental or personal database systems areused, ArcSDE provides a common model for geographicinformation. This allows you to take full advantage of thefacilities your DBMS has to offer for integrating your GISinformation with the rest of your organization’s dataholdings.

In this book, you will begin to learn about three primaryroles of ArcSDE in multiuser GIS:

• DBMS Gateway supporting many databases

• As a high-performance application server to deliverspatial data to many users and applications

• Advanced editing services for long transactions andversioning

Ch01.p65 02/09/2001, 10:45 AM2

Page 7: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Introducing ArcSDE • 3

Multiuser GIS requires a database and GIS tools to workwith the spatial data. Many types and sizes of spatialdatabases can be built, but typically, as your organizationevolves, your spatial database will grow in size andnumber of users. As your spatial database grows, you mayfind it valuable to share it more widely within yourorganization or outside of your organization on the WorldWide Web.

In light of the trend toward large, widely shared spatialdatabases, ArcSDE provides a number of key benefitsincluding the following:

Database connection configuration options

ArcSDE allows you to distribute the GIS applicationprocessing between the database server, the client, and theArcSDE application server. You may also configure yoursystem to use what are called “direct connections”. Theapplication can connect directly to the DBMS withoutusing the ArcSDE application server. Connecting to theArcSDE application server provides performanceadvantages as well as providing a mechanism forsupporting serverside applications. Direct connectionsprovide an easier way to achieve DBMS connectivity withless administration. You can, for example, directly connectto an Oracle Spatial database without requiring theArcSDE application server. Direct connections are also anadvantage in configurations requiring failover support. Theconnection configuration options allow you to define thesystem that best supports your needs.

Spatial data representation

The spatial data representation is built on standard datatypes in the DBMS. In cases where the DBMS hasextended spatial data types, ArcSDE can access and usethese types for managing feature geometry. Whennecessary, ArcSDE provides the mechanism for managingfeature geometry. These storage methods provide a fastand compact representation for spatial data.

Database portability

With ArcSDE, you can move data from one DBMS toanother without loss of information through ArcSDEdata export and import capabilities. This is especiallyimportant if your enterprise has a heterogeneous databaseenvironment, possibly including work group or personaldatabase systems. This capability is available for even themost advanced geodatabase designs.

ARCSDE BENEFITS

Application portability

ArcSDE defines a logical model for spatial data,implemented on top of a physical database representation.With little or no change, applications developed with theArcSDE application programming interface (API) will runon different physical schemas within a DBMS. This letsthe GIS database administrator choose the best databaseschema for each individual dataset to meet therequirements of an application. For example, one datasetcan be maintained and edited using a binary schema(stored as LONG RAW in Oracle), while another datasetmight be stored as Oracle Spatial geometry types. How thedata is stored is transparent to the end-user application.

Data integrity

ArcSDE manages the integrity of the point, line, andpolygon information added to the database and won’tallow ill-formed feature geometry to be inserted (forexample, polygon boundaries must be closed). In addition,you can use the ArcSDE gateway with ArcInfo andArcEditor to implement additional integrity constraints onthe data model that aren’t practical to implement in theDBMS itself. For example, you can add connectivity rulesfor utility networks.

Application programming interface

ArcSDE provides open, high-level C and Java™ APIs forquerying and processing spatial information. These APIsprovide GIS functions for advanced applicationdevelopment. When the host DBMS provides extendedspatial types (for example, Oracle Spatial, Informix SpatialDataBlade®, and IBM’s DB2 Spatial Extender), aStructured Query Language (SQL) API is also available forthe DBMS to work with the geometry columns in theDBMS.

ArcGIS provides a Microsoft Component Object Model(COM) API called ArcObjects™, containing a GeodataAccess subsystem, which is compliant with the Open GISConsortium (OpenGIS®) simple feature standard.

Ch01.p65 02/09/2001, 10:45 AM3

Page 8: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

4 • Understanding ArcSDE

Database and application development costs

You can significantly reduce the cost of building andmaintaining a spatial database by using ArcSDE withArcGIS. ArcGIS provides many tools and datasets to helpyou quickly implement your application. Other ESRIsoftware can use the ArcSDE gateway—so you can choosethe most appropriate tools for your application.

Applications and development tools

ArcSDE is the standard interface that allows direct accessto spatial databases from ESRI’s GIS software—ArcInfo,ArcEditor, ArcView, and ArcIMS. These applications andtheir integrated developer tools provide a comprehensiveframework for creating, managing, and using spatialinformation. ArcSDE also supports direct interfaces fromAutoCAD® and MicroStation® to spatial databases. Inaddition, a significant third-party developer communityexists for ArcSDE. Visit the ESRI ArcSDE Web site atwww.esri.com to learn more about partner applications.

Ch01.p65 01/31/2001, 1:58 PM4

Page 9: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Introducing ArcSDE • 5

ARCSDE: A KEY PART OF ARCGIS

ArcGIS is an integrated family of software consisting ofthree key parts:

• ArcGIS Desktop, an integrated suite of advanced GISapplications available as ArcView, ArcEditor, andArcInfo

• ArcIMS, Internet-based GIS for distributing data,maps, and services

• ArcSDE, the gateway for managing GIS data in aDBMS

ArcGIS uses an object-relational data model called ageodatabase for representing geographic information in aDBMS. Geodatabases model not only spatial features butalso their behavior, rules, and relationships with otherfeature classes and objects in the geodatabase. Thisintegration of behavior with features allows you to createmore sophisticated, advanced GIS models. Once you’vedefined behavior for features, it is available in each of theArcGIS desktop applications—ArcCatalog™, ArcMap™,and ArcToolbox™—as well as in ArcObjects, the object-oriented developer components for ArcGIS.

A geodatabase is implemented using standard DBMStechnology and can scale from small personal geodatabases

maintained by the Microsoft Jet Engine to multiuserdatabases shared in a work group or across an enterprise.

Since building and managing a shared geodatabase formultiple users require a GIS and a DBMS, ArcGISDesktop and ArcSDE are delivered together as a singlesolution. You use ArcGIS Desktop with ArcSDE toimplement your database design, specify feature behavior,add and edit geodatabase contents, and managegeodatabases in a multiuser setting.

Three types of ArcGIS Desktop seats are available to usewith ArcSDE and a multiuser geodatabase:

1. ArcView for mapping, map analysis, and geodatabaseuse.

2. ArcEditor for building and maintaining a multiusergeodatabase with its advanced editing and versionmanagement.

3. ArcInfo for data loading, geoprocessing, and otheradvanced tasks.

Each of these seats provides more and more powerfulcapabilities for building and using large multiusergeodatabases.

The ArcGIS Desktop products—ArcInfo, ArcEditor, and ArcView—as well as the Internet GIS technology—ArcIMS—are designed to takemaximum advantage of ArcSDE and DBMS technology.

ServerProducts

FilesFiles

ArcSDEDBMS

Gateway InternetServices

ArcIMS

DesktopProducts

The ArcGIS System

DBMS

ArcInfo

ArcSDE Data Editor

ArcEditor

ArcSDE Data Editor

ArcView

ArcSDE DataViewer

Ch01.p65 01/31/2001, 1:58 PM5

Page 10: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

6 • Understanding ArcSDE

The combination of ArcGIS Desktop and ArcSDEprovides a complete and powerful enterprise GIS solution.Together, they allow you to:

• Directly edit spatial information in the DBMS.

• Manage the edits of multiple users on the samegeodatabase with long transactions and alternateversions.

• Manage features in a geometric network. Connect andedit features as a graph of related objects and performnetwork queries such as tracing and finding the shortestpath between locations.

• Manage features with integrated topology and sharedgeometry. Define and edit features that have beenintegrated in a planar topology and maintain theirintegrity.

• Associate editing and mapping rules with features inthe geodatabase. You can define and manageassociations (or relationships) between different featureclasses or objects such as between parcels and ownersor between lot lines and lot line annotation. ArcMap,the ArcGIS editing and mapping application, exploitsand maintains these relationships.

• Manage georeferenced imagery and other raster datasetsin the geodatabase.

• Convert spatial information between a variety ofdifferent file formats and the geodatabase.

• Use address matching and dynamic segmentation toassociate database records with geographic locations formapping and spatial analysis.

• Write geodatabase applications by either customizing orextending the standard ArcGIS application frameworkor by using ArcObjects, the extensive COM-baseddevelopment library for ArcInfo.

Ch01.p65 01/31/2001, 1:58 PM6

Page 11: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Introducing ArcSDE • 7

Electric UtilityGeodatabase

Feature dataset

Feature class

Feature class

Relationship class

Geometric network

Feature class

Parcel geodatabase

Feature dataset

Feature class

Feature class

Feature class

Object class

Relationship class

Water geodatabase

Object class

Relationship class

Feature class

Feature class

Feature class

Object class

Roads geodatabase

LocatorAddresses

TIN dataset

Object class

DBMS

Public safety EngineeringPlanning

Shared geodatabasesare maintained in

each keydepartment's DBMS.

Users select theDBMS and storage

options for theirshared geodatabase.

Users work with oneunified object view of

the corporategeodatabase.

ArcInfoUsers connect toshared geodatabases

from manyapplications.

Emergency response

Council districtingGrowth planning

Property managementRoad maintenance

Trouble call

DBMS DBMS

ArcSDE Gateway

Ch01.p65 01/31/2001, 1:58 PM7

Page 12: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

8 • Understanding ArcSDE

ADDITIONAL APPLICATIONS USING THE ARCSDE GATEWAY

The high-performance ArcSDE gateway lets you serve thecontents of geodatabases to many people who may use awide variety of applications to access the information. Itallows you to centrally manage and share yourorganization’s large, multiuser geodatabase orgeodatabases. In a typical client/server configuration, theArcSDE server is located with the centralized database onthe network. Desktop applications establish connectionsover the network to work with the contents of thegeodatabase. Geodatabases can also be served over theInternet using ArcIMS.

You can use a wide variety of GIS and computer-aideddesign (CAD) applications to work with geodatabasesthrough the ArcSDE gateway.

ArcView GIS 3, the world’s most popular GIS, can accessand work with geodatabases through ArcSDE. Customapplications are built using Avenue™, ArcView GIS 3’sobject-oriented programming environment.

ArcIMS provides distributed GIS for the Internet, addingservices and applications that allow your GIS to bedistributed across the World Wide Web. ArcIMS caninclude ArcSDE as part of its configuration for sharedgeodatabase access.

ArcView GIS 3

ArcIMS 3 Custom Java Viewer

ArcIMS 3 HTML Viewer

Ch01.p65 01/31/2001, 1:59 PM8

Page 13: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Introducing ArcSDE • 9

THE ARCSDE DEVELOPER’S API

ArcSDE comes with high-level APIs for querying andworking with information in geodatabases. These include:

• ArcSDE client API for C and Java developers

• COM API (ArcObjects) for use with ArcInfo,ArcEditor, and ArcView

ArcSDE Client API

Available for both C and Java, the ArcSDE client APIprovides many advanced GIS functions. All ESRI clientapplications that work with the ArcSDE gateway use theC API. The ArcSDE client API provides a relational viewof simple spatial features for these applications. TheseAPIs allow developers to build custom applications towork with any DBMS supported by ArcSDE. The clientAPI is most appropriate for building focused, mission-critical applications—for example, in emergency responseand customer care. ArcSDE has a significant third-partydeveloper community providing application solutions formany industries.

ArcObjects

ArcObjects is the COM developer’s API for ArcGISDesktop. It provides the ability to access and work withthe contents of geodatabases as objects with advancedGIS behavior and relationships.

ArcSDE

C or JavaClient—simplefeatures fromgeodatabase

SQL Client

parcelbuilding

ArcSDE

ArcSDE

pole

transformer

ArcObjectsAPI

power lines

SQL

There are SQL APIs available for working withgeodatabases. The SQL interface provided by your DBMScan be used to work with the contents of geodatabases.Since geodatabases use standard DBMS columns, theDBMS’s SQL API is used. For a spatially enabled DBMS(i.e., Informix, IBM DB2, and Oracle Spatial), specialgeometry types extend the types supported in the DBMSand in their SQL implementations, allowing you toperform spatial queries directly in the geodatabase. Thisallows query access to feature geometry using DBMSapplications.

For example, you could use an SQL select statement toperform a spatial join.

Ch01.p65 01/31/2001, 1:59 PM9

Page 14: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

10 • Understanding ArcSDE

A MESSAGE TO SDE 3 USERS

ArcSDE 8.1 is a major upgrade to Spatial DatabaseEngine™ (SDE) 3. In addition to adding significantextensions to the SDE 3 data model, ArcSDE is tightlyintegrated with ArcInfo, ArcEditor, and ArcView. While itis important for you to begin to understand these changes,another major goal of ArcSDE is to continue to supportall of the existing capabilities in SDE 3 so that migratingyour applications to ArcSDE is not difficult. This sectionprovides an overview of many of the changes to help youunderstand how to migrate your existing SDE 3 systems toArcSDE.

If you have been using SDE 3 in a productionenvironment, you may be concerned about migrating toArcSDE. What’s involved? First, ArcSDE provides all theexisting capabilities of SDE 3 and will continue to serveits traditional role as an application server for SDE 3databases in your DBMS, without requiring data to bereloaded. All of the currently supported SDE 3 clientapplications (such as ArcView GIS 3 and MapObjects®)continue to be supported by ArcSDE at the same level asby SDE 3. No changes are required in existing ESRIapplications to migrate from SDE 3 to ArcSDE. Customapplications built from the C API will need to recompileand relink with ArcSDE client libraries before being ableto work with ArcSDE.

The transition to ArcSDE is simpler in cases where yourdatabase schema does not change. However, because ofthe new extensions to the spatial data model and the tightintegration with ArcInfo, you should consider migratingyour SDE 3 system to ArcSDE to take advantage of thesenew capabilities. Several migration strategies are presentedin the What is ArcGIS? booklet.

From SDE 3 layers to geodatabases

Perhaps the most fundamental change in ArcSDE is theextension to the spatial data model. In earlier releases ofSDE, the spatial data model organized features intoindependent feature classes called SDE layers. Eachindividual SDE layer is a collection of features organizedinto one or more feature (entity) types as a feature table inyour DBMS. When you needed to model relationshipsbetween feature classes, it was your responsibility to buildfeature behavior and relationships in your application.

In ArcSDE, spatial data in a database is called ageodatabase. In conjunction with ArcInfo, the geodatabase

data model capabilities have been significantly enhanced tosupport advanced vector data models, raster datasets, andaddress-based datasets. While geodatabases are stored inrelational tables, they are used as objects in ArcInfo.Feature behavior is easily modeled in ArcInfo, so advancedapplications are much easier to implement.

Geodatabases for ArcSDE are flexible enough to supportboth existing SDE 3 layer data models and more advanceddatabase designs. With ArcSDE, independent layers canstill be designed and managed as they are in SDE 3; theyare referred to as standalone feature classes. In addition,sets of related feature classes can be managed together inan integrated feature dataset. Feature datasets aresomewhat analogous to the file-based coverage format inArcInfo—they can contain multiple feature classes and canbe used to represent more complex spatial models thanindependent SDE layers. For example, topologicalrelationships can be used to model networks and sharedgeometry between feature classes using feature datasets.This added ability to model systems of related features infeature datasets is a very significant enhancement.

Features in geodatabases have been extended beyondfeatures in SDE layers in two other areas: geometry andbehavior. In geodatabases, feature geometry has beenextended to include parametrically defined edges such ascircular curves and Bézier curves. These allow moresophisticated and accurate representations of the builtenvironment. Additionally, features in geodatabases cannow have behavior. Behavior can be implemented ingeodatabases using validation rules, relationships, andattribute domains.

Another key advantage of ArcSDE over SDE 3 is theArcInfo support for concurrent editing of data by multipleusers using versioned geodatabases. The ability to createversions of the geodatabase allows more flexibility increating, maintaining, and managing a geodatabase.ArcInfo and ArcSDE also provide the opportunity tocreate versions that simulate alternative design scenarios.

Chapter 2, ‘Geodatabases’, describes in more detail howgeodatabases extend the fundamental SDE 3 data model.

Ch01.p65 01/31/2001, 1:59 PM10

Page 15: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

11

2 Geodatabases

ArcSDE 8 uses standard DBMSs to defineand manage geodatabases. These can containsimple layers of points, lines, or polygonsmanaged as independent feature classes, aswell as very sophisticated spatial systemscontaining topology and relationships. Thischapter provides an overview of thegeodatabase model and discusses howgeodatabase contents are stored andmanaged as part of a DBMS.

In this chapter:

• What is a geodatabase?

• The geodatabase repository

• Vector data in a geodatabase

• Raster data in a geodatabase

• Other data in a geodatabase

• Working with geodatabases

• Implementing geodatabases

Ch02.p65 02/01/2001, 8:55 AM11

Page 16: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

12 • Understanding ArcSDE

WHAT IS A GEODATABASE?

A geodatabase is a repository of your spatial data inside aDBMS. It contains all of your vector data, raster data,tables, and other GIS objects. The term geodatabase isshort for geographic database, a relational databasecontaining geographic information.

Geodatabases come in many sizes and have any number ofusers. They can scale from small, single-user databases tolarge work group and enterprise geodatabases usedsimultaneously by many users. ArcSDE lets you implementa multiuser geodatabase of any size in the DBMS of yourchoice—Oracle, Microsoft SQL Server, IBM DB2, andInformix.

The geodatabase model supports an object-relationalvector data model. In this model, entities are representedas objects with properties, behavior, and relationships.Support for a variety of different geographic object typesis built into the system.

These object types include simple objects, geographicfeatures (objects with location), networks and topology(objects having spatial relationships with other features),annotation features, and other more specialized featuretypes.

The geodatabase model lets you define relationshipsbetween objects, together with rules for maintaining theirreferential integrity.

The simplest geodatabase is one that contains a number ofindependent feature layers. Each feature layer typicallycontains points, lines, polygons, or annotation. This isanalogous to how SDE layers are implemented in SDE 3and to ArcView shapefiles. In these data models, eachlayer contains a single, standalone feature class.

The goal of this chapter is to briefly introduce you togeodatabases and how they can be used to modelgeography—from very simple data models containing afew independent feature classes to sophisticated spatialsystems containing topology and other complexrelationships among the spatial objects in the database.This chapter provides a foundation for exploringgeodatabase design, which is discussed in detail in thebook Modeling Our World—The ESRI Guide to GeodatabaseDesign.

Geodatabases can be multiuser, implemented with ArcSDE in the DBMS of your choice, or smaller personal geodatabases implemented inMicrosoft Jet Engine databases. The 2 Gb limit in personal geodatabases is the MS Access MDB file size limit.

DBMS Client/Server Objects LongTransactions* Editors C or Java

API Raster Size

Multiuser

Geodatabases

Oracle,

Microsoft SQL

Server,

Informix,

IBM DB2

Yes Yes Yes 1 or more Yes Yes Unlimited

Personal

GeodatabaseMicrosoft Jet No Yes No 1 only No No

Up to2 Gb

*Database transactions spanning multiple edit sessions

Ch02.p65 01/31/2001, 11:47 AM12

Page 17: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Geodatabases • 13

THE GEODATABASE REPOSITORY

Inside a geodatabaseGeodatabase

Feature datasets

Spatial reference

Geometric networks

Planar topologies

Domains

Raster datasets

Rasters

Validation rules

Locators77 Sunset

rastersurface

vector

location

Raster datasets can represent an imaged map, a surface,an environmental attribute sampled on a grid, orphotographs of objects referenced to features. Some rasterdata is collected in bands that commonly representdifferent spectral ranges of camera filters.

TIN datasets are triangulations of sets of irregularly locatedpoints with z-values (elevations) sampled from a surface.TINs are most often used to model the earth's surface butare also used to study the distribution of a continuousenvironmental factor such as chemical concentration. At the8.1 release TINs are stored in coverage workspaces.

Many databases contain alphanumeric descriptions of locations such as addresses. These descriptions can bestored in tables in a geodatabase. A locator defines a processfor converting alphanumeric descriptions to geographic features in the geodatabase.

topology

data integrity

entitiesrelationships

Feature classes, subtypes

Object classes, subtypes

Relationship classes

A feature dataset contains objects and features and therelationships among them. An object is a nonspatial entity,and a feature is a spatial entity. A relationship links twoentities.

Objects of the same kind are stored in an object class.Features of the same kind and with the same type ofgeometric shape are stored in a feature class.

A relationship class stores relationships between entities intwo object or feature classes.

A

Geometric networks model linear systems such as utilitynetworks and transportation networks. They support a richset of network tracing and solving functions.

Domains are sets of valid attribute values for objectattributes. They can be textual or numeric.

Validation rules enforce data integrity through domains, relationship rules, and connectivity rules.

can be

inside or

outside

feature

datasets

spatial referenceAll feature classes in a feature dataset share a commoncoordinate system. Because the feature dataset is thecontainer of topological associations, it is important toguarantee a common spatial reference.

Planar topologies model systems of line and area featuresas a continuous coverage of an area. Planar topologiesallow features to share common boundaries such ascounties that share an outer boundary with a state.

TIN datasets

nodes edges

faces

Ch02.p65 01/31/2001, 11:47 AM13

Page 18: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

14 • Understanding ArcSDE

VECTOR DATA IN A GEODATABASE

Vectors are a versatile and frequently used geographic datarepresentation, well-suited for representing features withdiscrete boundaries such as wells, streets, rivers, states, andparcels. Typically, features are spatially represented aspoints, lines, or polygons. Here is a summary of the vectorcontents in a geodatabase.

• Object class. A database table with which you canassociate behavior. Rows in a table are objectinstances that have special behavior in the GIS.An example of an object class is “owners” of“land parcels”. You can establish a relationshipbetween the polygon features for land parcels andthe object class of owners.

• Feature class. A collection of features of the sametype. A feature is simply an object that has a locationstored as one of its properties or fields in the row. Afeature’s geometry type is commonly point, line,polygon, or annotation. Examples of feature classes arestreams, counties, and census tracts. Feature classes canbe independent of one another or can be related toother feature classes. When related to one another,feature classes are organized together in a featuredataset, which you will read more about below. Forreaders familiar with SDE 3 databases, SDE layers areanalogous to standalone feature classes. In fact, existingSDE 3 layers present themselves in a geodatabase asstandalone feature classes.

• Feature attributes. Properties stored as fields in afeature class table. Attributes define standard andcustom properties of features and can be numeric,textual, or descriptive identifiers.

• Spatial reference. The earth-based coordinate system inwhich the dataset is represented. This specifies thedataset’s real-world location. The spatial referenceincludes properties such as the map projection, thedatum, the allowable range for the coordinates (forexample, the range for x,y or x,y,z), and so on.

• Subtypes. A set of classes for the members of a featureclass. A feature class may contain features that have thesame general behavior and properties but that have adifferent meaning or role in the data model. Forexample, while it is useful to distinguish iron pipesfrom PVC pipes and the role each plays in your datamodel, it may be more appropriate to design a single“pipes” feature class and to distinguish the differenttypes of pipe as subtypes.

816 HighStreet

1888 2200 4bedrooms

Address Built Squarefootage

Number ofbedrooms

PVC

Subtypes

Iron

Concrete

Pipe Feature Class

Owners

Parcels

Ch02.p65 01/31/2001, 11:47 AM14

Page 19: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Geodatabases • 15

• Feature dataset. A collection of feature classes with thesame spatial reference. The feature classes in a featuredataset may be organized into networks or planartopologies. If you are familiar with ArcInfo, featuredatasets are analogous to coverages in that they arecollections of related feature classes; however, featuredatasets are less restrictive and more functional thancoverages. Feature datasets are vital when your GISmust model a system of spatially related features suchas facilities networks, roads, environmental layers (suchas soils, surface topography, and vegetation), censusgeography, and so on.

• Relationships. An association between two objects. Arelationship lets you work with features and relatedrows in tables as well as relationships between rows.Relationships are organized into relationship classes. Arelationship class defines a set of relationship instancesbetween two feature classes or object classes. Forexample, feature-based annotation can be modeledusing relationships. You can define what happens to theannotation if the feature is moved, deleted, or if itsattribute values change.

• Geometric networks. A user-defined collection offeature classes that form part of a connected networkof edges, junctions, and turns. You define the set offeature classes that participate in a geometric networkand the role for each feature class (for example, asedges or junctions), and organize these feature classesinto a feature dataset. For example, in a waternetwork, valves and meters play the role of junctions,while mains and service lines have roles as edges.

• Planar topologies. A user-defined collection of featureclasses that share geometry. A planar topology allowsyou to have one common set of lines to represent thegeometry of a number of feature classes. For example,feature classes, such as soil types, vegetation, terrain,and water, can share common polygon boundaries.Using topology editing tools, updating the geometry ofone feature class automatically updates all featureclasses in the planar topology sharing the boundary.Feature classes that participate in a planar topology areorganized into the same feature dataset.

ide1

geometryWater Mains

idh1

geometry

Service

diameter type15 concrete

e1

h1

h2

t1

Service Tapst2

t1t2

t1t2

id geometry

Ch02.p65 01/31/2001, 11:47 AM15

Page 20: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

16 • Understanding ArcSDE

• Domains. Define the valid values for attributes as arange or a set of values. Domains can be used tovalidate any attribute in the geodatabase.

• Validation rules. One or more constraints on theattribute values, topology, or placement of features toenforce the behavioral integrity of your features. Forexample, connectivity rules define constraints abouthow features are interconnected in networks.

2200 4 bedrooms

Squarefootage

Number ofbedrooms

The square footage canbe constrained to anumeric range of between100 and 100000.

The number ofbedrooms can berestricted to anattribute domain of 0,1, 2, 3, 4, 5, or 6.

A six-inch pipe can beconnected to a four-inch pipe only with aproper fitting.

Relationships betweenhouses and owners canbe restricted to twoowners per house.

Ch02.p65 01/31/2001, 11:47 AM16

Page 21: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Geodatabases • 17

Geodatabases can contain raster datasets, which dividespace into uniform cells or pixels. A raster dataset stores atwo-dimensional matrix with sampled values for each cell.Each cell has the same width and height. The location(geographic coordinate) of the upper-left corner of thegrid, together with the cell size and the number of rowsand columns, defines the spatial extent of the rasterdataset.

The cells in a raster dataset can depict a variety of datasuch as the reflectance of light for part of the spectrum ina satellite image, a color value for a photograph, athematic attribute such as vegetation type, a surface value,or elevation.

A raster dataset contains one or more layers called bands.For example, a color image has three bands (red, green,and blue), a digital elevation model (DEM) has one band(holding elevation values), and a multispectral image mayhave many bands.

Each raster band contains the actual cell values, as well askey properties, such as:

• Statistics (minimum, maximum, and mean cell values)

• Histogram of cell values

• Value attribute table (optional additional attributeinformation about various cell values)

• Default color map for raster display (optional)

Very large raster support

Raster datasets in geodatabases can be very large and coverlarge geographic areas with fine detail. The geodatabaseautomatically partitions very large raster datasets into tilesand can compress them for efficient access and storage.You can use this method to build very large raster datasetsin the geodatabase. When loading raster datasets, you canmerge smaller tiles into a mosaic covering the entire imageextent, thus creating a large seamless mosaic.

Since raster datasets can cover very large areas, you willoften want to work with a subset of the entire databaselayer when doing analysis. When working with large rasterdatasets, you can specify the visible extent of the raster tominimize retrieving unwanted data from the server. Fordisplay purposes, retrievals are automatically limited tojust the data that fits in the current map extent.

Resampled pyramids increase drawingperformance

You can build “pyramids” for a raster dataset in ageodatabase. A pyramid is a series of reduced resolutionrepresentations of the dataset. Each level is a resampledrepresentation of the raster at a coarser spatial resolution.Pyramids are used to improve the display performance ofrasters when you are not working with the pixelinformation at full resolution—for example, whenzoomed out on a map. Pyramids contain a number oflayers, each resampled at a more generalized level.

RASTER DATA IN A GEODATABASE

rows

columns

valueattribute

table

Value Count Landuse

2

1

3

4

8

12

6

6

Agriculture

Water

Residential

Industrial

raster dataset

width

height

cell

band C

band A

band B

Three levels of a pyramid. Each raster is resampled with alarger cell size than the cell size of the raster beneath it in thepyramid.

Ch02.p65 01/31/2001, 11:47 AM17

Page 22: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

18 • Understanding ArcSDE

When working with an image that has pyramids, ArcGISautomatically determines the most appropriate pyramidlevel to use each time the raster dataset is drawn. Forexample, drawing a very large extent uses the mostgeneralized layer in a pyramid, while the most detailedpyramid layer is drawn when you are zoomed in very close.

Image pyramids add some extra storage to a raster dataset,depending on the number of levels in your pyramid.Typical percentage increases are 8 percent. However, theimproved drawing performance is dramatic, particularlywith datasets larger than 100 megabytes.

Supported raster formats

All raster formats supported by ArcGIS can be used tocreate raster datasets in your ArcSDE geodatabase. Someof the raster types that can be imported to a geodatabaseinclude:

• Grids (including Grid stacks)

• TIFF

• ERDAS® IMAGINE® Images

• ERDAS .raw, .lan, and .gis files

• ER Mapper® images

• BIL/BIP/BSQ band interleaved and sequential files

• MrSID™ encoded images (not encoded in geodatabase)

• BMP

• JPEG

• GIF

• ADRG

• PNG

• CIB

• CADRG

• DTED Level 1 & 2

• NITF

Rasters can represent several kinds of gridded informationin a unified model:

• Scanned map sheets

• Multispectral imagery

• Digital elevation models

Ch02.p65 01/31/2001, 11:47 AM18

Page 23: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Geodatabases • 19

• Categorical grids (for example, land use grid)

• Continuous surfaces (for example, distance fromstreams, population concentrations)

Ch02.p65 01/31/2001, 11:47 AM19

Page 24: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

20 • Understanding ArcSDE

All kinds of spatial data can be managed in a geodatabase.Many spatial data types can be represented and managedwith geodatabases including the following:

• Locators. Addresses are among the most commondescriptions of locations and can identify places orfeatures on a map. Other types of alphanumericdescriptions of locations are also possible. Locatorsdefine processes for creating features that are describedby these alphanumeric descriptions of locations. Thegeodatabase can manage locators and the relationshipsbetween these alphanumeric descriptions and thefeatures that they describe.

• User-defined custom features. Geodatabase objects areextensible. Developers can add their own customfeatures when necessary using the Geodata Accessobjects in the COM-based development environmentnamed ArcObjects.

TINs are not stored in geodatabases at the 8.1 release, butTIN support is planned for a future release.

OTHER DATA IN A GEODATABASE

table with addresses

field with house numberand street name

109 Montezuma

111 Montezuma

115 Montezuma

121 Montezuma

115 Montezuma

121 Montezuma

111 Montezuma

109 Montezuma

utility pole

transformer

power lines

Ch02.p65 01/31/2001, 11:47 AM20

Page 25: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Geodatabases • 21

GIS has always been a technology with advanced datamodels to represent spatial systems. A key advantage ofgeodatabases is that they can be used to create integratedmodels, using objects and relationships, much moreeffectively than other GIS data models. Previously, muchof the system behavior and the relationships betweenentities in the spatial system had to be coded in your GISapplications. With geodatabases this behavior is part ofyour geodatabase design, so application deployment ismuch simpler and more efficient.

Modeling feature datasets

A significant task in designing a geodatabase involvesdefining the entities in the geodatabase and how they willbe represented as features, rasters, attributes, and so on. Inmany, if not most, GIS implementations, it is important tohave the ability to define spatial data as a system ofobjects and relationships. Indeed, part of the power ofGIS is the ability to model and represent the relationshipsamong these objects.

For example, a street network consists of connected streetsegments. “Main Street” could be modeled as a series ofconnected segments that make up the street sections alongeach block. Address ranges are associated with each streetsegment so that locations can be found along each streetsegment. Intersections define where streets connect andcan have special properties. They might have turnrestrictions or stoplights. They might be overpasses orunderpasses, and so on. In addition, streets can be relatedto other features such as blocks. The street segmentsdefine the boundary of the block they enclose. Groups ofblocks can be collected into districts such as census tracts,zoning classes, and other administrative units.

A sample geodatabase design might model this as a set offeature classes in one feature dataset:

• Streets

• Blocks

• Block groups

• Census tracts

All of these would participate in a common planartopology in the feature dataset.

In summary, the reasons to organize feature classes in afeature dataset are numerous, but three common reasonsare:

• Thematic representation. The set of feature classesrepresents the same phenomenon you wish to model.For example, you might have three feature classes forwater bodies in a feature dataset: one each for points,lines, and polygon feature representations.

• Geometric networks. The feature classes play roles asjunctions, edges, and turns in a geometric network, forexample, pipes, valves, pumps, and feeders in a waternetwork or streets, intersections, and turns in an urbanroad network.

• Planar topologies. Feature classes can share geometrywith other feature classes. When you update theboundary of one feature, you want the sharedboundaries of other features to be updated as well.

Long transactions and alternate versions

A key feature in any multiuser database is the ability tomanage concurrent access to the data. Multiuser read andwrite access is crucial. A DBMS provides this functionalityon tables. What the DBMS does not provide, however, isthe concept of a long transaction for GIS editing or forrepresenting “what if” scenarios. ArcSDE with ArcGISprovides a way to support these with versioning.

The primary role of versioning is to simplify the editingexperience. Many GIS edits require more than just a fewminutes’ time to complete, and some editing tasks requirehours, days, or even months to complete. Long transactionediting is supported by creating versions. Versioning letsusers simultaneously create multiple, persistentrepresentations of the database without making copies ofthe data. Multiple users can simultaneously edit the samefeatures or rows without explicitly applying locks toprohibit other users from modifying the same data.

WORKING WITH GEODATABASES

Ch02.p65 01/31/2001, 11:47 AM21

Page 26: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

22 • Understanding ArcSDE

At the end of an edit session, or when reconcilingdifferent versions, the edited features are merged into thetarget version of the geodatabase. When the same featurehas been edited in different versions, a conflict is detected.The conflict resolution dialog box in the ArcMap Editorhelps to resolve conflicts, and the affected features areshown on the map.

All versioning capabilities are accessed and used throughArcGIS Desktop. Through versioning, ArcInfo andArcEditor allow multiuser editing, long transactionsupport, and history management of ArcSDEgeodatabases. ArcView can connect to, view, and usedifferent versions of the database but cannot edit them.

Defaultversion

Proposed

Approved

Constructed

A common work flow process evolving through each stage of aproject.

This conflict resolution dialog box shows three feature classes withconflicts and a feature with each of its version’s attributes.

All organizations that use ArcSDE and maintain their datawith ArcInfo or ArcEditor will use versioning. Thegeodatabase and versioning provide organizations withadvanced data storage techniques that help to organizework flow in organizations where spatial data is used.Engineers can generate design alternatives using thegeodatabase. Spatial analysts can perform complex “whatif” scenarios without affecting the default or “as-built”representation in the database. And databaseadministrators can create historical “snapshots” of thegeodatabase for archival and database recovery.

A common task that uses versioning is geodatabasemaintenance. Most users work with and view the defaultversion of the geodatabase. Administrators and editorsmaintain the database through other versions, managingtheir edits with the default version when appropriate.

The feature in blue as it existed prior to editing (A), the featureafter being modified (B), and three representations during conflictresolution (C).

Ch02.p65 01/31/2001, 11:47 AM22

Page 27: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Geodatabases • 23

IMPLEMENTING GEODATABASES

To implement a multiuser geodatabase, you can useArcInfo or ArcEditor with ArcSDE. Once you decidewhat data you want to manage, you design thegeodatabase schema and implement it using ArcCatalog.The book Modeling Our World, included with ArcGIS, is thegeodatabase design guide. It explains in detail many of theconcepts introduced in this chapter and will help youmake key design decisions about your geodatabaseimplementation.

It is worth noting that others may have attempted thesame data modeling exercise. An industry-specific datamodel guide might be available from ESRI or anotherparty to help you with your specific database design goals.These guides provide a database “template” in which thefundamental objects and schema have been predefined.ESRI provides a number of these designs in applicationextensions such as ArcGIS Water and Facilities DataModel and the Parcel Data Model. For furtherinformation on these extensions, contact your ESRI salesrepresentative.

An excellent guide for implementing geodatabases, Buildinga Geodatabase, is available in the ArcGIS package.

Another very important aspect of building a geodatabaseis to fine-tune the DBMS implementation. The physicaldesign of tables and where you put them is critical foroptimum performance from your database. There is noperfect cookbook for how to tune a database, but someimportant guidelines are provided in the configuration andtuning guides for each supported DBMS. Please find aPDF file, config_tuning_guide_<your dbms>.pdf, in thedocumentation folder of your install location and theCD–ROM installation media.

Ch02.p65 02/09/2001, 10:46 AM23

Page 28: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Ch02.p65 01/31/2001, 11:47 AM24

Page 29: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

25

3 Datastorage

The previous chapter presented an overviewof the geodatabase data model. Thegeodatabase data model is built on afoundation of DBMS tables and data typesand on the ArcSDE simple feature datastorage mechanism. This chapter is targetedfor database administrators and applicationdevelopers and provides an overview of theArcSDE simple feature model and how data isstored.

In this chapter:

• Data storage with ArcSDE

• Organizing features

• Types of features

• Feature storage

• Geometry storage options

• Spatial indexing

• Relational access and object relationalaccess

• Raster data storage

Ch03.p65 02/01/2001, 9:20 AM25

Page 30: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

26 • Understanding ArcSDE

DATA STORAGE WITH ARCSDE

In the previous chapter, you learned about the ArcGISgeodatabase. The geodatabase is a data model built on afoundation of simple features. This chapter reviews thebasics of the ArcSDE simple feature model and how thedata is physically stored in the DBMS.

The first thing you should know is that data is neverstored in ArcSDE. Data is stored in a DBMS. ArcSDE isthe tool that allows you to put it there and to use it in GISapplications.

Secondly, all data is stored in standard DBMS tables usingdata types available for the host database. ArcSDE doesnot supersede or replace any existing DBMS functionality.Instead, it uses and complements the base DBMScapability by adding a spatial component to the database.A key part of using ArcSDE is tuning the host DBMS.ArcSDE performance hinges largely on how well the hostdatabase is tuned.

Key DBMS concepts

In a relational database management system model, data isstored in tables consisting of rows and columns. The celldefined by the intersection of a row and column is called afield; the data contained in the field is a value. A rowrepresents a particular occurrence, or instance, of afeature, while the columns contain the attributes of thefeature such as owner name for a parcel. Attributes canhave many types such as dates, text strings, or numbers. Ageometric shape of a feature is another type of value,stored in a column that defines an abstract geometric datatype.

SQL provides an interface to relational tables that allowsyou to select rows based on the values contained in thefields. An SQL statement can range from very simple tovery complex, allowing you to compose virtually any typeof query from basic column types.

primary key

foreign key

2 arterial or collector roads

1 divided highway

3 major roads

4 residential streets

code description

5 unpaved roads

fid geom shp_len type surface width lanes name

103 2321.8 3 asphalt 75.9 4 Caitlin County Road

101 4507.2 2 asphalt 85.3 4 Old Taos Highway

102 3401.1 1 concrete 45.1 2 Calle Mejia

104 689.2 5 gravel 35.2 2 Max Daniel Road

object identifiergeometrygeometry-tracking fieldcoded valuedescriptive stringcontinuous numeric valuediscrete numeric valuename

A query may return columns from any number of tables byjoining the tables together on key columns. A primary key(can be one or more columns) uniquely identifies rows in atable. The same column or columns, duplicated in anothertable, is called the foreign key. These keys allow tables tobe joined.

The result of a query is a set of rows meeting the criteriaestablished by the SQL statement. This set is called acursor. An application can reference a number of activecursors. The application steps through a cursor, looking ateach individual row. As each successive row is requested,the appropriate values of each field are made available tothe application.

ArcSDE extends SQL by providing tools to work withspatial data. You can also use standard SQL in theArcSDE software’s API to perform attribute-only queries.

Ch03.p65 01/31/2001, 1:29 PM26

Page 31: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Data storage • 27

Organizing geographic features

ArcSDE organizes features in feature classes. A featureclass is a collection of one or more features ofone geometric type and is synonymous with the older term“layer”, used with SDE 3.x. A feature is a geometricrepresentation of a spatial object (e.g., a road), defined asa sequence of one or more x,y coordinates and theattributes for that geometry. Features are stored so thatone row in a table equals one feature.

Users may typically think of a feature class as one singletable. However, ArcSDE implements a feature class asone or more tables, depending on the DBMS and columntype used for storing the geometry.

When you enable versioning on a feature class, twoadditional tables are added to the layer’s table schema.Geometry storage options are database dependent and arereviewed later in this chapter.

ArcSDE doesn’t change existing DBMSs or affect currentapplications. It simply adds a spatial column to tables andprovides tools (an API) for a client application, such asArcMap, to manage and access the geometry datareferenced by that column.

When you add a spatial column to a table (sometimesreferred to as a business table), you spatially enable it. TheArcSDE software manages spatially enabled tables bystoring information such as the name of a feature class, itsowner, x,y extent, type of geometry allowed in the layer,and many other pieces of information in ArcSDEmetatables. These ArcSDE metatables are stored in thehost DBMS and are created when ArcSDE is installed.They are owned, managed, and populated exclusively byArcSDE.

ORGANIZING FEATURES

Object

Attribute

Class

Row

Column, Field

Table

Database elementsLogical elements

Ch03.p65 01/31/2001, 1:30 PM27

Page 32: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

28 • Understanding ArcSDE

TYPES OF FEATURES

We’ve talked about features in a table. So what geometrytypes are supported with ArcSDE? The following graphicillustrates the feature geometries you may store in yourDBMS with ArcSDE.

Basic feature storage

ArcSDE stores geometric shapes as x,y coordinates andtrue curves. Points are recorded as a single x,y coordinate,lines as a series of ordered x,y coordinates and curves, andareas as sets of lines composed of x,y coordinates andcurves that have the same starting and ending point.

Every geometry type in ArcSDE has a set of strictverification rules that determine whether a geometry isgeometrically correct before it is stored. Verification rules

Single-part polylinePoint

Multipart polylineMultipoint

Single-part polygon

Multipart polygon

ArcSDE stores a list of x,y coordinates that define the locationand shape of each geographic feature.

•3,2

8,4

5,1 11,1

13,48,4

6,8

2,3

Point

Areachord height

from-point

to-point

1,1 5,1

7,511,7

Line

circular arc

12,6

radius

for each shape type are described in the ArcSDEDeveloper Help (in the documentation folder of yourArcSDE installation).

These simple features that ArcSDE stores in a DBMS arethe building blocks on which the ArcGIS geodatabase isbuilt.

Ch03.p65 01/31/2001, 1:30 PM28

Page 33: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Data storage • 29

Z values

ArcSDE allows you to add z values to the x,y coordinates.Z values can represent height or depth. Geometry may beeither two-dimensional (x,y) or three-dimensional (x,y,z).

Measures

Measures represent a distance, time, address, or some otherevent at given points along a feature. You can add measurevalues to any geometry type. Identifying an event by roadname and distance from a known location (e.g., Highway20, kilometer 38) is a common method for locatinghighway information such as sign or accident locations,exit ramps, pavement quality, and speed zones.

Measure values are independent of a geometry’scoordinate system. The x,y coordinate of a point could be(529482, 5109382) with a measure value of 248.Although many applications use measures to representincreasing linear distances along a line (see the graphicabove), measure values can arbitrarily increase, remainconstant, or decrease.

Like Z values, geometry can contain a measure value(x,y,m). You could also have four-dimensional geometrywith Z and M values stored with geometry (x,y,z,m).

ArcSDE annotation

Annotation is text that labels features for cartographicdisplay. It helps identify places and features. For example,a road map can have labels that identify the names of theroads, the distances between intersections, and so on.

Annotation is a feature attribute. ArcSDE storesannotation as a feature attribute to ensure a direct linkbetween the text and the feature it labels. Annotationproperties are stored in a single BLOB (binary) column aspart of the feature table, or they can be stored in one ormore related tables. See the ArcSDE Developer Help formore details on annotation.

Annotation is usually thought of as text attached to afeature or coordinates on a map. Maps often include othertext to label nongeographic map components such as keylegends, map titles, North arrows, and scale bars. This texthas no geographic coordinates and isn’t stored by ArcSDE.

ArcSDE annotation is not the same as ArcGISgeodatabase annotation. Please refer to Building aGeodatabase to create and maintain geodatabaseannotation. ArcGIS Desktop applications can viewArcSDE annotation but cannot edit it. If you need to edityour annotation with ArcEditor, for example, you willneed to convert your ArcSDE annotation to the ArcGISgeodatabase annotation format.

FEATURE STORAGE

Measures on a simple line shape mark traffic accidents on a highway.

2868 101 248

294

280460

1,020

26040 40

Z values, such as elevations or depths, can be stored in a feature’sgeometry. In this case, points on a mountain have Z valuescontaining their elevation, in addition to their x,y position.

3750 3752 3754 3756 3758

3751 3753 3755 3757 3759

Santa Anna Ave

The street name and the addresses are attached to the street andparcel features, respectively.

Ch03.p65 01/31/2001, 1:30 PM29

Page 34: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

30 • Understanding ArcSDE

CAD data

ArcSDE layers can also contain CAD entities, with the aidof ArcSDE CAD Client. When a CAD entity is stored in alayer, an ArcSDE feature representing the entity is alsostored. Only ArcSDE CAD Client can work with CADentities, but other ArcSDE client applications can use thecorresponding features. Refer to Using ArcSDE CADClient (usingcadclient.pdf in the documentation folder)for more information.

Coordinate reference

Each ArcSDE feature class contains coordinate referenceinformation for your data. The coordinate referenceincludes the coordinate system and the information neededto convert from real-world coordinates to internalArcSDE storage values. ArcSDE stores its coordinates aspositive integer values internally because they take lessroom to store in the database and speed calculations.

The position of spatial data is defined by its coordinatesystem, usually projected (planar) or geographic.

The projected coordinate system, usually measured inmeters or feet, defines locations on a two-dimensionalplane using two axes: the x-axis, representing east–west;and the y-axis, representing north–south. They intersect atthe origin (0,0). Locations are defined relative to theorigin.

Points above the x-axis or to the right of the y-axis havepositive values. Points below or to the left are negative.

(0,0)

(x=2, y=1)

x-axis

y-axis

Measures and z-coordinates are referenced independentlyof the x,y coordinate system, allowing you to assign tothem whatever values you wish.

The geographic coordinate system defines locations on aspheroid, a three-dimensional surface. When storinggeographic coordinates, longitude values correspond to x,while latitude values correspond to y.

Understanding Map Projections, one of the books in theArcGIS documentation set, is a crucial book for anyoneneeding an indepth understanding of coordinate reference.

Ch03.p65 01/31/2001, 1:30 PM30

Page 35: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Data storage • 31

ArcSDE manages the physical storage of geometry forfeatures using standard data types provided by the hostDBMS. Some DBMSs have spatial data types, while othersprovide standard binary or binary large object (BLOB)storage types.

ArcSDE geometry storage depends on the DBMS you use.The options for each DBMS are:

• ArcSDE compressed binary. This is stored as “longraw” in Oracle and as type “image” in SQL Server.

• Oracle Spatial normalized schema (relational model). Inthe normalized geometry schema, the coordinate valuesfor a geometry are stored as DBMS numeric data typesin a separate geometry table. Access to a geometry isthrough a foreign key—the Geometry ID, or GID. Onlyavailable if using Oracle, this data storage schema canresult in multiple rows of data for a single geometry,depending on how many x,y points define the geometry(for example, the coast of Norway might occupy manyrows). This implementation conforms to thenormalized geometry model defined by the OpenGISSimple Features Specification for SQL.

• Oracle Spatial geometry type. In this object-relationalmodel, Oracle 8i extends the database model to includean SDO_GEOMETRY object in the Oracle DBMS.

• Oracle LOB data. LOB data is stored as type BLOB andis supported primarily for Oracle Replication Services.

GEOMETRY STORAGE OPTIONS

Summary of the geometry storage and column type options available by DBMS.

*ST_GEOMETRY is a superclass of several subclasses (e.g., ST_polygon).

DBMS GEOMETRY STORAGE COLUMN TYPE

Oracle ArcSDE Compressed Binary Long Raw or LOB

LOB BLOB

Oracle Spatial—Normalized Schema Number

Oracle Spatial—Geometry Type SDO_Geometry

Microsoft SQL Server ArcSDE Compressed Binary Image

Informix Spatial DataBlade—Geometry Object ST_Geometry*

IBM DB2 Spatial Extender—Geometry Object ST_Geometry*

• Spatial types. A spatial type embeds support for GISfeature geometry into the DBMS kernel. Some DBMSsthat support spatial types comply with the OpenGISSQL specification for user-defined types (UDTs) andthe ISO SQL Multimedia Spatial Standard. Thesestandards define columns capable of storing spatialdata, such as the location of a landmark, a street, or aparcel of land. Use of these spatial types integratesgeometry and nonspatial attributes, providing a singlepoint of access inside the DBMS through an SQL API.Informix and IBM DB2 support spatial types.

ArcSDE client applications see the data as feature layers,regardless of the geometry storage type. In the case ofOracle, you have the option to choose the storage methodsfor any feature class. You may choose to store a point layeras Oracle Spatial geometry types and a polygon layer asArcSDE compressed binary. The decision on how to storeyour geometry should be based on the DBMS you use andthe requirements specific to your implementation.

Details on these geometry storage types and how you candefine the storage type before loading data can be found inthe respective configuration and tuning guides for eachDBMS. Please check in your documentation folder for aPDF file of the form config_tuning_guide_<yourdbms>.pdf.

Ch03.p65 01/31/2001, 1:30 PM31

Page 36: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

32 • Understanding ArcSDE

SPATIAL INDEXING

ArcSDE uses a continuous data model; it doesn’t tile orsplit your data. For example, you could store all theparcels for the United States in one continuous featureclass. Each parcel would be stored as a complete polygon,quickly retrieved by a single disk access.

To support the use of databases with millions of spatialrecords, ArcSDE spatially indexes features in each featureclass for rapid search and retrieval. ArcSDE builds aspatial index by applying a grid to the feature class. Itrecords features that fall within each grid cell in an indextable (the S table of the feature class schema). A featurethat falls in more than one cell is listed in each. Grid cellswith no data are not included in the table.

A layer of data may have up to three index grids ofdifferent resolutions, although in practice a single grid isusually sufficient.

Other spatial indexing methods

There is more than one way to create a spatial index. TheArcSDE spatial indexing does not apply to all databases or

The feature class is overlaid by grid cells to create the spatial index.

151413 16

BA

11109 12C

765 8

321 4

D

Index Grid 1

Index Grid 2

Feature 1

Feature 2 Feature 3

BC

1,2,3

Index 1

13

A

123

2

Index 2

13

567

1,3

39 1

10 1

13 1

1

geometry storage methods. Oracle Spatial and Informixuse other methods for spatial indexing. Please refer to theconfiguration and tuning guide for your database for moreinformation.

Spatial indexing is an advanced, but important, topic.Other performance variables notwithstanding, a poorlydefined spatial index can make data retrieval unacceptablyslow. The ArcSDE spatial indexing method and someguidelines on how to determine your spatial index (gridsize) are described in detail in the configuration and tuningguide for your database (config_tuning_guide_<yourdbms>.pdf) in the documentation folder of your softwareinstall location.

DBMS GEOMETRY STORAGE SPATIAL INDEXING METHOD

Oracle ArcSDE Compressed Binary ArcSDE grid

LOB

Oracle Spatial—Normalized Schema SDO

Oracle Spatial—Geometry Type RTREE

Microsoft SQL Server ArcSDE Compressed Binary

Informix Spatial DataBlade—Geometry Object

IBM DB2 Spatial Extender—Geometry Object

ArcSDE grid

ArcSDE grid

RTREE

ArcSDE grid

Summary of the geometry storage and spatial indexing methods available by DBMS.

Ch03.p65 01/31/2001, 1:30 PM32

Page 37: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Data storage • 33

RELATIONAL ACCESS AND OBJECT RELATIONAL ACCESS

There is a great deal of metadata that must be maintainedabout spatial data in a DBMS. ArcSDE and the ArcGISgeodatabase have a set of metatables for managing thisspatial data. However, these metatables should never bemanaged or edited directly. Only ArcSDE populates andmanages the ArcSDE tables, and only ArcGIS Desktopmanages the geodatabase tables. End users never need tobe aware that these tables exist. More information aboutthese tables may be found in the ArcSDE Developer Helpand is provided for database administrators (DBAs).

Relational view and object relational view

You might logically think of the ArcSDE and ArcGISgeodatabase system tables as one set of metatables.However, there is an important distinction, based on thetype of access an application has to the data. Someapplications have relational access to data in ageodatabase, while others have object relational access.Relational access is access to the simple features ofArcSDE. Object relational access is access to the simplefeatures plus the intelligence for the features stored in thegeodatabase metatables.

Geodatabase

ArcSDE Metadata Tables

Simple Feature Layers

Simple FeaturesRelational Data Model

Geodatabase Metadata Tables

Intelligent FeaturesObject-Relational Data Model

ArcGISArcMapArcCatalog

Other GIS ApplicationsArcIMSArcView GIS 3.xMapObjectsArcSDE CAD ClientArcInfo WorkstationCustom Applications

Relational access and object relational access depend on whether theclient application has access to the geodatabase metatables.

The geodatabase metatables are accessible and used only byapplications with object relational access—the ArcGISDesktop products. This means that applications likeArcView GIS 3.x, MapObjects 2.x, ArcInfo 8 Workstation(e.g., ArcPlot™), ArcSDE CAD Client, and third partyapplications built with the C or Java APIs cannot takeadvantage of the data stored in those geodatabasemetatables. However, these applications do have access tothe underlying simple features.

It is also important to note the ArcGIS family of productscan use the simple features without having to populate anyof the geodatabase metatables first. This use is limited tobasic display and query functionality.

Ch03.p65 01/31/2001, 1:30 PM33

Page 38: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

34 • Understanding ArcSDE

Example schema of a single feature class for geometry. The color scheme indicates which tables are present for different types of geometrystorage. The “f” table contains the geometry (the actual x,y values) of features. The “s” table is the spatial index table for Microsoft SQLServer, Oracle with LOB, and ArcSDE compressed binary storage. Oracle Spatial-, Informix-, and DB2-based feature classes do not have the“f” or the “s” table. All multiversioned feature classes (layers) will have an “a” table for data additions and a “d” table for all deletions. The“60” in the table names is the internal layer ID, and the “99” is the internal registration ID.

transformersnt

objectidshapedscktlabeltagtype_subtype_anglesymbol

f60

fidnumofptsentityeminxeminyemaxxemaxyeminzemaxzmin_measuremax_measurearealenpoints

s60

sp_fidgxgyeminxeminyemaxxemaxy

a99

objectidshapedscktlabeltagtype_subtype_anglesymbolsde_state_id

d99

sde_state_idsde_deletes_row_iddeleted_at

Tables present for ArcSDE compressed binary and (Oracle) LOB geometry storage.

Additional tables present only in a multiversioned feature class (no matter what the geometry storage is).

The business table. Always present.

Example feature class (layer) named "transformersnt"

Ch03.p65 01/31/2001, 1:30 PM34

Page 39: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Data storage • 35

RASTER DATA STORAGE

Raster data represents a significant portion of the totaldata used in a GIS. ArcSDE provides support for rasters ina number of different formats.

ArcSDE handles raster data very much like vector data.When a business table is created with a column of rastertype, ArcSDE will reference this image column as animage (raster) dataset. Image datasets can have multipleimages, but georeferenced images cannot be combined in asingle image layer with nongeoreferenced images.Information about the raster column is maintained in oneof the ArcSDE system tables called raster_columns.

Here’s a brief description of the tables in raster layerschema.

For each raster type column in a business table, ArcSDEwill automatically create four additional tables. They are:

1. Metadata table for raster (SDE_RAS_<id#>)

2. Metadata table for raster band (SDE_BND_<id#>)

3. Auxiliary table for raster band (SDE_AUX_<id#>)

4. Block table (SDE_BLK_<id#>)

The first two metadata tables are used to storeinformation about a raster and a raster band such as theimage dimensions and the pixel depth.

The auxiliary table is used to save additional informationabout a raster band such as a colormap and raster statistics.The block table is where the actual pixel blocks are stored.

The best way to put raster data into your DBMS is withthe ArcCatalog Raster to Geodatabase Wizard.

city_photo

nameimage

SDE_aux_6

rasterband_idtypeobject

SDE_bnd_6

rasterband_idsequence_nbrraster_idnameband_flagsband_widthband_heightbahd_typesblock_widthblock_heightblock_origin_xblock_origin_y

SDE_ras_6

raster_idraster_flagsdescription

SDE_blk_6

rasterband_idrrd_factorrow_nbrcol_nbrblock_data

The 6 at the end of a table name is the internal registration ID number.

Tables that define an ArcSDE raster layer

Ch03.p65 01/31/2001, 1:30 PM35

Page 40: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Ch03.p65 01/31/2001, 1:30 PM36

Page 41: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

37

4 The ArcSDEarchitecture

ArcSDE provides a means to deliver datafrom a DBMS to GIS applications. It has aparticular architecture with configurationoptions, which are important for databaseadministrators and application developers toknow.

In this chapter:

• What is an application server?

• Direct connections

• Connecting with a direct connect driver

• Licensing

Ch04.p65 02/09/2001, 11:14 AM37

Page 42: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

38 • Understanding ArcSDE

Architecturally speaking, there are two basicconfigurations you can use with ArcSDE implementations.You may choose a three-tier architecture, which uses anapplication server; a two-tier architecture, which useswhat are called direct connect drivers; or a combinationof the two.

The application server

ArcSDE is built with client/server technology—a clientapplication sends requests to the server. In turn, the serverreceives the request, generates results, and delivers them tothe client.

The ArcSDE server disseminates spatial data based onhighly efficient spatial search functions, providesgeometric data validation, and works withinheterogeneous hardware and network environments. Datacan be delivered to any client from any server anywhere ona network.

In a typical configuration, an ArcSDE application serverresides with your relational database on a server platform.The ArcSDE application server performs spatial searchesand sends data that meets the search criteria to the client.For example, a common query handled by the ArcSDEapplication server is to retrieve all the features in aparticular map extent to be drawn in the display window.

ArcSDE sends data to the client using “data buffering”.Buffering is the process of collecting large chunks of dataand sending it all to the client application, rather thansending one record at a time. Processing and buffering dataon the server is much more efficient than sending all ofthe data across the network and having the clientdetermine which data to send to the end-user application.This becomes critical when applications are simultaneouslyusing thousands of records in the database.

ArcSDE uses cooperative processing, which means thatdata processing occurs on both the client applicationmachine and the server, depending on which is faster.Some functions require no communication with the

WHAT IS AN APPLICATION SERVER?

server. CPU-intensive tasks such as polygon overlay andclipping are best performed by the client application toavoid excessive demands on both the server and theavailable bandwidth.

The computer network connects many clients to theserver. The network must support TCP/IP. It can be alow-speed wide area network (WAN) or a fast local areanetwork (LAN). Network file system mounts are notrequired for data transfer between the server and theclient. This is an important performance andadministrative benefit.

The ArcSDE server handles simultaneous requests from multipleusers to update and retrieve information in a geodatabase.

Request

RDBMS

Clientapplication

Results

DBMS

ArcSDEapplication

server

Ch04.p65 01/30/2001, 3:12 PM38

Page 43: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

The ArcSDE architecture • 39

The application service connection process

Geodatabase security is managed via the DBMS.Therefore, accessing data requires a “connection” to thehost DBMS. A user must enter connection informationincluding a username and password. This connectioninformation, passed on to the ArcSDE server, is used tolog in to the DBMS. If the login connection is successful,the user can then begin working with the geodatabase.

The graphic below illustrates the basic connection process.The giomgr process is the “service” that a user connects to.Creating and managing services is described in ManagingArcSDE Services. Typically, the ArcSDE service runs onthe same machine as the DBMS server. The gsrvr processalways runs on the same machine as the giomgr process.Each connection request starts a gsrvr process. Each gsrvrprocess will use a DBMS connection.

The connection wizard in ArcView GIS shows a user named“avtest” connecting to a service named “sde4_ora” on a servermachine named “rhiannon”. The database input field is forconnecting to specific DBMSs that require a database name(e.g., Microsoft SQL Server).

Network

DBMS

ArcSDE (giomgr process)

1. Connection requested.

Application

ArcSDE Client Libs

ArcSDE Server (gsrvr

process)

3. Client works with DBMS via gsrvr process.

2. Server process spawned.

Ch04.p65 01/30/2001, 3:12 PM39

Page 44: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

40 • Understanding ArcSDE

DIRECT CONNECTIONS

Prior to the 8.1 release, ArcSDE only had one basicarchitecture: a three-tiered one. The three tiers consistedof a client, the ArcSDE application server, and the hostDBMS. The client applications had to connect to theArcSDE application server, which then connected to thehost DBMS. With 8.1, ArcSDE can also be used withoutthe application server. Essentially, there is a two-tierarchitecture. The two-tier and three-tier systems aredesigned to work independently, or together, giving theDBA flexibility in system design. When using the two-tierdirect connection architecture, you will use what arecalled “direct connect drivers”.

Using the two-tier architecture, an application connectsdirectly to the database, without using the ArcSDEapplication server. The ArcSDE client and serverfunctionality are executed on the same machine as theapplication—there is no separate ArcSDE server processrunning anywhere.

The direct connection configuration is often easier toinstall and administer. There is no need for installing andadministering the ArcSDE application server. Thisconfiguration allows for increased scalability because itoff-loads work from the server to each connected client.

The two-tier architecture provides additional flexibility inconfiguring systems:

• The direct connect database driver doesn’t require theadministration of the ArcSDE server process. There is nointermediate giomgr process to set up/configure or startup. Setting up a single-user database using Personal Oracleor the Microsoft Database Engine (MSDE), for example,is easier.

• The direct connect database driver provides additionaloptions for scaling a system. The direct connectarchitecture moves the ArcSDE server functionality to thedesktop. This removes the ArcSDE load from the databaseserver and will allow additional resources to be freed upfor the DBMS, which means you get better scalability onthe database server.

• The direct connection configuration can be very useful in“hot-failover” environments. For example, it’s easier toconfigure ArcSDE with Oracle Parallel Server with thedirect connect driver.

Are there any reasons why you wouldn’t want to usethe two-tier direct connect architecture?

The following reasons might apply:

• Increased network traffic. This can happen if the spatialfilter selectivity is low—for example, finding a very smallnumber of features adjacent to a long sinuous feature thatcrosses a large area. Increased network traffic can result inpoorer overall performance, but the severity of thedegradation depends on the bandwidth of your network.

• You do not want the administrative overhead ofnetworking software (e.g., Net8 for Oracle).

• If you are building a thin client, executing the ArcSDEserver process on the client machine may not be desirable.

• If you have a low-end desktop computer with limitedmemory and/or chip speed, you may need to use theapplication server to move that server functionality off ofyour client.

The application server configuration offers manyperformance advantages and is generally faster in a mixedUNIX®/Windows® network because of the intelligentArcSDE client/server architecture.

Regardless of whether you configure your system with theapplication server, direct connect drivers, or a mixture ofthe two, the same client functionality is available to any8.1 client application including those built with theC API. All ESRI client products are delivered with directconnect drivers.

Using the direct connect drivers requires some setupbefore users can begin connecting. The same ArcSDE user,ArcSDE system tables, and geodatabase system tables usedby the application server configuration must also exist fordirect connection configurations. Your administrator mustset these up prior to any ArcSDE connections. If you areusing Oracle, you must also have the Net8 Client installedon your client machine. Please read the ArcSDEinstallation guide closely for setup information as well assupported databases and hardware operating systems.Please refer to Oracle documentation for Net8 installationand configuration.

Ch04.p65 01/30/2001, 3:12 PM40

Page 45: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

The ArcSDE architecture • 41

CONNECTING WITH A DIRECT CONNECT DRIVER

Client applications specify whether they are connecting tothe direct connect driver or the application server via theconnection syntax. For example, the service value is

sde:oracle

for the Oracle driver; no server name is required. In thecase of Oracle, you’ll also have to provide the Net8service name.

Below is a graphic illustrating the two-tier architecture.The gsrvr functionality is on the client in the form of adynamically linked library. The connection is still via aDBMS account, and DBMS security is still used. Onceconnected, the client works directly with the DBMSwithout an intermediate application server process.

Network

Application

1. Client issues connect request.

ArcSDE Client

2. Once connected,client works directlywith the DBMS.

Network

RDBMS

NET8

Application

ArcSDE Client

Oracle case SQL Server case

SQL Server DBMS

OracleDBMS

Here’s an example from ArcGIS for an Oracle direct connection.The service value must be sde:oracle, and the Net8 service name isadded to the password. The server field can be left blank.

Ch04.p65 02/02/2001, 7:44 AM41

Page 46: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

42 • Understanding ArcSDE

LICENSING

ArcSDE is a licensed product. Your administrator willneed to install a license manager and get a keycode forArcSDE to work. A license is required for both theapplication server and the direct connect driver. However,in the case of the direct connect driver, if no license isfound, the application is granted a read-only connectionno matter what functionality the application provides.Please refer to the LicenseManagerGuide.htm file found inyour documentation folder for more information on alllicensing.

This illustration is of a three-tier architecture. The application server starts when a license is found. The ArcSDE license is an “enabling”license. This means that once licensed, any number of application servers and/or user connections can be made. The license manager does notcount them.

Network

DBMS

ArcSDE (giomgr process)

1. Connection requested.

Application

ArcSDE Client Libs

ArcSDE Server (gsrvr

process)

3. Client works with DBMS via gsrvr process.

ESRI License Manager

Giomgr process starts if ArcSDEServer feature exists.

2. Server process spawned.

Ch04.p65 01/30/2001, 3:13 PM42

Page 47: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

The ArcSDE architecture • 43

This illustration is of a two-tier architecture. The client connection looks for an ArcSDE server license. If it doesn’t find one, the connectionis read-only no matter what editing functionality the application may provide or what the underlying DBMS permissions may be.

Network

DBMS

Application

1. Client issues connect request.2. Gsrvr DLL checks for ArcSDEServer feature. If feature is found, connect is read/write. If feature is not found, connect is read-only.

ArcSDEClient Libs and gsrvrfunctionality

ESRI License Manager

3. Once connected, client works directly with DBMS data.

Ch04.p65 01/30/2001, 3:13 PM43

Page 48: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Ch04.p65 01/30/2001, 3:13 PM44

Page 49: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

45

5 ArcSDE forCoverages

All discussion of ArcSDE to this point has beenabout data in a DBMS. What if you do nothave a DBMS? Does this mean you cannotuse ArcSDE technology? This chapterintroduces you to ArcSDE for Coverages andhow it can be used to serve coverages,shapefiles, ArcInfo LIBRARIAN™ layers, andArcStorm™ layers to your client applications.

Ch05.p65 02/01/2001, 9:45 AM45

Page 50: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

46 • Understanding ArcSDE

While ArcSDE provides the gateway to numerouscommercial relational DBMSs, another available ArcSDEapplication server serves file-based spatial datasets. Thisread-only server, called ArcSDE for Coverages, serves thefollowing file-based vector datasets:

• ArcInfo coverages

• ESRI shapefiles

• ArcInfo LIBRARIAN layers

• ArcStorm layers

Many sites have file-based data on UNIX file servers anduse Windows client applications. Mounting disks on eachWindows machine is administrative overhead, andperformance may be poor. ArcSDE for Coverages allowsnetwork file system (NFS)-less access of the UNIX fileserver data, and it is often significantly faster than NFSaccess.

ArcSDE for Coverages is crucial to providing access tofile-based spatial datasets for all ArcSDE clientapplications. MapObjects and ArcIMS can only accessArcInfo LIBRARIAN and ArcStorm data via ArcSDE forCoverages. In addition, ArcIMS depends on ArcSDE forCoverages to provide access to ArcInfo coverage data.

ArcSDE for Coverages can also be part of your migrationstrategy from file-based data sources to geodatabases. Themost direct way to put ArcInfo LIBRARIAN andArcStorm layers into feature datasets of the geodatabase isby using the ArcSDE for Coverages server. An ArcSDEfor Coverages layer can be directly loaded into ageodatabase using ArcCatalog. Alternatively, you can alsouse the ArcSDE command cov2sde to put ArcInfoLIBRARIAN or ArcStorm data into standalone featureclasses in the geodatabase. However, further work isrequired to migrate these standalone feature classes into afeature dataset. Manually creating an intermediatecoverage from an ArcInfo LIBRARIAN or ArcStorm layerand then loading that coverage into the geodatabase maytake considerable time and disk space.

Customized applications built for ArcSDE for Coveragescan still be used if you migrate your data to a DBMSversion of ArcSDE, although attribute queries will needto be rewritten in SQL for your DBMS.

How does ArcSDE for Coverages work?

Your data is not copied, loaded, or otherwise movedanywhere. When your ArcSDE for Coverages server isrunning, there is a utility provided to “register” data withthe ArcSDE server. Essentially, you tell the server wherethe data is, provide a layer name, and set a few properties.At that point, the data can be served to a clientapplication. You can also set up relates to attribute data ina DBMS.

In the case of data split by tiles (ArcInfo LIBRARIANand ArcStorm line and polygon data), the data is “sewntogether” on the server if there is a unique ID for eachfeature. Once a whole feature is assembled, it is sent to theclient.

Data transfer is the same as with the DBMS version ofArcSDE. Data is delivered to clients via TCP/IP. Thismeans you need to define a service with a specific nameand TCP/IP port number in your services file.

ArcSDE for Coverages is unlicensed and provided free ofcharge with each ArcGIS and ArcIMS release. This makesit an inexpensive way to begin working with ArcSDEtechnology.

For more information about setting up an ArcSDE forCoverages server, refer to the book ArcSDE for CoveragesAdministration Guide, now in PDF format(arcsde_cov_admin_guide.pdf), located in thedocumentation folder of the ArcSDE 8.1 for CoveragesCD.

INTRODUCING ARCSDE FOR COVERAGES

Ch05.p65 01/31/2001, 12:15 PM46

Page 51: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

ArcSDE for Coverages • 47

ARCSDE FOR COVERAGES

CAD Client

ArcSDE for Coverages Custom Applications

Coverages Map Libraries ArcStorm Shapefiles

Read-only access to file-based vector data

®®ArcSDE

ArcSDE for Coverages acts as a read-only TCP/IP gateway to your file-based data.

Ch05.p65 01/31/2001, 12:15 PM47

Page 52: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Ch05.p65 01/31/2001, 12:15 PM48

Page 53: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

49

6 Where to gonext

Now that you’ve read about ArcSDE, what’syour next step? Many different kinds ofpeople use ArcSDE. This chapter discusses thevarious types of work you can do with ArcSDEand what documents you should consult formore information. Four types of peopleinteract with ArcSDE, each with a differentrole: database administrators, GISadministrators, application developers, andend users.

In this chapter:

• Administrators

• Developers

• End users

• ArcSDE resources

Ch06.p65 02/01/2001, 9:47 AM49

Page 54: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

50 • Understanding ArcSDE

ADMINISTRATORS

To implement a multiuser GIS, two key roles must befilled: the database administrator and the GISadministrator. Sometimes these are the same person;sometimes multiple people are involved.

The database administrator

The database administrator is responsible for managing thedata being served by ArcSDE. When using the ArcSDEapplication server, the DBA also manages that server andits interface to an organization’s relational database. Thegoal of Managing ArcSDE Services, along with the ArcSDEinstallation guide (Install.htm link) and ArcSDEconfiguration and tuning guide for <your DBMS>(config_tuning_guide_<your dbms>.pdf), is to helpdatabase administrators perform a number of key tasksand procedures including:

• Installing the ArcSDE application server

• Configuring the ArcSDE application server for thenetwork

• Starting, stopping, and monitoring ArcSDE serverprocesses

• Tuning the relational database and optimizing ArcSDEperformance on the network

• Setting up ArcSDE connections and user access to thedatabase

The ArcSDE application server is often installed on largemultiuser computer networks. Managing an ArcGISsystem installation is another task for databaseadministrators and requires a good understanding of thekey parts of the system. The DBMS and data are locatedon a UNIX or Windows NT® server. The ArcSDEapplication server is also typically located with yourrelational database, while the ESRI client applications aredistributed on many machines across your network. All ofthe parts of the ArcGIS software system use a licensemanager to control access to its various applications. Toeffectively manage this system, you should refer to theArcGIS Desktop install guide, the ArcInfo Workstationinstall guide (Install.htm link), and theLicenseManagerGuide.htm on the ArcInfo CD.

The GIS administrator

The GIS administrator is responsible for designing andimplementing an organization’s geodatabase. The GIS

administrator models a spatial system of features, surfaces,images, and other geographic information to design ageodatabase that supports the work of the organization.This is a key role for a successful multiuser GIS.

It’s important to understand the spatial system to bemodeled—what its objects are and the relationshipsbetween the various objects. For example, designing ageodatabase for land records requires an understanding ofthe relationships between parcels, surveys, ownership, andimportant administrative units such as zoning andeasements. It also requires a complete understanding ofgeodatabase concepts and the best practices and methodsfor GIS database design.

The GIS administrator must be knowledgeable aboutgeodatabase structures and how to use them to represent areal-world system. The GIS administrator must alsounderstand how to apply computer tools, such as UMLmodels and the ArcGIS system, to effectively implement ageodatabase design.

Two key books are included in the ArcGIS 8 package tohelp you accomplish these tasks:

• Modeling Our World—The ESRI Guide to GeodatabaseDesign introduces you to geodatabases and theircontents. It can help you make decisions about the beststrategies to employ in your geodatabase design. Itdescribes in detail the objects and various parts of ageodatabase. Modeling Our World will help you with thedesign process and the key decisions you’ll need tomake along the way.

• Building a Geodatabase is the GIS administrator’s guideto implementing a specific geodatabase design. Onceyou have completed your physical database design, thisbook contains all the necessary guidance to implementyour geodatabase schema. It provides information onusing ArcCatalog for these tasks and for using UML.UML is an excellent tool for object modeling anddesign. It is very useful in implementing an integrateddesign for an entire business database including thegeodatabase components.

If you haven’t done so already, you might also want toread Getting Started with ArcGIS. It gets you started usingthe software immediately and refers to further ArcGISdocumentation. Getting Started with ArcGIS contains anoverview of the ArcGIS software system and has a seriesof exercises that lead you through a small GIS project.

Ch06.p65 01/31/2001, 1:44 PM50

Page 55: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Where to go next • 51

Application developers have a number of opportunities towork with geodatabases. In the ArcGIS system, you canbuild custom applications or simply adjust the look andfeel of existing applications with Visual Basic® forApplications (VBA) within the ArcMap and ArcCatalogapplications. ArcInfo 8 and ArcView 8.1 also ship withArcObjects—the complete set of COM-based componentsfor the ArcInfo and ArcView 8.1 software. The ArcInfosuperset of COM objects contains hundreds of COMclasses with thousands of methods. Exploring ArcObjects isyour guide to begin to work with ArcObjects.

Other ESRI software such as ArcView GIS 3 andMapObjects 2 can use the ArcSDE application serverdirectly. In these systems, you can create customapplications that access geodatabases through ArcSDE.Each software provides its own ArcSDE programmer’sinterface that you can take advantage of as a developer.The ArcView GIS 3 object-oriented programminglanguage, Avenue, can access ArcSDE functionality inaddition to customizing the look of ArcView GIS 3. Thesubsystem that accesses and works with the ArcSDEapplication server is the Database Access extension. Referto the book Using Avenue in the ArcView GIS package foradditional guidance.

You can also develop applications with MapObjects usingVB, Visual C++®, and other COM-based developer tools.A part of the MapObjects 2 developer componentsdescribes building applications that access and work withArcSDE. Two MapObjects user guides have moreinformation on building MapObjects applications that usethe ArcSDE application server: Developing Applicationswith MapObjects and MapObjects Programmer’s Reference.

With the ArcSDE CAD Client extension, you can workwith true CAD entities in a geodatabase. The ArcSDECAD Client extension has an extensive C language APIthat has complete access to all ArcSDE functionality. Formore information, see Using ArcSDE CAD Client,

DEVELOPERS

included as a PDF file (usingcadclient.pdf) in thedocumentation folder on the ArcSDE 8.1 Client CD.

The ArcSDE application server provides an open clientinterface to work with the contents of geodatabases assimple features. The ArcSDE simple feature API allowsnon-ESRI software applications to access and work withgeodatabases. The ArcSDE client API is available in bothC and Java. Refer to the ArcSDE Developer Help systemlocated in the documentation folder on the ArcSDE CD.

Ch06.p65 02/01/2001, 9:52 AM51

Page 56: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

52 • Understanding ArcSDE

END USERS

Typically, end users are those using a client applicationsuch as ArcMap. Most end users do not know or even needto know they’re using ArcSDE to access data in a DBMS.Working with a multiuser geodatabase is just like workingwith any other geographic data—use ArcCatalog toexplore and work with data holdings and use ArcMap tomap, edit, and analyze data from the geodatabase.

If you haven’t done so already, you might want to readGetting Started with ArcGIS. It gets you started using thesoftware immediately and refers to further ArcGISdocumentation. Getting Started with ArcGIS contains anoverview of the ArcGIS software system and has a seriesof exercises that lead you through a small GIS project.

To learn more about using shared geodatabases, you shouldrefer to Using ArcCatalog and Using ArcMap in the ArcInfouser documentation set.

Ch06.p65 01/31/2001, 1:44 PM52

Page 57: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Where to go next • 53

ARCSDE RESOURCES

This book is designed to provide an introduction toArcSDE and a brief explanation of its roles and benefits.For more detailed information about ArcSDE, you areencouraged to explore the additional resources available.These are listed and described below.

ArcSDE 8

ArcSDE installation guide: An HTML file that containsdetailed installation instructions. The file is calledInstall.htm and is located in the documentation directoryof the ArcSDE CD.

Managing ArcSDE Services: Available as a printed book.

ArcSDE configuration and tuning guide for <yourDBMS>: This is one of the DBMS-specific PDF files(config_tuning_guide_<your dbms>.pdf) in thedocumentation folder on the ArcSDE CD.

ArcSDE Developer Help: Contains developer informationon C and Java and command references for ArcSDEadministration commands, located in the documentationfolder on the ArcSDE CD.

ArcSDE CAD Client 2

Using ArcSDE CAD Client: Available as a PDF file(usingcadclient.pdf) in the documentation folder on theArcSDE 8.1 Client CD.

Ch06.p65 02/01/2001, 9:56 AM53

Page 58: Understanding ArcSDE - CIESIN€¦ · 2 • Understanding ArcSDE Welcome to ArcSDE, the GIS gateway to your DBMS. ArcSDE is the tool that allows you to store and manage spatial data

Ch06.p65 01/31/2001, 1:44 PM54