<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Structural Repairs of Multidimensional Databases∗</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sina Ariyan</string-name>
          <email>mariyan@scs.carleton.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leopoldo Bertossi</string-name>
          <email>bertossi@scs.carleton.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Carleton University, School of Computer Science</institution>
          ,
          <addr-line>Ottawa</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In a multidimensional (MD) database, dimensions may be subject to semantic conditions that are not enforced by MD DBMSs or data warehouse applications. Strictness and homogeneity are possibly two of them; and are crucial for the efficiency and correctness of answering MD aggregate queries and updating materialized aggregate views. Dimensions may become inconsistent, i.e. non-strict or heterogeneous, as the result of update operations. As a methodology to restore consistency, we propose and investigate changes to the dimension schema, as an alternative to changes on the dimension instance. We introduce the notion of minimal structural repair, and establish that under certain conditions, a structural repair reduces the cost wrt changing the dimension instance. We also show that it allows for a correct rewriting of queries posed to the original MD model into queries in terms of the new schema. Finally, we show how query-scoped calculated members in MDX can be used to create virtual repairs that simulate structural repairs.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>straints on dimension instances. In a strict dimension, every element of a category rolls
up to at most one element in a same ancestor category.</p>
      <p>In a homogeneous dimension, all elements in a category have the same structure.
More precisely, if a category C has C as an ancestor category, then all elements of C
must roll up to some element in C . The dimension instance in Figure 1 is not
homogeneous, i.e. heterogeneous, because the element London does not roll up to any element
in categories State or Province. It is also non-strict, because London rolls up to
the two different elements, England and UK, in the Country category.</p>
      <p>
        Dimension instances that do not satisfy strictness or homogeneity (or both) are said
to be inconsistent. Hence, the dimension in Figure 1 is inconsistent. Dimensions may
become inconsistent for several reasons, in particular, as the result of a poor design or a
series of update operations. Inconsistent dimensions reduce soundness and efficiency of
OLAP systems. In them it is not possible to assume that the summarizability property
holds [
        <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
        ]. In a summarizable dimension, an aggregate view defined for a parent
category can be correctly derived from a set of pre-computed views for its child categories.
Summarizability allows for the correct reuse of materialized aggregate views.
      </p>
      <p>
        To restore consistency, changes have to be made to the dimension schema and/or the
dimension instance. In accordance with the area of consistent query answering (CQA)
in relational databases [
        <xref ref-type="bibr" rid="ref1 ref3">1, 3</xref>
        ], the resulting dimension is called a repair of the original
one. A minimal repair is one that minimally differs from the original dimension. As
expected, minimality can be defined and characterized in different ways [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Previous
work on repairing MDDBs has focused mainly on changing the dimension instance by
modifying data elements or links between them [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4, 5, 6</xref>
        ]. Repairs obtained in this way
are called data repairs. In them, the proposed approach to removing heterogeneity is
the addition of different null values in the dimension instance [
        <xref ref-type="bibr" rid="ref14 ref18">14, 18</xref>
        ].
      </p>
      <p>
        As indicated above, inconsistency may be caused by a problematic dimension
schema. Therefore, changing the dimension instance may be only a temporary solution.
Future update operations will probably produce new inconsistencies. So, exploring and
considering structural changes, i.e. changes in the schema, is a natural way to go. This
is an idea that has been suggested in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], to overcome heterogeneity. In this work
we introduce and investigate the notion of structural repair, as an alternative to data
repair. They modify the schema of an inconsistent dimension, to restore strictness and
homogeneity.
      </p>
      <p>Structural repairs restrict changes to dimension instances by allowing changes that
affect only the category lattice and the distribution of the data elements in different
categories. In particular, there are no “data changes” (as in data repairs), in the sense
that the data elements and also the edges between them remain. In the case of a ROLAP
data warehouse (with relational schemas, like star or snow flake) fewer data changes
on a dimension instance directly results in fewer changes on records in the underlying
database.</p>
      <p>
        We establish that any minimal structural repair enables query rewriting: Given a
query, Q, posed to the original, inconsistent MDDB D and any of its minimal repairs,
D , Q can be translated into a query Q to be posed to D , obtaining the same results
in terms of selected data elements and their respective aggregate values. In particular,
if in D some summarizability properties applied or “local” homogeneity and strictness
held (which, e.g. can be enforced by local semantic constraints [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]), then the query
answers for the “correct” cases in D are reobtained via Q from D . Even more, the
same (correct) summarizability properties that held in D will hold in D . Since repairs
are now consistent, summarizability will be a global property in each of them. 1
      </p>
      <p>Structural repairs can be used to solve both non-strictness and heterogeneity, and
