Database Reference
In-Depth Information
used. The structure that a table of interest should
have is specified by means of the set of attributes
and, optionally, their types. The optional EXACT
keyword allows to express that the table of interest
should have exactly the same structure as specified
in the query, i.e., the table should be composed of
only the specified attributes. Omitting the EXACT
keyword results in searching for a table whose
schema contains at least the specified attributes.
FROM FACT TABLE Regions
IN VERSION 'R_March'
VERSION FROM '01-02-2004'
TO '28-02-2004'
VQ2. DW versions containing a fact or
a dimension level table of a given name
The general syntax of the query is shown below.
The mutually exclusive keywords LEVEL and
FACT are used for specifying a level or a fact
table, respectively, similarly as in the query of type
VQ1 . The meaning of other clauses is the same as
discussed for the query of type VQ1 .
SHOW VERSIONS HAVING
(LEVEL|FACT) TABLE table_name
OF [EXACT] STRUCTURE (
attr_name
[OF TYPE type_name],
attr_name
[OF TYPE type_name], ... )
IN VERSION version_name
[VERSION FROM start_date
[TO end_date]]
SHOW VERSIONS HAVING
{LEVEL|FACT} TABLE table_name
IN VERSION version_name
[VERSION FROM start_date
[TO end_date]]
The below example query searches for DW
versions containing fact table called sales in base
version R_March . Notice that this table could
change its name in some DW versions. In this
case, all tables equivalent to Sales will also be
taken into consideration. Since the VERSION
FROM clause was omitted, the query addresses
all existing DW versions.
The below example query searches for DW
versions containing a level table, named Products
in base version R_March .Additionally, the table is
composed in R_March of exactly three attributes,
namely prod_id , prod_name , and cat_id . Notice
that the types of attributes are out of user interest
(the OF TYPE clause was omitted). Notice also
that the table name and attribute names could
change in some DW versions. In this case, their
equivalents in other DW versions will also be
taken into consideration. The VERSION FROM
clause restricts the set of searched DW versions
to these whose BVT is equal to or greater than
01-01-2004 .
SHOW VERSIONS HAVING FACT TABLE
Sales
IN VERSION 'R_March'
VQ3. DW versions containing a
fact or a dimension level table of
a given name and structure
SHOW VERSIONS HAVING
LEVEL TABLE Products
OF EXACT STRUCTURE
( prod_id, prod_name, cat_id )
in version 'R_March'
VERSION FROM '01-01-2004'
The general syntax of the query is shown below.
The mutually exclusive keywords LEVEL and
FACT are used for specifying a level table or a
fact table, respectively.Additionally, the structure
(schema) of a table have to be specified. To this
end, the OF [EXACT] STRUCTURE clause is
Search WWH ::




Custom Search