Database Reference
In-Depth Information
instance. A query of the first type will be called a
version query and a query of the second type will
be called an object evolution query .
clause is optional. If it is not specified in a query,
then the query addresses all DW versions whose
BVT is greater or equal to start_date. If the whole
VERSION FROM clause is omitted, then all
existing DW versions are queried.
Below we describe the syntax of each of the
aforementioned five types of a version query and
illustrate them with examples.
Version Query
In particular, a version query allows to search for
DW versions that include:
VQ1. DW versions containing an
attribute of a given name and type
1.
an attribute of a given name and a type or an
equivalent attribute (in the case of changing
attribute names in DW versions) in a fact or
a level table;
The general syntax of the query is shown be-
low. attr_name is the name of an attribute being
searched. The optional OF TYPE type_name
clause allows to specify attribute type. The FROM
{LEVEL|FACT} TABLE table_name clause al-
lows to specify whether the attribute of interest
belongs to a level or fact table whose name is
specified as table_name.
2.
a table (either fact or level) of a given name
or an equivalent table (in the case of chang-
ing table names in DW versions);
3.
a table (either fact or level) that has a given
exact or partial structure;
4.
a dimension that has a given exact or partial
structure;
5.
a dimension instance that has a given exact
or partial structure.
SHOW VERSIONS HAVING ATTRIBUTE
attr_name [OF TYPE type_name]
FROM {LEVEL|FACT} TABLE table_name
IN VERSION version_name
[VERSION FROM start_date
[TO end_date]]
The result of a version query is a DW version
derivation tree that allows to track the existence
of a specified DW object in the DW versions of
interest. A version query is expressed by means
of the SHOW VERSIONS HAVING clause, fol-
lowed by keywords specifying the type of an object
being searched. The set of keywords includes:
ATTRIBUTE, LEVEL TABLE, FACT TABLE,
DIMENSION, DIMENSION ... INSTANCE. In
each of these five types of a version query a user
specifies the definition of the searched object.
This object definition is valid for an indicated
DW version. The DW version where the specified
object exists will be called a base version . A base
version is selected by means of the IN VERSION
version_name clause.
A version query can address either all or some
DW versions. The set of DW versions being que-
ried is constrained by means of the VERSION
FROM start_date [TO end_date] clause, similarly
as in content queries. Notice that the TO end_date
The below example query searches for DW
versions containing attribute reg_name of type
varchar2 and the length equal 20 characters,
belonging to fact table called Regions . This attri-
bute and the table originally exist in DW version
R_March , which is the base version as specified
in the IN VERSION 'R_March' clause. The set of
searched DW versions is constrained to versions
whose validity times are within the range from
01-02-2004 to 28-02-2004 . Notice that attribute
reg_name could change its name and/or its type
in some DW versions. All attributes equivalent to
reg_name will also be taken into consideration.
SHOW VERSIONS HAVING ATTRIBUTE
reg_name OF TYPE varchar2(20)
Search WWH ::




Custom Search