have major advantages wrt to other approaches, specially when dealing with
heterogeneity. On the other hand, when fixing non-strictness, structural repairs have good
properties wrt the number of changes when the parent elements in a same category
involved in a violation of strictness (i.e. they have a descendant in common) do not have
descendants in many different categories. In such undesirable cases, changing the
parent category may have to be propagated to categories belonging to its lower subgraph,
causing several additional changes (cf. Section 6). Thus, a data repair or a combination
of data and structural repair may result in fewer overall changes.</p>
      <p>
        Structural repairs may be virtually implemented through appropriate view
definitions, an idea we develop in this work. As a view definition language, we consider
MDX, the language commonly used to query MDDBs [
        <xref ref-type="bibr" rid="ref17 ref19">17, 19</xref>
        ]. In this work we also
show how query-scoped calculated members in the MDX language can be used to create
virtual structural repairs. In this way, the behavior of structural repairs can be explored
at query time, which is useful if a structural repair of choice is going to be materialized
at some point.
      </p>
      <p>This paper is organized as follows: Section 2 presents the MD data model. Section 3
formalizes the notion of (minimal) structural repair. Section 4 discusses properties of an
ideal repair and shows that, by satisfying certain conditions, a minimal structural repair
will have those properties. Section 5 shows how virtual structural repairs can be created
in MDX. Section 6 provides a discussion of previous work, a comparison between data
repairs and structural repairs, directions for future work, and some concluding remarks.
Proofs of results, additional examples, and a brief introduction to MDX can be found
in an extended version.2</p>
    </sec>
    <sec id="sec-2">
      <title>2 The Multidimensional Model</title>
      <p>
        In this work we adopt as a basis the Hurtado-Mendelzon model of MDDBs [
        <xref ref-type="bibr" rid="ref10 ref13">10, 13</xref>
        ].
However, since we will deal with changes in the schema, we will use a two-sorted
structural representation of a MDDB (as in many-sorted predicate logic [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]). This will
flatten out the representation and will allow us to talk about categories as elements of the
structure (as opposed to sets of elements). In consequence, a dimension is a set-theoretic
structure of the form S = U, C U , EU , LUC , LUE, ECU , where C U and EU are unary
relations, and LUC , LUE, ECU are binary relations, all of them over the universe U . More
precisely:
1. U is a possibly infinite and non-empty set that is the disjunct union of a set of
categories and a set of data elements, say U = UC ∪ UE .
2. CU ⊆ UC is a finite, non-empty set of “active” categories. In the example above,
      </p>
      <p>CU = {City, State, Province, Country, All}.
3. EU ⊆ UE is a finite, non-empty set of “active” data elements. In the example,</p>
      <p>EU = {LA, ..., all}.
4. LUC is the child/parent relationship between categories, i.e. edges between
categories in the dimension schema. In the example, L UC ={(City, State), (State,
Country), . . . , (Country, All)}.
1 Actually, all these claims still hold under slightly softer conditions than those imposed by the
notion of minimal repair.
2 http://people.scs.carleton.ca/∼bertossi/papers/strucRep18Ext.pdf
From a dimension S as above we can define its dimension schema structure: K(S) :=
UC , CU , LUC . We can also define its dimension instance: M (S) := U, E U , LUE, ECU .
Loosely speaking, we can say that “M (S) is the instance for schema K(S)”.</p>
      <p>For a structure S to represent a valid MDM, it has to satisfy the following basic
MD conditions (BMDCs): (below ei and ci represent members of the universe and R ∗
denotes the transitive closure of a binary relation R):
1. CU ∩ EU = ∅. 2. LUC ⊆ CU × CU. 3. LUE ⊆ EU × EU. 4. EC U ⊆ EU × CU.
5. For all e1, e2, c1, c2: If (e1, e2) ∈ LUE and (e1, c1) ∈ ECU and (e2, c2) ∈ ECU,
then (c1, c2) ∈ LUC.
6. For all c1: If c1 ∈ CU, then (c1, c1) ∈/ (LUC )∗.
7. For all e1: If e1 ∈ EU, then there exists c1 with (e1, c1) ∈ ECU.
8. For all c1, c2: If there is e with (e, c1) ∈ EC U and (e, c2) ∈ EC U , then c1 = c2.
9. For all c1, c2: c1 = c2 iff, for all e ∈ EU, it holds: (e, c1) ∈ ECU iff (e, c2)
∈ ECU .</p>
      <p>Notice that from these conditions it follows that 2. an 3. are proper inclusions.
