COSMOS CMDBf Query Processing Approach
In order to provide a common framework or design pattern to solve the problem of interpreting CMDBf queries, we need to formalize the approach in interpreting the queries.
- Each CMDBf query consists of one or more connected graphs, called query graphs.
- Each query graph will result in a "logical query".
- The number of logical queries equals to the number of disjoint graphs in the CMDBf query.
- Form heuristics of mappings between each logical query (in CMDBf query syntax) and the native query language. The mapping needs to be a two-way mapping. Hence some features of the either query language may not be utilized. If the logical query is expressed in a way that's outside the capability of the native query, several simpler native queries will result, and extra processing is required by the MDR to process what the backend application cannot handle. The MDR can also decide to simply reject the query without processing.
- The result sets of the native queries are combined using the UNION operation, and returned to the query client in the CMDBf query response format.
There are several classes of query languages.
- SQL (relational database)
- XPath (path queries / hierarchical data)
- calling an application API - the complexity of the query is hidden by a program interface
The mapping of query responses to CMDBf query response
- JDBC result set (or SQL result in general)
Q) Does this impact the CMDBf toolkit that david has been working on?