ArcSDE implements a simple model for data access. The model is built around the
standard cursor model defined in the Structured Query Language (SQL). The data
access model builds on the traditional model by supporting spatial constraints
in a query. A database connection is a connection to a source of geographic data
stored in a database. It
represents the ArcSDE server, which can respond to requests for geographic
information.
A query defines a specific set of features that you wish to retrieve from the
database connection. When you apply a query to a database connection, you define
a collection of geographic features that meet the criteria defined by the query.
Queries can be quite simple, involving only an attribute value comparison, or
they can be complex, involving multiple tables connected by primary/foreign key
relationships with both attribute and spatial components.
The result of a query is a cursor, which provides a mechanism for iterating over
a collection of geographic features. The cursor has an associated state, which
represents the current feature in the collection. Functions are provided on the
cursor to step through each individual feature in the collection. The cursor
object is also responsible for returning the values defined for the current
feature.
The cursor returns values, which represent the state of an element in the result
set. Result set elements can have values of several different kinds: simple types,
such as numbers and strings, or complex types, such as a geometric shape.
In ArcSDE, the query and resulting cursor are implemented as a stream. A stream
is a container that associates the query with the cursor, and is referenced by a
unique stream handle. The stream also contains the buffering and data
transmission properties for transmitting the results of a query between the server
and the client application.
|