Definition 1. Dimension S = U, C U , EU , LUC , LUE , ECU is: (a) Strict if, for all
e1, e2, e3, c : If (e1, e2) ∈ (LUE)∗, (e1, e3) ∈ (LUE)∗, (e2, c) ∈ ECU , (e3, c) ∈ ECU ,
then e2 = e3. (b) Homogeneous if, for all e1, c1, c2 : If (e1, c1) ∈ ECU , (c1, c2) ∈ LUC ,
then there is e2, with (e2, c2) ∈ ECU and (e1, e2) ∈ LUE . (c) Consistent if it satisfies
the two previous conditions; and inconsistent otherwise.
3</p>
      <p>Structural Repairs
Definition 2. A data repair for an inconsistent dimension S = U, C U , EU , LUC , LUE ,
U
EC U is a structure S = U, CU , EU , LUC , LUE, EC that satisfies the dimension
conditions and the BMDCs,4 and is strict and homogeneous.</p>
      <p>Notice that S and S have the same universe, the same categories, and the same category
links (but other relations may differ). We can see that, in order to obtain a data repair,
one can only add or remove data elements, change links between elements or move
elements between different categories. The following notion of structural repair (SR) is
given in terms of a new MD structure, possibly with a new schema, and a mapping that
establishes the correspondence between the original dimension and the new structure.
Definition 3. A structural repair for an inconsistent dimension S =
LUC , LUE , ECU is a pair S , g , with S a structure U, CU , EU , LUC , LUE , EC , with
the following properties: (a) S is strict and homogeneous. (b) Elements cannot move
U, C U , EU ,</p>
      <p>U
3 We assume that in MDM all dimensions have this top category All with the single element
all, to which all the other elements roll up.
4 In the following this will be implicity assumed.
⊆-incomparable with {e | (e, c ) ∈ EC</p>
      <p>and c ∈ g(c)}).
between categories that exist both in S and S : For all e, c1, c2, if (e, c1) ∈ ECU , (e, c2)
∈ ECU , c1 = c2, then {c1, c2} (CU ∩ CU ). (c) Any new category in S must have
at least one data element. (d) g : C U → 2CU , the schema mapping, is a total function
that maps each category of S to a set of categories in CU (which is finite in S ). (e) If
c ∈ g(c), then c and c share at least one data element.</p>
      <p>The role of g is to establish a relationship between the schemas of S and S . Notice
that, for each category c, the set of its “elements”, i.e. {e | (e, c) ∈ EC U }, may be</p>
      <p>U</p>
      <p>This proposition can be proved by using a simple structural repair that essentially
creates a new one-element category for each element in the dimension instance, and also
links between the newly created categories whenever their single elements are
connected in the original instance. Figure 4 illustrates this kind of structural repair as a
third repair for the instance in Figure 1.
5 Isomorphic structural repairs, i.e. that differ only in the names of active categories, will treated
as being the same repair.</p>
      <p>Example 1. The following mapping is a schema mapping between the dimension of
Figure 1 and the structural repair of Figure 2:
g : City → {City1, City2}, State → {StateProv}, Province → {StateProv},
Country → {Country1, Country2}, All → {All}.
Now we define minimal structural repairs (MSRs), as preferred repairs among the
structural repairs. This requires comparing structural repairs. The data movement set, defined
next, has useful properties for enabling this comparison (cf. Section 4).</p>
      <p>Definition 4. Let S , g be an SR for dimension S, and c a category of S. (a) The
data movement set of category c is defined by:</p>
      <p>DMSet g(c) = {e | (e, c) ∈ ECU } c ∈g(c){e | (e, c ) ∈ EC },
where denotes the symmetric difference of two sets. (b) The overall data movement
set between S and S is DMSetg(S, S ) := c∈CU DMSetg(c).</p>
      <p>U
Example 2. (example 1 cont.) For the schema mapping in the example: DMSet g(City)
= ∅, DMSetg(State) = {BC, ON}, DMSet g(Province) = {California},
DMSetg(Country) = ∅, DMSet g(All) = ∅.</p>
      <p>
        Intuitively, an MSR is a new dimension that is obtained by applying a minimal set of
changes to the schema of an inconsistent dimension. Inspired by the notion of
prioritized minimization [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], we propose to minimize both data movement and the changes
in the set of categories, but assigning higher priority to minimizing the former.
Definition 5. For a dimension S and two SRs S1, g1 and S2, g2 :
      </p>
      <p>S1, g1 ≤S S2, g2 iff DMSet g1 (S, S1) ⊆ DMSetg2 (S, S2) and</p>
      <p>DMSet g1 (S, S1) = DMSetg2 (S, S2) ⇒ (CS CS1) ⊆ (CS CS2).</p>
      <p>Here, CS , CS1 and CS2 denote the finite sets (C U ) of active categories for structures
