DMA Query Overview
WebDAV DASL BOF Meeting
Chuck Fay, February 10, 1998
Palo Alto, CA
What is DMA?
- Document Management Alliance --
The organization
“DMA is an alliance of 50 companies, organized as task force of AIIM, dedicated to defining interoperability standards for document management products.”
What is DMA?
- Document Management Alliance --
The specification
“DMA is an interface standard (an API) which allows document management products from different vendors to interoperate.”
- DMA 1.0 specification unanimously approved in December 1997
DMA 1.0 Coverage
- Document classes and properties
- Versioning
- Renditions
- Content storage and retrieval
- Containment (e.g., folders)
- Dynamic discovery of document repository capabilities
- Query
DMA Query
- Coordinated query across multiple repositories (“DocSpaces”) via DMA “middleware”
- Query capabilities can be determined by inspection at run-time
- Powerful, but sparse set of required capabilities supports low-function repositories
DMA Query
- Enables legacy systems to participate in coordinated queries through use of alias GUIDs
- Class and property specific operators, operands
- Three-valued logic for dealing with undefined or null values, e.g.,
- x/y < 3 is Unknown if y=0 or x=null or y=null
- True and Unknown = Unknown
- True or Unknown = True
DMA Query
- Set of DMA classes and interfaces that describe search capabilities of a DocSpace
- SQL-like constructs
- Self describing and extremely scaleable
- Object oriented, parse tree representation
- Asynchronous query execution and retrieval supported.
DMA Query Scopes
- Scope objects represent queryable repository catalogs and provide query related methods and properties
- DocSpace Scope objects represent a single repository catalog
- Merged Scope objects represent multiple repository catalogs
Scope Construction
- Merged Scopes are created from a list of component scopes and a combination rule, initially one of:
- Union/Intersection unification of:
- Searchable Classes
- Properties
- Operators
Query Distribution
- Merged Scopes distribute queries to their component scopes and collect and merge results
- Merged Scopes may alter the query prior to distributing it to a component scope
Query Results
- Query results are returned via a QueryResultSet object which provides iteration over the QueryResultRow objects
- Additional methods provide for restarting and aborting the query
- Columns specified in the Query Selections list appear as properties of a QueryResultRow object
Appendix -- More Query Details
Query Object
- A Query Object is used to describe a query and is an input parameter to the Scope’s ExecuteSearch method.
- Queries are represented as a parse tree constructed of COM objects, not as a string
- Query language based upon SQL
Query Node Objects
- All Query parse tree objects are of type QueryNode or children thereof
- QueryRoot
- Represents a query or sub-query
- QueryProperty
- Represents a property occurrence within a class
- QueryConstant
- Two subclasses for each data type (scalar and list)
Query Node Objects
- QuerySearchableClass
- Represents a searchable class
- QueryOrderBy
- Indicates collation order
- QueryNonterminalNode
- Represents Join and other query operators via:
- QueryJoinOp Class
- QueryOperator Class
Defined QueryOperators
- Boolean - And, Or, Not
- Relational
- Six relational operators =, !=, >, >=, <, <=
defined for each data type
- ‘Like’ for strings
- Predicates - IsDefined, IsNull, IsClass
- Subquery Operators
- Exists
- IN (for each data type)
Defined Query Operators (cont)
- Arithmetic
- Add, Subtract, Negate, Absolute Value,
Multiply, Divide on integer and floating
point data types
- Datatype Transformation
- Int to Float and vice versa with or without rounding
QueryOperator Metadata
- QueryOperatorDesc describes a Query Operator
- QueryOperandDesc describes the operands associated with a particular query operator
Query Example
Query Example (cont)