3.1.1.1 Common Terms

The following terms are common amongst all protocol operations.

Session: An entity that gives context to operations working against application data. A session is associated with one or more result sets, which can be modified by state changing operations.

Request: An entity that represents a running request on the protocol server.

Named Query: An entity stored in the database application representing a CT_Query element, as specified in [MS-AXL2] section 2.2.3.18. The Name attribute of the element MUST be specified.

Source: A table or a Named Query in the database application. One or more Sources MUST be referenced in a CT_Query element.

Updatable Source: The Source in a database application against which insert, update, and delete data operations are applied.

  • If a Source is a table, it is an Updatable Source.

  • For a Named Query based on a single Source, that query is updatable, as long as the Source is updatable, and the query includes the primary key of the Source.

  • For queries with more than one Source to be updatable, the Sources in the query MUST be connected by joins. Each join is specified by a CT_Join element, as specified in [MS-AXL2] section 2.2.3.10. For the join, call the Source specified in the Left attribute SL, the Source specified in the Right attribute SR, the property specified in the LeftProperty attribute PL, the property specified in the RightProperty attribute PR, and the join type specified in the Type attribute T. For the query to be updatable, a property MUST be part of exactly one CT_Join element.

    If a graph is defined by considering each Source as a node, and each CT_Join as an edge between its Sources SL and SR, then the graph:

  • MUST be fully connected.

  • MUST be acyclic.

  • MUST NOT have more than one edge between two given nodes.

    For each CT_Join, SL is updatable in relation to SR if all of the following conditions hold:

    • T is "Inner" or "Left Outer."

    • PR is a primary key field.

    • PL is not a primary key field.

    SR is updatable in relation to SL if all of the following conditions hold:

    • T is "Inner" or "Right Outer."

    • PL is a primary key field.

    • PR is not a primary key field.

    Otherwise, SR is not updatable in relation to SL and SL is not updatable in relation to SR.

    The query is updatable, if there exists a Source that is updatable in relation to all of the Sources that it is connected to in the graph for the query. Because the graph is fully connected and acyclic, there is exactly one of these Sources. Only the fields (2) from this Source are updatable.

Result Set: A set of rows that results from running a query specified by a Source. Rows SHOULD satisfy the filter and restriction criteria which are input elements in OpenResultSet (section 3.1.4.9.2.1), and SHOULD be sorted according to the sortExpression which is an input element in OpenResultSet (section 3.1.4.9.2.1).

A protocol client requests a subset of the rows in a result set by specifying a starting index and a maximum row count to return. The row indices are consecutive integer values starting at zero and ending at one less than the total number of rows, or maximum row count, whichever is smaller