S, S1 and S2, respectively.</p>
      <p>Definition 6. S1, g1 is a minimal structural repair (MSR) of dimension S iff it is an
SR of S and there is no other SR S2, g2 for S, such that S2, g2 &lt;S S1, g1 . (Here,
as expected, u &lt;S v means u ≤S v, but not v ≤S u.)
Example 3. It can be shown that the structural repair of Figure 3 is an MSR for the
inconsistent dimension of Figure 1, with the following schema mapping:
g1 : City → {City1, City2, City3}, State → {State}, Province → {Province},</p>
      <p>Country → {Country1, Country2}, All → {All}.</p>
      <p>On the other hand, the structural repair of Figure 2 is not an MSR for any
possible schema mapping. This is because for categories State and Province in the
original dimension, there is no category (or set of categories) in this repair that
contains exactly the data elements that belong to those two categories. Therefore, for
any mapping g2, DMSet g2 (State) = ∅ and DMSet g2 (Province) = ∅. As a result,
DMSet g2 (State) DMSet g1 (State). According to the definition of MSR, g 2 cannot
be minimal.</p>
      <p>Proposition 2. An inconsistent dimension always has a minimal structural repair.
The following example shows that an inconsistent dimension may have multiple MSRs.
Example 4. The structural repair of Figure 5, that is obtained by swapping the data
elements England and UK in the structural repair of Figure 3, shows another minimal
structural repair for the inconsistent dimension of Figure 1. These two minimal repairs
are not isomorphic.
If the notion of MSR is applied to a consistent dimension S, then S, id is one of its
MSRs, with id : c → {c}, but not necessarily the only one. This is because we can
have categories with no members in a consistent dimension, and changing the links that
are attached to them results in different minimal repairs. To ensure that a consistent
dimension is its only MSR, we have to add an extra condition in the definition of minimal
repair, to restrict changes on the set of category links, i.e. on L UC .</p>
      <p>Our next result states two properties of MSRs that will be useful in Section 4.
Theorem 1. (a) If S , g is an MSR of dimension S, then for every category c in
S, DMSet g(c) = ∅. (b) In an MSR, if g(c) = {c1, . . . , cn}, then, for all e with
U
(e, c) ∈ EC U , there is a ci, such that (e, ci) ∈ EC .</p>
      <p>Notice that the inverse of the implication in (a) does not necessarily hold. The example
in Figure 4 shows an SR with an empty data movement set that is not minimal.
4</p>
      <p>
        Properties of Structural Repairs
