Database Reference
In-Depth Information
If we apply the inference procedure then the same query can be written in a more compact form:
(Publishers | name = “XYZ”)
<-* (BooksWriters)
*-> (Writers)
This query consists of two parts which correspond to the two-step inference procedure. On the first
step we de-project the source collection down to the BooksWriters fact collection using '<-*' operator.
On the second step we project the facts up to the target Writers collection using '*->' operator. Note that
we use stars in projection and de-projection operators to denote arbitrary dimension path. We can write
this query in even more concise form if de-projection and projection steps are united in one inference
operator denoted <-*->:
(Publishers | name = “XYZ”)
<-*-> (Writers)
The system will de-project the source collection down to the most specific collection and then project
it up to the target collection. Note how simple and natural this query is. We essentially specify what we
have and what we need. The system then is able to propagate these constraints to the target and return
the result.
Multidimensional Analysis
Projection and de-projection allow us to navigate through the partially ordered structure of the database
following only one dimension path. For multidimensional analysis it is necessary to have an operation
which could take several collections and produce a multidimensional cube from them (Savinov, 2006a).
In COQL, this operation is prefixed with the CUBE keyword followed by a sequence of source collec-
tions in round brackets. For example (Figure 4), given two source collections with countries and product
categories we can produce a 2-dimensional cube where one element is a combination of one country
and one produce category:
ResultCube =
CUBE (Countries, Categories)
By default, all input dimensions will be included in the result collection, that is, a cube in our ex-
ample will have two dimensions: a country and a product category. An arbitrary structure of the result
collection is specified my means of the RETURN keyword. For example, we might want to return only
country and category names:
ResultCube =
CUBE (Countries co, Categories ca)
RETURN co.name, ca.name
Search WWH ::




Custom Search