The 5800 system query integrity model – Sun Microsystems Sun StorageTek 5800 User Manual
Page 21
Query expressions can use much of the power of Structured Query Language (SQL). Each query
expression combines SQL functions and operators, field names from the metadata schema, and
literal values. There are no query expressions that select objects based on the data stored in the
object itself; all queries apply only to the metadata fields associated with the object. Only
queryable fields can be used in query expressions. For an object to show up in a query result set,
the object must have a value for each of the fields mentioned in the query; in other words, there
is an implicit INNER JOIN between the fields in the query.
A query may optionally specify that the result set should include not just the OID of each
matching object, but also the values from a set of selected fields of each matched object . The
value retrieved by Query With Select for some field may be a canonical equivalent of the value
originally stored in that field. For example, values in numeric fields may have been converted to
standard numeric format. Trailing spaces at the end of string fields will have been truncated
(The value that is returned will be some value that would match the original data as stored, in
the SQL sense.) To be included in the result set, an object must include values for all queried
fields and all selected fields. In other words, there is an implicit INNER JOIN between all the
fields in the query and in the select list.
There are significant limitations on which queries may be executed efficiently, or at all. See
Chapter 4, “Sun StorageTek 5800 System Query Language,”
and
Considerations and Best Practices”
s for details of these limitations.
There are no ordering guarantees between queries and store operations that are proceeding at
the same time. If an object is added to the 5800 system while a query is being performed, and the
object matches the query, then the object may or may not show up in the query result set.
For a detailed description of query syntax and query semantics, including a description of
exactly what it means for an object to match a query, see
Chapter 4, “Sun StorageTek 5800
The 5800 System Query Integrity Model
The result set of any query will only return results that match the query. But will it return ALL
the matching results? That is the concept of query completeness, referred to here as query
integrity. 100% query integrity for a result set is defined as a state in which the result set contains
all the objects in the 5800 system that match that particular query. The 5800 system is not
always in a state of 100% query integrity. Various system events can induce a state in which the
set of objects that are available for query is smaller than the total set of objects stored in the
archive. Each query result set supports an operation (isQueryComplete) whereby the customer
application can ask, once all the results from the query result set have been processed, whether
that set of results constitutes a complete set.
5800 System Overview
Chapter 1 • Sun StorageTek 5800 System Client API
21