An OLAP system is usually modeled by a three level architecture consisting of a data
warehouse server, a query client and a data cube engine [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The performance of an
OLAP system is based on how it performs at each level. Any repair is expected to
remove inconsistencies of a dimension, while maintaining good properties at each of
the three levels. From this point of view, an ideal repair should satisfy the following
requirements:
1. Changes to the underlying database forced by the transition from the original
dimension to the repair should be as few as possible.
2. Queries posed to the original instance should be rewritable as queries to the repair.
      </p>
      <p>And the new queries should return similar outputs in terms of selected data elements
and their respective aggregate values (cf. Section 4.1).
3. If the original structure allows summarizations over existing cube views, to
compute new cube views, similar summarizations should also be possible in the repaired
dimension (cf. Section 4.2).</p>
      <p>
        By definition, structural repairs restrict changes to data so that elements and links in
the dimension instance do not change at all. Therefore, the first requirement is strictly
satisfied by the use of structural repairs. In Sections 4.1 and 4.2 we will focus on how
structural repairs perform wrt the two other requirements.
4.1 Rewritability of cube views
The most common aggregate queries in DWHs are those that perform grouping by the
values of a set of attributes (i.e. categories), and return a single aggregate value per
group. These aggregate queries are also known as cube views [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The aggregation is
achieved by upward navigation through a category path, which is captured by the notion
of roll-up relation. More precisely, the roll-up relation between categories c i and cj ,
denoted Rccij , is the relation {(ei, ej ) | (ei, ci) ∈ EC U and (ej , cj ) ∈ EC U and (ei, ej ) ∈
(LUE ) }.
      </p>
      <p>Now, a cube view (query) at granularity G = c 1, ..., cn (a list of active categories)
is denoted by CVG, and is expressed as:</p>
      <p>SWFEHRLEOERMCETT,cocRnjbcd,jji.,ti..o..n.csRnbc,nnf(a)
luHepverereel,lcacatijtoe,.gn.os.rRycbcunjjn,ad.r.ee.racRttibcr)nin,bTu(wtieshset(hrceeatefeaagccohtrtibaeibs)liesoatfhtbahotetatrsoosmlol--ciates numerical values (measures) to elements in b i,</p>
      <p>GROUP BY cj , . . . cn and f is one of min, max, count, sum, avg,
applied to fact measure a. The result of this cube view, denoted result (CV G), is the set
of tuples {t1, ..., tr} with tk = ejk, ..., enk, ak . The non-aggregate portion e jk, . . . ,
enk of tuple tk contains the values for the attributes in the SELECT clause (which are
the same as in the GROUP BY). Here, eik is a data element that belongs to category c i,
and ak is the value of aggregate function f for this tuple.</p>
      <p>Definition 7. A cube view CVG on categories of dimension S is rewritable on an SR
S , if there exists a cube view CVG on categories of S , such that result (CVG) =
result (CVG ). CVG is called a rewriting of CVG in S .</p>
      <p>Theorem 2. A cube view CV G at granularity G = c1, ..., cn on dimension S is
rewritable over a structural repair S , g if the data movement set for categories c 1, . . . ,
cn is empty. In particular, cube views are always rewritable over MSRs.
Notice that in the theorem the inverse implication may not hold: Even for repairs with
non-empty data movement set, some queries may be rewritable.</p>
      <p>Example 5. Consider the dimension of Figure 1 and a cube view (a) below for this
dimension. Assume that Facts is the fact table, and Sales is a fact measure. This cube
view is not rewritable on the structural repair of Figure 2, because DMSet g (Province)
= ∅. On the other hand, for the structural repair of Figure 3 (that has empty data
movement set for all categories), the cube view in (b) below is a rewriting. It is obtained by
replacing RCity Province.</p>
      <p>Province by RCity2
(a) SELECT Province, SUM(Sales)(b) SELECT Province, SUM(Sales)
FROM Facts, RCPirtoyvince FROM Facts, RPCriotvyi2nce</p>
      <p>GROUP BY Province GROUP BY Province
A common technique for speeding up OLAP query processing is to pre-compute some
cube views and use them for the derivation (or answering) of other cube views. This
approach to query answering is correct under the so-called summarizability property (cf.
Example 6). It is globally guaranteed by the consistency conditions on the dimension
schema. However, in the case of inconsistency, there could still be localized
summarizability. Either way, ideally these summarizability properties should be preserved under
structural repairs.</p>
      <p>Example 6. Consider the dimension of Figure 1 and a pre-computed cube view CV Country
in (a) below for category Country. Also, consider cube view (b) below that uses
CVCountry to derive aggregate values for category All:
(a) SELECT Country, SUM(Sales) AS S (b) SELECT All, SUM(S)
FROM Facts, RCCoiutnytry FROM CVCountry, RACloluntry
GROUP BY Country GROUP BY All
This derivation will produce correct results, only if category All is summarizable from
category Country. In the dimension of Figure 1, this summarizability property does
not hold. This is because in the instance of this dimension, element London will be
considered twice as a descendant of all (via England and UK).</p>
      <p>
        Cube view CVG1 at granularity G1 = c1, ..., cj depends on cube view CV G2 at
granularity G2 = ck, ..., cn iff CVG1 can be answered using the result of CV G2 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
For this to hold, each ci in G1 must be summarizable from G2 (or a subset of G2). A
formal definition of category summarizability is given in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>Definition 8. An SR S , g for dimension S preserves summarizability of category
c over categories {c1, ..., cn} (all in S) iff every c ∈ g(c) is summarizable from
n
k=1 g(ck) in S .</p>
      <p>Theorem 3. An SR S , g for dimension S preserves summarizability of category c
over categories {c1, ..., cn} if DMSet g(c) = DMSet g(c1) = · · · = DMSet g(cn) = ∅.
In particular, minimal structural repairs preserve all the summarizability properties.
Example 7. For the inconsistent dimension of Figure 1, consider the structural repair of
Figure 3, with the schema mapping
g : City → {City1, City2, City3}, State → {State}, Province → {Province},</p>
      <p>Country → {Country1, Country2}, All → {All}.</p>
      <p>Since g has an empty data movement set for every category, we expect it to
preserve summarizability properties that hold in the original dimension. For example,
Province is summarizable from City in the dimension in Figure 1. In the MSR
in Figure 3, Province is summarizable from {City1,City2,City3}.
Notice in the previous example that, in addition to the preservation of existing
summarizability properties, the structural repair is also adding extra summarizibility
properties. For instance, category All was not summarizable from City through category
Country in the original dimension, but it is now summarizable from {City1,City2,
City3} through category Country1. This is achieved through the newly imposed
strictness and homogeneity conditions.
5</p>
      <p>Virtual Repairs in MDX
An important problem that needs to be addressed is how to implement structural repairs
in a way that is transparent to users of MDDBs. As discussed in previous sections, one
advantage of using structural repairs instead of data repairs is that the former remove
inconsistencies without having to change the underlying database.</p>
      <p>One of the interesting features of the MDX query language is the ability to define
query-scoped calculated members. A query-scoped calculated member is a virtual
object defined in terms of other existing objects by means of a query. For example, a new
category (or data element) in terms of other existing categories (data elements, resp.),
etc. They are generated using the WITH construct in MDX:
WITH {MEMBER|SET} MemberIdentifier AS ’member-formula’ SELECT ...</p>
      <p>This template creates a new calculated member (or set of members) that is defined
by the MDX expression ’member-formula’. {MEMBER|SET} indicates if the newly
created object is an element or a category, resp.</p>
      <p>Using this feature, structural repairs can be virtually created, without any need for
materializing new data or accessing the database in order to generate database views.
This is specially useful if the structural repair of choice is going to be materialized at
some point, after some exploratory analysis.</p>
      <p>Example 8. The following MDX query creates a query-scoped calculated category
StateProv, as the union of categories State and Province. It then selects the
summarized value of measure Sales for the members in this new category. Here,
SalesCube is the base cube (or fact table):</p>
      <p>WITH SET [StateProv] AS</p>
      <p>’[State].MEMBERS + [Province].MEMBERS’
SELECT [Measures].[Sales] ON AXIS(0),</p>
      <p>[StateProv] ON AXIS(1)</p>
      <p>FROM [SalesCube]
Structural repairs (or portions of them) can be generated using this form of view
definitions, as virtual repairs. In them, new categories are defined as calculated members.
Virtual repairs can be used to test how structural changes will affect existing queries
before making the transition to the new MD model.</p>
      <p>Example 9. (example 8 cont.) Consider the structural repair of Figure 2. The given
MDX query defines StateProv, the new category in the structural repair of Figure 2.
It contains the elements in the union of categories State and Province.</p>
    </sec>
    <sec id="sec-3">
      <title>6 Discussion and Conclusions</title>
      <p>Research on repairing inconsistent dimensions has focused mainly on modifying data
elements. Here we introduced and investigated the notion of structural repair, as an
alternative to data repair. Structural repairs restrict changes to the dimension instance
by only allowing changes that affect the dimension schema and the organization of
elements in different categories. We defined the notion of minimal structural repair and
proved that, by having a minimal data movement set, it enables the rewriting of queries
posed to the original multidimensional model as queries to be posed to a repair. The
rewritten query the same results in terms of selected data elements and their respective
aggregate values.</p>
      <p>
        The notion of (data) repair was introduced in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], including a notion of consistent
answer in the spirit of consistent query answering (CQA) in relational databases [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
Data repairs are generated by adding and removing links between data elements, for
restoring strictness on already homogeneous dimensions. Inspired by [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], consistent
answers to aggregate queries on non-strict dimensions are characterized in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] in terms
of a smallest range that contain the usual (numerical) answers obtained from the
minimal data repairs. In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], preliminary work on the effect of non-strictness on aggregate
queries from homogeneous dimensions was carried out. The focus is on finding ways
to retrieve consistent answers even when the MDDB is inconsistent. To restore
consistency, links and elements in the dimension instance are deleted in a minimal way.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], repairs of heterogeneous or non-strict dimensions (or both) are obtained by
insertions and deletions of links between elements. Adding a link in the instance to
remove heterogeneity may cause non-strictness in parts of the instance that did not
have any problems before. Therefore, this has to be done in an iterative manner until
everything is fixed (usually after many changes). Logic programs with stable model
semantics were proposed to represent and compute minimal dimension repairs.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], methodologies and algorithms are given for transforming inconsistent
dimensions into strict and homogeneous ones. The dimension instance is changed (as
opposed to the schema). Problems caused by inconsistent dimensions are fixed by
introducing NULL members as new data elements. In [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], the authors study the implications
of relaxing the homogeneity condition on MDDBs. They also argue that the addition
of NULL values (elements) and changes to the schema provide a solution to structural
heterogeneity.
      </p>
      <p>An important drawback of data repairs is that they manipulate the dimension
instance, i.e. the data. In case the MDDB is implemented on a relational DB, this results
in changes in records, which users may find undesirable. In contrast, structural repairs
can be implemented without the need to change the underlying database, through view
definitions.</p>
      <p>Another problem with data repairs is that resolving heterogeneity may require
introducing redundant NULL data values in the dimension instance. Those values have
to be proliferated along the path of ancestor categories. The alternative approach for
removing heterogeneity that is based on insertions of new links has the problem of
possibly introducing new sources of non-strictness, which have to be resolved. This may
introduce multiple changes in the dimension instance.</p>
      <p>Fixing non-strictness via structural repairs has good properties in terms of the
number of changes when the parent elements in a same category involved in a violation of
strictness (i.e. they have a descendant in common) do not have descendants in many
different categories. In the opposite case, changing the parent category may have to
be propagated to categories belonging to its lower subgraph, causing several additional
changes, as shown in the next example.</p>
      <p>(a) A non-strict dimension (b) SR causing multiple changes</p>
      <p>Fig. 6: Structural repairs and non-strictness
Example 10. Consider the non-strict dimension of Figure 6a, where element e2 rolls
up to two different elements, e7 and e8, in category C4. Here, e7 and e8 have
descendants from three different categories in their subgraph. As shown in Figure 6b, a
structural repair forces many changes in the dimension schema. Using a data repair or
a combination of a data and a structural repair may result in fewer overall changes.
Inconsistencies can be resolved by combining (the ideas behind) structural and data
repairs. In some cases, that still have to be properly characterized, taking advantage of
both approaches for resolving different local inconsistencies may produce better results
in terms of number of changes. This is illustrated in the next example.
(a) An inconsistent dimension
(b) A repair that changes the schema and
instance</p>
      <p>Fig. 7: Combining structural repairs and data repairs
Example 11. Figure 7a shows an inconsistent dimension. Restriction to pure data
repairs will require applying multiple data and link changes. One way is to add at least
five new and different NULL elements and ten new links, to resolve heterogeneity; and
also remove the link between e3 and e10, to resolve non-strictness. On the other hand,
using a pure structural repair requires introducing at least four new categories. As can be
seen in Figure 7b, a combination of structural and data changes provides a solution that
involves fewer changes (adding two categories in the dimension schema and removing
a single link in the dimension instance).</p>
      <p>There are still many issues to be investigate around structural repairs, and also around
their non-trivial combination with data repairs. They are the subject of ongoing
research. In this work we have not developed a notion of consistent answers to queries.
This is left for future research.</p>
      <p>
        Our notion of a minimal structural repair can be extended with priorities imposed
on certain categories (or different levels in the lattice) in the dimension schema. Higher
priorities can be assigned to categories that are queried more often or contain data
elements that are more sensitive to change. Multidimensional integrity constraints on the
schema [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] could also be considered in the definition.
      </p>
      <p>In this work we have also showed how query-scoped calculated members in MDX
can be used to create virtual structural repairs. This can be seen as a way of
implementing view-based (structural) repairs. We have experimented with this approach on top of
the IBM Cognos 8 Business Intelligence system, which is also being used for testing
the performance of structural repairs. Reporting the results is part of the future work.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bertossi</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Chomicki</surname>
          </string-name>
          .
          <article-title>Consistent Query Answers in Inconsistent Databases</article-title>
          .
          <source>In Proc. ACM PODS'99</source>
          , ACM Press,
          <year>1999</year>
          , pp.
          <fpage>68</fpage>
          -
          <lpage>79</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bertossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chomicki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Raghavan</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Spinrad</surname>
          </string-name>
          . Scalar Aggregation in Inconsistent Databases.
          <source>Theoretical Computer Science</source>
          ,
          <year>2003</year>
          ,
          <volume>296</volume>
          (
          <issue>3</issue>
          ):
          <fpage>405</fpage>
          -
          <lpage>434</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bertossi</surname>
          </string-name>
          . Consistent Query Answering in Databases.
          <source>ACM SIGMOD Record</source>
          ,
          <year>June 2006</year>
          ,
          <volume>35</volume>
          (
          <issue>2</issue>
          ):
          <fpage>68</fpage>
          -
          <lpage>76</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bertossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bravo</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Caniupan</surname>
          </string-name>
          .
          <article-title>Consistent Query Answering in Data Warehouses</article-title>
          .
          <source>In Proc. 3rd Alberto Mendelzon International Workshop on Foundations of Data Management (AMW'09)</source>
          ,
          <source>CEUR Proc</source>
          . Vol.
          <volume>450</volume>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bravo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Caniupan</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.A.</given-names>
            <surname>Hurtado</surname>
          </string-name>
          .
          <article-title>Logic Programs for Repairing Inconsistent Dimensions in Data Warehouses</article-title>
          .
          <source>In Proc. Alberto Mendelzon International Workshop on Foundations of Data Management (AMW'10)</source>
          ,
          <source>CEUR Proc</source>
          . Vol.
          <volume>619</volume>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Caniupan</surname>
          </string-name>
          .
          <article-title>Handling Inconsistencies in Data Warehouses</article-title>
          .
          <source>In Current Trends in Database Technology</source>
          , Springer LNCS 3268,
          <year>2004</year>
          , pp.
          <fpage>166</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.W.</given-names>
            <surname>Cheung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.W. L and H.F.</given-names>
            <surname>Ting</surname>
          </string-name>
          .
          <article-title>Requirement-Based Data Cube Schema Design</article-title>
          .
          <source>In Proc. CIKM'99</source>
          ,
          <year>1999</year>
          , pp.
          <fpage>162</fpage>
          -
          <lpage>169</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>H.</given-names>
            <surname>Enderton</surname>
          </string-name>
          .
          <source>A Mathematical Introduction to Logic. 2nd Edition</source>
          , Academic Press,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>V.</given-names>
            <surname>Harinarayan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rajaraman</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Ullman</surname>
          </string-name>
          .
          <article-title>Implementing Data Cubes Efficiently</article-title>
          .
          <source>In Proc. SIGMOD'96</source>
          , ACM Press,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hurtado</surname>
          </string-name>
          .
          <article-title>Structurally Heterogeneous OLAP Dimensions</article-title>
          .
          <source>PhD Thesis</source>
          , Computer Science Department, University of Toronto,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hurtado</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Mendelzon. OLAP Dimension</surname>
          </string-name>
          <article-title>Constraints</article-title>
          .
          <source>In Proc. PODS'02</source>
          , ACM Press,
          <year>2002</year>
          , pp.
          <fpage>169</fpage>
          -
          <lpage>179</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hurtado</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          .
          <article-title>Computing Cube View Dependences in OLAP Datacubes</article-title>
          .
          <source>In Proc. 15th International Conference on Scientific and Statistical Database Management</source>
          ,
          <year>2003</year>
          , pp.
          <fpage>33</fpage>
          -
          <lpage>42</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hurtado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Mendelzon</surname>
          </string-name>
          .
          <article-title>Capturing Summarizability With Integrity Constraints in OLAP</article-title>
          .
          <source>ACM Transactions on Database Systems</source>
          ,
          <year>2005</year>
          ,
          <volume>30</volume>
          (
          <issue>3</issue>
          ):
          <fpage>854</fpage>
          -
          <lpage>886</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hurtado</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          .
          <article-title>Handling Structural Heterogeneity in OLAP</article-title>
          .
          <source>In Data Warehouses and OLAP: Concepts</source>
          , Architectures and Solutions,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wrembler</surname>
          </string-name>
          and C. Koncilia (eds.), Idea Group, Inc.
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>W.</given-names>
            <surname>Inmon</surname>
          </string-name>
          .
          <source>Building the Data Warehouse. 4th Edition</source>
          , Wiley,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          . Circumscription.
          <source>In Handbook of Logic in AI and Logic Programming</source>
          , Vol.
          <volume>3</volume>
          , Oxford University Press,
          <year>1994</year>
          , pp.
          <fpage>298</fpage>
          -
          <lpage>352</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Microsoft</given-names>
            <surname>Corporation</surname>
          </string-name>
          .
          <article-title>Multidimensional Expressions (MDX) Reference</article-title>
          . Available at http://msdn.microsoft.com/enus/library/ms145506.aspx,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>T.B. Pedersen</surname>
            ,
            <given-names>C.S.</given-names>
          </string-name>
          <string-name>
            <surname>Jensen</surname>
            ,
            <given-names>C.E.</given-names>
          </string-name>
          <string-name>
            <surname>Dyreson</surname>
          </string-name>
          .
          <article-title>Practical Pre-aggregation in Online Analytical Processing</article-title>
          .
          <source>In Proc. VLDB'99</source>
          ,
          <year>1999</year>
          , pp.
          <fpage>663</fpage>
          -
          <lpage>674</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>G.</given-names>
            <surname>Spofford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Harinath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Webb</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.H.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Civardi. MDX Solutions</surname>
          </string-name>
          <article-title>: With Microsoft SQL Server Analysis Services 2005</article-title>
          and
          <string-name>
            <given-names>Hyperion</given-names>
            <surname>Essbase</surname>
          </string-name>
          . Wiley,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>