the same function $\mathrm{\color[rgb]{0,0,0}{F}}$ or a different function
$\mathrm{\color[rgb]{0,0,0}{G}}$. We shall say that  A is summarizable with
respect to grouping set $\mathrm{Z}_{1}$ and function
$\mathrm{\color[rgb]{0,0,0}{F}}$, using function
$\mathrm{\color[rgb]{0,0,0}{G}}$.

Figure 9. Summarizable attribute $A$ with respect to $Z_{1}$ and
$\mathrm{\color[rgb]{0,0,0}{F}}$ using $\mathrm{\color[rgb]{0,0,0}{G}}$

The Definition 4.1 below formalizes Figure 9 and, as shown later in Section 5,
subsumes the definition of summarizability addressed in previous work. For
simplicity, we use the expression _valid aggregate query_ for a query
$\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z})$
such that there exists an aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$
that holds in $T$, and $Z$ contains the dimension attributes of $T$ that are
not in $\mathrm{X}$.

###### Definition 0 (Summarizable attribute).

Let $T(\textsc{S})$ be an analytic table,  A be an aggregable attribute of
$T$, and
$T_{1}=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{1})$
be a valid aggregate query over $T$. If for _any_ subset
$\mathrm{Z}_{2}\subset\mathrm{Z}_{1}$, there exists an applicable aggregate
function $\mathrm{\color[rgb]{0,0,0}{G}}$ such that the equation

(1)
$\displaystyle\mathpzc{Agg}_{T_{1}}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))\mid\mathrm{Z}_{2})=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{2})$

holds, then  A is said to be _summarizable in $T$ with respect to grouping set
$\mathrm{Z}_{1}$ and function $\mathrm{\color[rgb]{0,0,0}{F}}$ using function
$\mathrm{\color[rgb]{0,0,0}{G}}$_.

Attribute summarizability is related to the notion of distributive aggregation
functions, also called decomposable aggregation functions in (Jesus et al.,
2011).

###### Definition 0 (Distributive aggregation function).

Let $\mathrm{\color[rgb]{0,0,0}{F}}$ be an aggregation function applicable to
a set of domain values $\mathrm{V}$ and
$P=\\{\mathrm{V}_{1},\ldots,\mathrm{V}_{n}\\}$, $n\geq 1$ be a partitioning of
$\mathrm{V}$. If there exists an aggregate function
$\mathrm{\color[rgb]{0,0,0}{G}}$ such that
$\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{V}_{1}\cup\ldots\cup\mathrm{V}_{n})=\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{V}_{1})\cup\ldots\cup\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{V}_{n}))$
then $\mathrm{\color[rgb]{0,0,0}{F}}$ is said to be _distributive on
partitioning $P$_ using function $\mathrm{\color[rgb]{0,0,0}{G}}$.

If $\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$ on any partitioning of domain $\mathrm{V}$,
we say that $\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$ over domain $\mathrm{V}$. If
$\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$ over any domain $\mathrm{V}$, we say that
$\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$, and if
$\mathrm{\color[rgb]{0,0,0}{F}}=\mathrm{\color[rgb]{0,0,0}{G}}$, we simply say
that $\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive.

It is easy to show that functions $\mathrm{SUM},\mathrm{MIN}$ and
$\mathrm{MAX}$ are distributive, function $\mathrm{COUNT}$ is distributive
using function $\mathrm{SUM}$ whereas function $\mathrm{COUNT\\_DISTINCT}$ is
distributive using function $\mathrm{SUM}$ only on partitionings where the
same value does not appear in two distinct partitions. Finally, function
$\mathrm{AVG}$ is distributive over all domains $V$ containing only two
elements or where all elements are identical.

###### Example 0.

For $V=\\{1,2,2,3\\}$ we have $\mathrm{COUNT\\_DISTINCT}(\mathrm{V})=3$. Then
$\mathrm{COUNT\\_DISTINCT}$ is distributive using $\mathrm{SUM}$ on
partitioning $P^{\prime}=\\{\\{1,2,2\\},\\{3\\}\\}$:

$\mathrm{SUM}(\mathrm{COUNT\\_DISTINCT}(\\{1,2,2\\}),\mathrm{COUNT\\_DISTINCT}\\{3\\}))=3$

However, $\mathrm{COUNT\\_DISTINCT}$ is not distributive using $\mathrm{SUM}$
on partitioning $P=\\{\\{1,2\\},\\{2,3\\}\\}$:

$\mathrm{SUM}(\mathrm{COUNT\\_DISTINCT}(\\{1,2\\}),\mathrm{COUNT\\_DISTINCT}(\\{2,3\\})=\mathrm{SUM}(2,3)=4$

We say that $\mathrm{\color[rgb]{0,0,0}{F}}$ is _distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$ on attribute  A of table $T$ with
partitioning attributes $\mathrm{Z}$_ if $\mathrm{\color[rgb]{0,0,0}{F}}$ is
distributive using function $\mathrm{\color[rgb]{0,0,0}{G}}$ on all partitions
of the values of  A in $T$ defined by $\mathrm{Z}$ and any subset of
$\mathrm{Z}$. The following proposition relates the definition of distributive
functions to the notion of summarizable attributes.

###### Proposition 0 (Function distributivity and attribute summarizability).

Let $T(\textsc{S})$ be an analytic table with dimension attributes
$\textsc{S}_{D}\subseteq\textsc{S}$ and an aggregable attribute  A such that
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$
holds in $T$. If $\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using
function $\mathrm{\color[rgb]{0,0,0}{G}}$ on attribute  A in table $T$ with
partitioning attributes $\mathrm{Z}\supseteq\textsc{S}_{D}-\mathrm{X}$ then  A
is summarizable with respect to grouping set $\mathrm{Z}$ and function
$\mathrm{\color[rgb]{0,0,0}{F}}$ using function
$\mathrm{\color[rgb]{0,0,0}{G}}$.

###### Proof.

Suppose that
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$
holds in $T$ and
$T_{1}=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{1})$
and $\mathrm{\color[rgb]{0,0,0}{F}}$ is _distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$ on attribute  A of table $T$ with
partitioning attributes $\mathrm{Z}_{1}$_. To prove that  A is summarizable in
$T$ with respect to grouping set $\mathrm{Z}_{1}$ and
$\mathrm{\color[rgb]{0,0,0}{F}}$ using function
$\mathrm{\color[rgb]{0,0,0}{G}}$, we prove that for any subset
$\mathrm{Z}_{2}\subset\mathrm{Z}_{1}$, the following equation holds:

(2)
$\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{2})=\mathpzc{Agg}_{T_{1}}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))\mid\mathrm{Z}_{2})$

First, it is obvious that both tables $T$ and $T_{1}$ contain the same
$\mathrm{Z}_{2}$ values and therefore, the result tables in Eq. 2 contain the
same tuples with distinct $\mathrm{Z}_{2}$ values. We now show that for each
pair of tuples
$t\in\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{2})$
and
$t^{\prime}\in\mathpzc{Agg}_{T_{1}}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))\mid\mathrm{Z}_{2})$
where $t.\mathrm{Z}_{2}=t^{\prime}.\mathrm{Z}_{2}$, we have
$t.\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})=t^{\prime}.\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))$.
Let $x=t.\mathrm{Z}_{2}=t^{\prime}.\mathrm{Z}_{2}$ and
$T^{x}=\sigma_{\mathrm{Z}_{2}=t.\mathrm{Z}_{2}}(T)$ and
$T_{1}^{x}=\sigma_{\mathrm{Z}_{2}=t.\mathrm{Z}_{2}}(T_{1})$ be the partitions
of $T$ and $T_{1}$ on attributes $\mathrm{Z}_{2}$ corresponding to the tuples
used to compute
$t.\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$. For each tuple
$t^{\prime}_{i}\in T_{1}^{x}$ there also exists a partition
$T^{y_{i}}=\sigma_{\mathrm{Z}_{1}=y_{i}}(T)$ of $T$ where
$y_{i}=t^{\prime}_{i}.\mathrm{Z}_{1}$ and
$t_{i}^{\prime}.\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})=\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{y_{i}}))$.
All tuples $t^{\prime}_{i}$ have the same $\mathrm{Z}_{2}$ value
$x=t.\mathrm{Z}_{2}$ and are aggregated to tuple $t^{\prime}$ whose value for
attribute
$t^{\prime}.\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))=\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{A}(T^{y_{1}})\cup\ldots\cup\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{y_{n}})$.
Since $\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using function
$\mathrm{\color[rgb]{0,0,0}{G}}$ and $T^{x}=T^{y_{1}}\cup\ldots\cup
T^{y_{n}}$, we obtain
$\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{y_{1}})\cup\ldots\cup\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{y_{n}}))=\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{y_{1}})\cup\ldots\cup\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{y_{n}}))=\mathrm{\color[rgb]{0,0,0}{F}}(\pi_{\mathrm{\scalebox{0.8}{A}}}(T^{x}))$.
We conclude $t.\mathrm{Z}_{2}=t^{\prime}.\mathrm{Z}_{2}$ and
$t.\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})=t^{\prime}.\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))$.
∎

###### Example 0.

Function $\mathrm{COUNT}$ is distributive using function $\mathrm{SUM}$.
Therefore,  PROD_SKU in table $\mathrm{{PRODUCT\\_LIST}}$ (Table 15 on Table
15) is summarizable with respect to grouping set
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$
and $\mathrm{COUNT}$ using function $\mathrm{SUM}$. Thus, if
$\mathrm{Z}_{2}=\\{\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$
and
$T_{1}=\mathpzc{Agg}_{PRODUCT\\_LIST}(\mathrm{COUNT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})\mid\mathrm{Z})$,
the following equation folds:

$\mathpzc{Agg}_{PRODUCT\\_LIST}(\mathrm{COUNT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})\mid\mathrm{Z}_{2})=\mathpzc{Agg}_{T_{1}}(\mathrm{SUM}(\mathrm{COUNT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}}))\mid\mathrm{Z}_{2})$

However, as explained before, $\mathrm{COUNT\\_DISTINCT}$ is only distributive
using $\mathrm{SUM}$ if no pair of partitions share the same value. This is
not the case (there exist two partitions of $Z$ with the same product ”cz-
tshirt-s”), so attribute  PROD_SKU is not summarizable with respect to
grouping set $Z$ and function $\mathrm{COUNT\\_DISTINCT}$.

Function distributivity is a sufficient but not a necessary condition for
summarizability. This is illustrated in the following proposition, which
defines a sufficient condition for summarizability with
$\mathrm{COUNT\\_DISTINCT}$ and $\mathrm{SUM}$.

###### Proposition 0 (Summarizability with $\mathrm{COUNT\\_DISTINCT}$ and
$\mathrm{SUM}$).

Let $T(\textsc{S})$ be an analytic table with a set of dimension attributes
$\textsc{S}_{{D}}$ and an aggregable attribute  A . Let
$T_{1}=\mathpzc{Agg}_{T}(\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{1})$
be a valid aggregate query over $T$, where
$\mathrm{Z}_{1}\subseteq\textsc{S}_{{D}}$. If
$\mathrm{Z}_{2}\subset\mathrm{Z}_{1}$ and the literal functional dependency
$\mathrm{Z}_{2}\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Z}_{1}$
holds in $T$, the following equation is true:

(3)
$\mathpzc{Agg}_{T_{1}}(\mathrm{SUM}(\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{A}}))\mid\mathrm{Z}_{2})=\mathpzc{Agg}_{T}(\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{2})$

We say that attribute  A (in $T$) is summarizable with respect to grouping set
$\mathrm{Z}_{1}$ and $\mathrm{COUNT\\_DISTINCT}$ using function $\mathrm{SUM}$
_with partitioning attributes $\mathrm{Z}_{2}$_.

###### Proof.

The previous proposition mainly states that  A is summarizable with respect to
$\mathrm{Z}_{1}$ and $\mathrm{COUNT\\_DISTINCT}$ using function $\mathrm{SUM}$
with partitioning attributes $\mathrm{Z}_{2}$ if all tuples $T$ in some
partition $T^{x}\subseteq T$ defined by attributes
$\mathrm{Z}_{2}\subseteq\mathrm{Z}_{1}$ which have the same value for
attribute $t.\mathrm{\scalebox{0.8}{A}}$ are assigned to the _same partition_
$T^{y}\subseteq T$ defined by attributes $\mathrm{Z}_{1}$. This avoids the
double counting of distinct  A values when taking the $\mathrm{SUM}$ of
$\mathrm{COUNT\\_DISTINCT}$ over the partitions generated by attributes
$\mathrm{Z}_{1}$.

We first show by contradiction that when
$\mathrm{Z}_{2}\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Z}_{1}-\mathrm{Z}_{2}$
holds in $T$, all tuples $T$ in some partition $T^{x}\subseteq T$ of $T$
generated by attributes $\mathrm{Z}_{2}$ with the same value for attribute
$t.\mathrm{\scalebox{0.8}{A}}$ are assigned to the same partition
$T^{y}\subseteq T$ generated by attributes $\mathrm{Z}_{1}$.

Let $T^{x}$ be a partition of $T$ which contains all tuples $T$ such that
$t.\mathrm{Z}_{2}=x$. Since $\mathrm{Z}_{2}\subset\mathrm{Z}_{1}$, $T^{x}$ is
the union of a set of partitions $T^{y}_{0}\ldots,T^{y}_{n}$, $n\geq 0$ of $T$
defined by attributes $\mathrm{Z}_{1}$. Suppose that there exist two tuples
$t\in T^{y}_{i}$ and $t^{\prime}\in T^{y}_{j}$ where $i\neq j$ and
$t.\mathrm{\scalebox{0.8}{A}}=t^{\prime}.\mathrm{\scalebox{0.8}{A}}$. Then, we
have $t.\mathrm{Z}_{2}=t^{\prime}.\mathrm{Z}_{2}=x$,
$t.\mathrm{\scalebox{0.8}{A}}=t^{\prime}.\mathrm{\scalebox{0.8}{A}}$ and,
since $i\neq j$, $t.\mathrm{Z}_{1}\neq t^{\prime}.\mathrm{Z}_{1}$ (two
different partitions generated by $\mathrm{Z}_{1}$ contain the same values for
$\mathrm{Z}_{2}$ and  A ). This is in contradiction with
$\mathrm{Z}_{2}\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Z}_{1}-\mathrm{Z}_{2}$.
Then, if $d_{i}$ is the number of distinct  A values in some partition
$T^{x}_{i}\subseteq T$, we can easily show that $\sum_{i=0}^{n}d_{i}$ is the
number of distinct  A values in partition $V$. ∎

Observe that if Eq. 3 holds for any subset
$\mathrm{Z}_{2}\subset\mathrm{Z}_{1}$,  A is summarizable with respect to
grouping set $\mathrm{Z}_{1}$ and $\mathrm{COUNT\\_DISTINCT}$ using function
$\mathrm{SUM}$ (Definition 4.1).

###### Example 0.

Let
$T_{1}=\mathpzc{Agg}_{\mathrm{{PRODUCT\\_LIST}}}(\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})\mid\mathrm{Z}_{1})$
where
$\mathrm{Z}_{1}=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}}\\}$.
Attribute  PROD_SKU is not summarizable with respect to grouping set $Z_{1}$
and function $\mathrm{COUNT\\_DISTINCT}$ using $\mathrm{SUM}$. However, if
$\mathrm{\scalebox{0.8}{PROD\\_SKU}}\mapsto\mathrm{\scalebox{0.8}{COUNTRY}}$
holds in table $\mathrm{{PRODUCT\\_LIST}}$, then for
$\mathrm{Z}_{2}=\\{\mathrm{\scalebox{0.8}{BRAND}}\\}$ and
$\mathrm{\scalebox{0.8}{A}}=\mathrm{\scalebox{0.8}{PROD\\_SKU}}$, we have
$\\{\mathrm{\scalebox{0.8}{PROD\\_SKU}},\mathrm{\scalebox{0.8}{BRAND}}\\}\mapsto\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}}\\}$.
Therefore,  PROD_SKU is summarizable with respect to $\mathrm{Z}_{1}$ and
$\mathrm{COUNT\\_DISTINCT}$ using function $\mathrm{SUM}$ with partitioning
attribute $\mathrm{Z}_{2}=\\{\mathrm{\scalebox{0.8}{BRAND}}\\}$.

###  4.2. Controlling attribute summarizability using aggregable properties

Given the result of an aggregate query
$T_{1}=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{1})$
over some attribute  A , we want to control the possible aggregations of
attribute $\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$
depending on the summarizability of  A . We use aggregable properties for that
purpose, as shown on Figure 10. We want to automatically compute the subset of
dimension attributes $\mathrm{X}^{\prime}\subseteq\mathrm{Z}_{1}$ of $T_{1}$
such that
$\mathbf{agg}_{\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})}(\mathrm{\color[rgb]{0,0,0}{G}},\mathrm{X}^{\prime})$
holds in $T_{1}$, for some function $\mathrm{\color[rgb]{0,0,0}{G}}$ that is
applicable to $\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$,
and which guarantees the summarizability of  A in $T_{1}$ for any
$\mathrm{Z}_{2}$ such that
$\mathrm{Z}_{1}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}_{2}$. Our rationale is
therefore to refine the propagation rules introduced in Section 3.3 to take
into account the summarizability correctness criteria.

Figure 10. Aggregable property that controls the summarizability of $A$ in $T$
with respect to grouping set $Z_{1}$

We next define the notion of summarizability preserving aggregable property
which formalizes Figure 10.

###### Definition 0 (Summarizability preserving aggregable property).

Let $T(\textsc{S})$ be an analytic table and
$T_{1}=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{1})$
be the result of a valid aggregate query. We say that
$\mathbf{agg}_{\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})}(\mathrm{\color[rgb]{0,0,0}{G}},\mathrm{X}^{\prime})$
_preserves the summarizability of A with respect to grouping set
$\mathrm{Z}_{1}$_ if for any subset $\mathrm{Z}_{2}$ such that
$\mathrm{Z}_{1}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}_{2}$, attribute  A is
summarizable in $T$ with respect to grouping set $\mathrm{Z}_{2}$ and function
$\mathrm{\color[rgb]{0,0,0}{F}}$ using $\mathrm{\color[rgb]{0,0,0}{G}}$.

The next proposition uses Proposition 4.4 and Proposition 4.6 to refine the
previous propagation rule for aggregation in Table 19 so that summarizability
preserving aggregable properties are inferred. The refined rule for the case
when $\mathrm{\scalebox{0.8}{A}}^{\prime}=\mathrm{\color[rgb]{0,0,0}{F}}(A)$
is displayed in Table 23.

Table 23. Propagation rule for aggregate operation preserving summarizability Query on $T(\textsc{S})$ |  New propagation rule for inferring the aggregable properties of new measure attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}$ in the result $T_{r}(S_{r})$ |  _User action_
---|---|---
$\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Y})$ |  new measure attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}=\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: if $\mathrm{\color[rgb]{0,0,0}{G}}$ can be applied on $\mathrm{\scalebox{0.8}{A}}^{\prime}$ (Table 16) and $\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using $\mathrm{\color[rgb]{0,0,0}{G}}$ then $\mathbf{agg}_{\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})}(\mathrm{\color[rgb]{0,0,0}{G}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cap\mathrm{Y}$, $\mathrm{X}^{\prime}_{d}=$ fact identifier in $T_{r}$ and $\mathrm{X}^{\prime}_{f}=\emptyset$. |  _Minimize $\mathrm{X}^{\prime}_{d}$_ _Complete $\mathrm{X}^{\prime}_{f}$_
|  if $\mathrm{\color[rgb]{0,0,0}{F}}=\mathrm{COUNT\\_DISTINCT}$ and $\mathrm{X}^{\prime}$ is a _maximal_ subset of $\mathrm{X}\cap\mathrm{Y}$ such that $(\mathrm{Y}-\mathrm{X}^{\prime})\cup\\{A\\}\mapsto\mathrm{Y}$ holds in $T$ then $\mathbf{agg}_{\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})}(\mathrm{SUM},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}_{d}=$ fact identifier in $T_{r}$ and $\mathrm{X}^{\prime}_{f}=\emptyset$. |  _Minimize $\mathrm{X}^{\prime}_{d}$_ _Complete $\mathrm{X}^{\prime}_{f}$_

###### Proposition 0 (Propagation of aggregable properties with
summarizability preservation).

Let $T(\textsc{S})$ be an analytic table with dimension attributes
$\textsc{S}_{D}\subseteq\textsc{S}$ and let
$T_{r}=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Y})$
be the result of a valid aggregate query. Then the aggregable properties
inferred by the rule of Table 23 when
$\mathrm{\scalebox{0.8}{A}}^{\prime}=F(A)$ preserve the summarizability of  A
with respect to grouping set $\mathrm{Y}$.

###### Proof.

By Definition 4.8, we have to show that for any subset
$\mathrm{Z}_{2}\subseteq\mathrm{Y}$ such that
$\mathrm{Y}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}_{2}$, attribute  A is
summarizable in $T$ with respect to $\mathrm{Z}_{2}$ and function
$\mathrm{\color[rgb]{0,0,0}{F}}$ using $\mathrm{\color[rgb]{0,0,0}{G}}$. We
examine both cases of Proposition 4.9:

  * •

$\mathrm{\color[rgb]{0,0,0}{G}}$ can be applied on
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ as defined in Table 16 and
$\mathrm{\color[rgb]{0,0,0}{F}}$ is distributive using
$\mathrm{\color[rgb]{0,0,0}{G}}$: Since $\mathrm{\color[rgb]{0,0,0}{F}}$ is
distributive using function $\mathrm{\color[rgb]{0,0,0}{G}}$, it is also
distributive on attribute  A with partitioning attributes $\mathrm{Y}$. Then,
by Proposition 4.4,  A is summarizable with respect to $\mathrm{Y}$ and
$\mathrm{\color[rgb]{0,0,0}{F}}$ using function
$\mathrm{\color[rgb]{0,0,0}{G}}$, and Equation 1 in Definition 4.1 holds for
any subset $\mathrm{Z}_{2}\subseteq\mathrm{Y}$.

  * •

$\mathrm{\color[rgb]{0,0,0}{F}}=\mathrm{COUNT\\_DISTINCT}$ and
$\mathrm{X}^{\prime}$ is a _maximal_ subset of $\mathrm{X}\cap\mathrm{Y}$ such
that $(\mathrm{Y}-\mathrm{X}^{\prime})\cup\\{A\\}\mapsto\mathrm{Y}$ holds in
$T$: By Proposition 4.6, it is sufficient to show that
$\mathrm{Z}_{2}\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Y}$ for all
$\mathrm{Z}_{2}$ where
$\mathrm{Y}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}_{2}\subset\mathrm{X}\cap\mathrm{Y}$.
Since
$(\mathrm{Y}-\mathrm{X}^{\prime})\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Y}$
and $\mathrm{Y}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}_{2}$ we also have
$\mathrm{Z}_{2}\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Y}$.

∎

For the second condition in Table 23, observe that there might exist several
maximal subsets of attributes $\mathrm{X}^{\prime}_{i}$. The process to
compute these subsets is quite simple. Each maximal subset
$\mathrm{X}^{\prime}_{i}$ corresponds to a _minimal subset_ of attributes
$K_{i}=\mathrm{Y}-\mathrm{X}^{\prime}_{i}\subset\mathrm{Y}$ such that
$K_{i}\cup\\{A\\}$ determines all attributes of $\mathrm{Y}$. These sets
$\mathrm{K}_{i}$ can easily be computed using the attribute graphs of the
corresponding dimensions to obtain
$\mathrm{X}^{\prime}_{i}=(\mathrm{Y}\cap\mathrm{X})-\mathrm{K}_{i}$.

###### Example 0.

Aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{PROD\\_SKU}}}(\mathrm{COUNT}\mid\mathrm{X})$
holds in table $\mathrm{{PRODUCT\\_LIST}}$ (Table 8(e)) for
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$.
Let
$T_{r}=\mathpzc{Agg}_{\mathrm{{PRODUCT\\_LIST}}}(\mathrm{COUNT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})\mid\mathrm{Y})$,
where
$\mathrm{Y}=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$.

By the first condition in Table 23 and distributivity of $\mathrm{COUNT}$
using $\mathrm{SUM}$, the aggregable property
$\mathbf{agg}_{\mathrm{COUNT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})}(\mathrm{SUM}\mid\mathrm{X}^{\prime})$,
where
$\mathrm{X}^{\prime}=\mathrm{X}\cap\mathrm{Y}=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$,
preserves the summarizability of  PROD_SKU with respect to grouping set
$\mathrm{Y}$.

###### Example 0.

Property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{PROD\\_SKU}}}(\mathrm{COUNT\\_DISTINCT}\mid\mathrm{X})$
holds in table $\mathrm{{PRODUCT\\_LIST}}$ for
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{BRAND}},\allowbreak\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$.
Let
$T_{r}=\mathpzc{Agg}_{\mathrm{{PRODUCT\\_LIST}}}(\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})\mid\mathrm{Y})$
where
$\mathrm{Y}=\\{\mathrm{\scalebox{0.8}{BRAND}},\allowbreak\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$.
By the second condition in Table 23, we must compute the maximum subset
$\mathrm{X}^{\prime}$ of $\mathrm{X}\cap\mathrm{Y}$ such that
$(\mathrm{Y}-\mathrm{X}^{\prime})\cup\\{\mathrm{\scalebox{0.8}{A}}\\}\mapsto\mathrm{Y}$.
We use the method explained before. By the attribute graphs of dimension
${TIME}$ and ${PROD}$, the only LFD which holds among the attributes of
$\mathrm{Y}$ is
$\mathrm{\scalebox{0.8}{BRAND}}\mapsto\mathrm{\scalebox{0.8}{COUNTRY}}$. Thus,
there is a single minimal set
$K=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{YEAR}}\\}$ such
that $K\cup\\{\mathrm{\scalebox{0.8}{PROD\\_SKU}}\\}$ determines all
attributes in $\mathrm{Y}$. We obtain that
$\mathrm{X}^{\prime}=\mathrm{Y}-K=\\{\mathrm{\scalebox{0.8}{COUNTRY}}\\}$.
Hence,
$\mathbf{agg}_{\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})}(\mathrm{SUM}\mid\\{\mathrm{\scalebox{0.8}{COUNTRY}}\\})$
preserves the summarizability of  PROD_SKU with respect to grouping set
$\mathrm{Y}$.

Aggregable properties provide ”explanations” for end users of which aggregate
queries preserve the summarizability condition of the aggregated attribute in
a given stage of the data analysis session. In the previous example, the
aggregable property
$\mathbf{agg}_{\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})}(\mathrm{SUM}\mid\\{\mathrm{\scalebox{0.8}{COUNTRY}}\\})$
of $T_{r}$ explains that table $T_{r}$ can be used to count the number of
distinct products per brand _and_ year by taking the sum of
$\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})$ along
COUNTRY . However, $T_{r}$ cannot be used to obtain the number of distinct
products by brand _or_ by year. In this case, the user must ”backtrack” in the
interactive data analysis session to the table $\mathrm{{PRODUCT\\_LIST}}$ to
obtain this number.

###  4.3. Generalized attribute summarizability

In the previous sections, as illustrated in Figure 9, we defined an attribute
A in some table $T$ to be summarizable with respect to some aggregate query
$\mathpzc{Q}\,(T)=\mathpzc{Agg}_{\mathrm{{T}}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{1})$
and function $\mathrm{\color[rgb]{0,0,0}{F}}$ using
$\mathrm{\color[rgb]{0,0,0}{G}}$, if for any query
$\mathpzc{Q}\,^{\prime}(T)=\mathpzc{Agg}_{\mathrm{{T}}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}_{2})$
aggregating  A along a subset $\mathrm{Z}_{2}$ of $\mathrm{Z}_{1}$, there
exists an _equivalent_ aggregate query
$\mathpzc{Q}\,^{\prime\prime}(T_{1})=\mathpzc{Agg}_{\mathrm{{T_{1}}}}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))\mid\mathrm{Z}_{2})$
on the result $T_{1}$ of $\mathpzc{Q}\,(T)$. Definition 4.12 generalizes this
notion to any analytic query $\mathpzc{Q}\,$ as follows.

###### Definition 0 (Generalized summarizable attribute).

Let $T(\textsc{S})$ be an analytic table that is the input of an analytic
query $\mathpzc{Q}\,$ returning a table $T_{1}(\textsc{S}_{1})$. Let  A be an
aggregable attribute of both $T$ and $T_{1}$ and $\mathrm{Z}$ be a subset of
the dimension attributes of $\textsc{S}\cap\textsc{S}_{1}$. If for any two
valid aggregate queries
$\mathpzc{Q}\,^{\prime}(T)=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}^{\prime})$
and
$\mathpzc{Q}\,^{\prime}(T_{1})=\mathpzc{Agg}_{T_{1}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Z}^{\prime})$
such that $\mathrm{Z}\subseteq\mathrm{Z}^{\prime}$, and any two tuples
$t_{1}\in\mathpzc{Q}\,^{\prime}(T)$ and
$t_{2}\in\mathpzc{Q}\,^{\prime}(T_{1})$, we have:

$t_{1}.\mathrm{Z}^{\prime}\equiv t_{2}.\mathrm{Z}^{\prime}\Rightarrow
t_{1}.\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})\equiv
t_{2}.\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$

then  A is said to be _G-summarizable_ in $T$ with respect to query
$\mathpzc{Q}\,$, grouping set $\mathrm{Z}$ and function
$\mathrm{\color[rgb]{0,0,0}{F}}$.

Figure 11. G-summarizable attribute $A$ in $T$ with respect to $Q$, grouping
set $Z$ and function $F$

The above definition is illustrated in Figure 11. We make a few observations.
First, $T_{2}$ and $T^{\prime}_{2}$ are not necessarily equal, _i.e_. $T_{2}$
might contain tuples that are not in $T^{\prime}_{2}$ and vice versa. Second,
in Section 3.3, we established the propagation rules to compute the aggregable
properties on  A that hold in $T_{1}$ for $\mathrm{\color[rgb]{0,0,0}{F}}$,
which are used in the definition to determine which aggregate queries
$\mathpzc{Q}\,^{\prime}$ on $T_{1}$ are valid. Third, an implicit assumption
is that  A is an attribute that exists in both $T$ and $T_{1}$. Therefore, in
the case of an aggregate or a pivot query $\mathpzc{Q}\,$,  A must be a
dimension attribute (since measure attributes of $T$ do not exist anymore in
$T_{1}$ \- they have either been aggregated, pivoted or eliminated). Finally,
grouping set $\mathrm{Z}$ defines a set of attributes that must be contained
in $\mathrm{Z}^{\prime}$ and implicitly restricts the attributes along which
aggregation can be done in $\mathpzc{Q}\,^{\prime}$.

Before formalizing sufficient conditions for G-summarizability, we present a
few examples.

###### Example 0.

Consider a fact table $T$ (in Table 24) defined over two dimension ${D}_{1}$
and ${D}_{2}$ with dimension attributes
$\mathrm{\scalebox{0.8}{A}}_{1},\mathrm{\scalebox{0.8}{A}}_{2},\mathrm{\scalebox{0.8}{A}}_{3}$
from dimension ${D}_{1}$ (where $\mathrm{\scalebox{0.8}{A}}_{1}\preccurlyeq
A_{2}\preccurlyeq A_{3}$) and
$\mathrm{\scalebox{0.8}{B}}_{1},\mathrm{\scalebox{0.8}{B}}_{2}$ from dimension
${D}_{2}$ (where $B_{1}\preccurlyeq B_{2}$). We shall say that within table
$T$, $\mathrm{\scalebox{0.8}{A}}_{3}$ is the _highest_ attribute of ${D}_{1}$
while $B_{2}$ is the _highest_ attribute of $D_{2}$.

Table 24. G-summarizability in $T$ with respect to a filter query

$T$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M
---|---|---|---|---|---|---
$t_{0}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{1}$
$t_{1}$ | $a_{2}$ | $b_{2}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{2}$
$t_{2}$ | $a_{3}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{3}$
$t_{3}$ | $a_{2}$ | $b_{1}$ | $c_{2}$ | $f_{2}$ | $e_{1}$ | $x_{4}$

$\mathpzc{Q}\,_{1}(T)$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M
---|---|---|---|---|---|---
$t_{0}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{1}$
$t_{1}$ | $a_{2}$ | $b_{2}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{2}$
$t_{2}$ | $a_{3}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{3}$

$\mathpzc{Q}\,_{2}(T)$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M
---|---|---|---|---|---|---
$t_{2}$ | $a_{3}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{3}$
$t_{3}$ | $a_{2}$ | $b_{1}$ | $c_{2}$ | $f_{2}$ | $e_{1}$ | $x_{4}$

Take query
$\mathpzc{Q}\,_{1}(T)=\mathpzc{Filter}_{T}(\\{\mathrm{\scalebox{0.8}{A}}_{3}=c_{1}\\}\mid\\{\mathrm{\scalebox{0.8}{A}}_{3}\\})$
whose result table $T_{1}$ is displayed in Table 24. If we take a grouping set
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{A}}_{3}\\}$, then for each partition
$T^{p}=\sigma_{\mathrm{\scalebox{0.8}{A}}_{3}=p}(T)$ of $T$ we either have
$\mathpzc{Q}\,_{1}(T^{p})=T^{x}$ or $\mathpzc{Q}\,_{1}(T^{p})=\emptyset$. In
our example, we have: $\mathpzc{Q}\,_{1}(T^{c_{1}})=T^{c_{1}}$ and
$\mathpzc{Q}\,_{1}(T^{c_{2}})=\emptyset$. Thus, for any subset
$\mathrm{Z}^{\prime}$ of dimension attributes of $T$ containing
$\mathrm{\scalebox{0.8}{A}}_{3}$, we either have
$\Pi_{\mathrm{Z}^{\prime}}(\mathpzc{Q}\,_{1}(T^{p}))=\Pi_{\mathrm{Z}^{\prime}}(T^{p})$
or $\Pi_{\mathrm{Z}^{\prime}}(\mathpzc{Q}\,_{1}(T^{p}))$ is empty, where $\Pi$
is a projection without duplicate elimination. Therefore, any valid
aggregation query with grouping attributes $\mathrm{Z}^{\prime}$ containing
$\mathrm{\scalebox{0.8}{A}}_{3}$ returns, for each partition of $T_{1}$
defined by $\mathrm{Z}^{\prime}$, the same result as for the corresponding
partition of $T$ defined by $\mathrm{Z}^{\prime}$. Hence, any attribute  A is
G-summarizable in $T$ with respect to query $\mathpzc{Q}\,_{1}$, grouping set
$\mathrm{Z}=\\{A_{3}\\}$ and any function $\mathrm{\color[rgb]{0,0,0}{F}}$
applicable to  A in $T$. Observe that this is not the case for any other
grouping set $Z$ that does not contain attribute
$\mathrm{\scalebox{0.8}{A}}_{3}$. For instance, if
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{A}}_{2}\\}$ then for partition
$T^{b_{1}}$, $\mathpzc{Q}\,_{1}(T^{b_{1}})\neq T^{b_{1}}$.

However, the previous reasoning does not apply if $T$ is filtered on a measure
attribute  M , like in query
$\mathpzc{Q}\,_{2}(T)=\mathpzc{Filter}_{T}(\\{\mathrm{\scalebox{0.8}{M}}\in\\{x_{3},x_{4}\\}\\}\mid\\{\mathrm{\scalebox{0.8}{M}}\\})$.
Since a measure attribute cannot belong to the grouping set of an aggregate
query, we cannot define a partitioning set
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{M}}\\}$. Then, to identify a set of
dimension attributes $\mathrm{Z}$ such that all attributes  A are
G-summarizable in $T$ with respect to query $\mathpzc{Q}\,_{2}$, grouping set
$\mathrm{Z}$ and an applicable function $\mathrm{\color[rgb]{0,0,0}{F}}$, we
must find a set of dimension attributes $\mathrm{Z}$ that partitions $T$ into
$\mathpzc{Q}\,_{2}(T)$ and $T-\mathpzc{Q}\,_{2}(T)$. In our example,
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{B}}_{1}\\}$ would be a possible solution
that cannot be easily found.

###### Example 0.

Consider now the fact tables $T$ and $T^{\prime}$ defined over the same
dimensions ${D}_{1}$ and $D_{2}$ as before, as shown below in Table 25. Take
the left-merge query
$\mathpzc{Q}\,(T,T^{\prime})=T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie}_{\mathrm{Y}}T^{\prime}=T_{1}$
where $\mathrm{Y}=\\{A_{1},A_{2},B_{1},B_{2}\\}$. Any attribute  A of $T$ is
G-summarizable in $T$ with respect to $\mathpzc{Q}\,$, grouping set
$\mathrm{Z}=\emptyset$, and any function $\mathrm{\color[rgb]{0,0,0}{F}}$
applicable to  A , because the duplicate preserving projection of $T_{1}$ on
the attributes of $T$ is equal to table $T$.

Let us look at the G-summarizability of attributes in $T^{\prime}$ with
respect to $\mathpzc{Q}\,$ and $\mathrm{\color[rgb]{0,0,0}{F}}$. First,
grouping set
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{A}}_{2},\mathrm{\scalebox{0.8}{B}}_{2}\\}$
containing the ”highest” attributes in $\mathrm{Y}$ defines two partitions of
$T^{\prime}$. We can see that partition $T^{\prime b_{1},e_{1}}$ is different
from the duplicate-preserving projection of $T_{1}^{b_{1},e_{1}}$ on the
attributes of $T^{\prime}$ (tuples $t_{3}$, $t_{4}$ of $T^{\prime}$ have no
corresponding tuples in $T_{1}$). So, any valid aggregation query over a
partitioning on $Z$ would violate the G-summarizability property. Indeed, the
only grouping set $\mathrm{Z}$ for which we have the equality of non-empty
partitions is $\mathrm{Z}=\\{A_{1},A_{2},B_{1},B_{2}\\}$. We shall see later
that if a valid aggregation can be expressed over $Y$ in $T^{\prime}$ then $Z$
can be equal to $Y$.

Table 25. G-summarizability in $T$ with respect to a left-merge query

$T$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M
---|---|---|---|---|---
$t_{0}$ | $a_{1}$ | $b_{1}$ | $f_{2}$ | $e_{1}$ | $x_{1}$
$t_{1}$ | $a_{4}$ | $b_{2}$ | $f_{4}$ | $e_{2}$ | $x_{2}$

$T^{\prime}$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ | $\mathrm{\scalebox{0.8}{M}}^{\prime}$
---|---|---|---|---|---|---
$t_{3}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $y_{1}$
$t_{4}$ | $a_{2}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $y_{3}$
$t_{5}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{3}$ | $y_{4}$
$t_{6}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $y_{5}$

$T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie}T^{\prime}$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M | $\mathrm{\scalebox{0.8}{M}}^{\prime}$
---|---|---|---|---|---|---|---
$t_{10}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{1}$ | $y_{5}$
$t_{11}$ | $a_{4}$ | $b_{2}$ | - | $f_{4}$ | $e_{2}$ | $x_{2}$ | -

Now take the same left-merge query $\mathpzc{Q}\,$ as before applied to the
tables displayed in Table 26. For grouping set
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{A}}_{2},\mathrm{\scalebox{0.8}{B}}_{2}\\}$,
the partition of $T^{\prime}$ with values $(b_{1},e_{1})$ has a corresponding
identical partition in $T_{1}$ after a duplicate-preserving projection on the
attributes of $T^{\prime}$. The partition of $T^{\prime}$ with values
$(b_{1},e_{3})$ has a corresponding empty partition in $T_{1}$. However, the
partition of $T_{1}$ with values $(b_{2},e_{1})$ has one extra tuple with
respect to the corresponding partition in $T^{\prime}$ because tuple $t_{7}$
is matched by two tuples of $T$ and its attribute values appear duplicated in
$T_{1}$ (in tuples $t_{12}$ and $t_{13}$). Hence, for attributes of
$T^{\prime}$, G-summarizability in $T^{\prime}$ with respect to $Q$ and
grouping set
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{A}}_{2},\mathrm{\scalebox{0.8}{B}}_{2}\\}$
must be restricted to functions that are insensitive to duplicates (i.e.,
$\mathrm{COUNT\\_DISTINCT}$, $\mathrm{MIN}$, $\mathrm{MAX}$).

Finally, any attribute of $T$ is G-summarizable in $T$ with respect to
$\mathpzc{Q}\,$ and grouping set $\mathrm{Z}=\emptyset$ because the duplicate
preserving projection of $T_{1}$ on the attributes of $T$ is equal to $T$.
Thus, $T_{1}$ is aggregable over any partitioning of attributes of $T$.

Table 26. G-summarizability in $T^{\prime}$ with respect to a left-merge query

$T$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M
---|---|---|---|---|---|---
$t_{0}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{1}$
$t_{1}$ | $a_{2}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{2}$
$t_{2}$ | $a_{3}$ | $b_{2}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{3}$
$t_{3}$ | $a_{3}$ | $b_{2}$ | $c_{2}$ | $f_{2}$ | $e_{1}$ | $x_{4}$
$t_{4}$ | $a_{4}$ | $b_{2}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{5}$

$T^{\prime}$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ | $\mathrm{\scalebox{0.8}{M}}^{\prime}$
---|---|---|---|---|---
$t_{5}$ | $a_{1}$ | $b_{1}$ | $f_{1}$ | $e_{1}$ | $y_{1}$
$t_{6}$ | $a_{2}$ | $b_{1}$ | $f_{1}$ | $e_{1}$ | $y_{2}$
$t_{7}$ | $a_{3}$ | $b_{2}$ | $f_{2}$ | $e_{1}$ | $y_{3}$
$t_{8}$ | $a_{2}$ | $b_{1}$ | $f_{3}$ | $e_{3}$ | $y_{4}$

$T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie}T^{\prime}$ | $\mathrm{\scalebox{0.8}{A}}_{1}$ | $\mathrm{\scalebox{0.8}{A}}_{2}$ | $\mathrm{\scalebox{0.8}{A}}_{3}$ | $\mathrm{\scalebox{0.8}{B}}_{1}$ | $\mathrm{\scalebox{0.8}{B}}_{2}$ |  M | $\mathrm{\scalebox{0.8}{M}}^{\prime}$
---|---|---|---|---|---|---|---
$t_{10}$ | $a_{1}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{1}$ | $y_{1}$
$t_{11}$ | $a_{2}$ | $b_{1}$ | $c_{1}$ | $f_{1}$ | $e_{1}$ | $x_{2}$ | $y_{2}$
$t_{12}$ | $a_{3}$ | $b_{2}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{3}$ | $y_{3}$
$t_{13}$ | $a_{3}$ | $b_{2}$ | $c_{2}$ | $f_{2}$ | $e_{1}$ | $x_{4}$ | $y_{3}$
$t_{14}$ | $a_{4}$ | $b_{2}$ | $c_{1}$ | $f_{2}$ | $e_{1}$ | $x_{5}$ | -

###### Proposition 0 (Queries satisfying G-summarizability).

Let $\mathpzc{Q}\,$ be a unary or binary analytic query with some input table
$T(S)$ returning a table $T_{1}(\textsc{S}_{1})$ and $S_{D}$ be the dimension
attributes in $S\cap\textsc{S}_{1}$. Let $\mathrm{Z}$ be a subset of $S_{D}$,
and $\mathrm{\scalebox{0.8}{A}}^{\prime}$ be an attribute in
$S\cap\textsc{S}_{1}$ such that
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$
and
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}_{1})$
hold in $T$ and $T_{1}$ respectively. Then, _the attribute
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ is G-summarizable in $T$ with respect to
query $\mathpzc{Q}\,$, grouping set $\mathrm{Z}$, and function
$\mathrm{\color[rgb]{0,0,0}{F}}$_ in the following cases:

_Unary queries:_

  1. (1)

$\mathpzc{Q}\,=\mathpzc{Filter}_{T}(P\mid\mathrm{Y})$, $\mathrm{Y}\subseteq
S_{D}$, $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S$ and
$\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$.

  2. (2)

$\mathpzc{Q}\,=\mathpzc{Project}_{T}(\mathrm{Y},f(\mathrm{Z}^{\prime})\rightarrow\mathrm{\scalebox{0.8}{M}})$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$ and
$\mathrm{Z}=S_{D}-\mathrm{X}_{1}$.

  3. (3)

$\mathpzc{Q}\,=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Y})$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$,
$\mathrm{Z}=\mathrm{Y}-\mathrm{X}_{1}$ and
$\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{MIN},\allowbreak\mathrm{MAX},\allowbreak\mathrm{COUNT\\_DISTINCT}\\}$.

  4. (4)

$\mathpzc{Q}\,=\mathpzc{Pivot}_{T}(\mathrm{\scalebox{0.8}{A}}\mid\mathrm{Y})$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in
S-\mathrm{Y}-\\{\mathrm{\scalebox{0.8}{A}}\\}$,
$\mathrm{Z}=S_{D}-\mathrm{X}_{1}-\mathrm{Y}-\\{\mathrm{\scalebox{0.8}{A}}\\})$
and
$\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{MIN},\allowbreak\mathrm{MAX},\allowbreak\mathrm{COUNT\\_DISTINCT}\\}$.

_Merge queries:_ In the following, let
$\mathrm{\mathrm{Y}}^{top}\subseteq\mathrm{Y}$ denote the subset of ”highest”
attributes in the set of join attributes $\mathrm{Y}$.

  1. (1)

$\mathpzc{Q}\,=T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie}_{\mathrm{Y}}T^{\prime}$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}$,
$\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}_{1}$ and if $\mathrm{Y}\not\mapsto
S_{r}$ then
$\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{MIN},\allowbreak\mathrm{MAX},\allowbreak\mathrm{COUNT\\_DISTINCT}\\}$.

  2. (2)

$\mathpzc{Q}\,=T\mathbin{\bowtie\mkern-5.8mu\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}}_{\mathrm{Y}}T^{\prime}$ or
$\mathpzc{Q}\,=T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie\mkern-5.8mu\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}}_{\mathrm{Y}}T^{\prime}$:

    1. (a)

If $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$ and for all non-empty
partitions $T^{\prime y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$ of
$T^{\prime}$, the corresponding partition
$T^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$ of $T$ is empty or
$\pi_{\mathrm{Y}}(T^{y})$ is equal to $\pi_{\mathrm{Y}}(T^{\prime y})$, then
$\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}_{1}\cup\mathrm{\mathrm{Y}}^{top}$

    2. (b)

If $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}-\mathrm{Y}$ and for all
non-empty partitions $T^{\prime y}=\sigma_{\mathrm{Y}=y}(T^{\prime})$ of
$T^{\prime}$ and corresponding partitions $T^{y}=\sigma_{\mathrm{Y}=y}(T)$ of
$T$, $\pi_{\mathrm{Y}}(T^{y})$ is a subset of $\pi_{\mathrm{Y}}(T^{\prime
y})$, then $\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}_{1}$.

    3. (c)

Otherwise, $\mathrm{Z}=(\textsc{S}_{D}-\mathrm{X}_{1})\cup\mathrm{Y}$.

In addition, for all cases, if $\mathrm{Y}\not\mapsto S_{r}$ then
$\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$.

  3. (3)

$\mathpzc{Q}\,=T\bowtie_{\mathrm{Y}}T^{\prime}$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}$: if for all non-empty
partitions $T^{\prime y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$ and
corresponding partitions $T^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$,
$\pi_{\mathrm{Y}}(T^{\prime y})$ contains $\pi_{\mathrm{Y}}(T^{y})$ then
$\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}_{1}\cup\mathrm{\mathrm{Y}}^{top}$ else
$\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$.

In addition, if $\mathrm{Y}\not\mapsto S_{r}$ then
$\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$.

_Set queries:_ In the following, let $\mathrm{\mathrm{Y}}^{top}\subseteq
S_{D}$ denote the set of ”highest” attributes in the set of dimension
attributes $S_{D}\subseteq S$ of $T$ and $T^{\prime}$.

  1. (1)

$\mathpzc{Q}\,=T\cup T^{\prime}$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}$ and if
$\pi_{\mathrm{\mathrm{Y}}^{top}}(T)\cap\pi_{\mathrm{\mathrm{Y}}^{top}}(T^{\prime})=\emptyset$,
then $\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{\mathrm{Y}}^{top}$.

  2. (2)

$\mathpzc{Q}\,=T-T^{\prime}$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}$ and if all partitions
$\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$ are equal to or disjoint with
$\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$, then
$\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{\mathrm{Y}}^{top}$.

###### Proof.

_Unary queries:_ We shall use symbol $\Pi$ to denote the duplicate preserving
projection and $\pi$ do denote duplicate eliminating projection. For each case
of a unary query $\mathpzc{Q}\,$ on some table $T$ producing a table $T_{1}$,
we first prove that, for any partition $T^{x}=\sigma_{\mathrm{Z}=x}(T)$ of $T$
and $T_{1}^{x}=\sigma_{\mathrm{Z}=x}(T_{1})$ of $T_{1}$, we have: (1)
$\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T_{1}^{x})=\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T^{x})$
(both partitions are equal modulo duplicates), or (2) $T^{x}$ is empty, or (3)
$T_{1}^{x}$ is empty. We call the previous condition the _G-summarizability
condition on $T$ and $T_{1}$ for $\mathrm{Z}$ and
$\mathrm{\scalebox{0.8}{A}}^{\prime}$_. If this condition holds, we can show
that $\mathrm{\scalebox{0.8}{A}}^{\prime}$ is G-summarizale in $T$ with
respect to $\mathpzc{Q}\,$, grouping set $\mathrm{Z}$ and
$\mathrm{\color[rgb]{0,0,0}{F}}$ as follows:

  * •

In case (1), if $\mathrm{Z}\mapsto\mathrm{\scalebox{0.8}{A}}^{\prime}$, then
$\Pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T_{1}^{x})=\Pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T^{x})$
(both partitions are identical including duplicates) and it is obvious that
any query, that aggregates $\mathrm{\scalebox{0.8}{A}}^{\prime}$ using
$\mathrm{\color[rgb]{0,0,0}{F}}$ grouped by $\mathrm{Z}^{\prime}$ containing
all attributes in $\mathrm{Z}$, produces the same result on $T$ and $T_{1}$
and the conditions for G-summarizability are fulfilled. Otherwise, if
$\mathrm{Z}\not\mapsto\mathrm{\scalebox{0.8}{A}}^{\prime}$,
$\mathrm{\color[rgb]{0,0,0}{F}}$ must be restricted to aggregation functions
that are not sensitive to duplicates
($\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$).

  * •

In cases (2) and (3), the aggregated value does not exist, respectively, in
the input table $T$ or the result table $T_{1}$. This is also sufficient for
satisfying the G-summarizability property.

Then, since
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}_{1})$
holds in $T_{1}$, any query that aggregates
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ using $\mathrm{\color[rgb]{0,0,0}{F}}$
grouped by $\mathrm{Z}^{\prime}$ containing all dimension attributes in
$S_{r}\cap S_{D}-\mathrm{X}_{1}$ is valid. Thus it is sufficient to show that
$\mathrm{Z}$ contains all dimension attributes in $S_{r}\cap
S_{D}-\mathrm{X}_{1}$. We call this condition the _aggregable property
condition_.

  1. (1)

Analytic filter $T_{1}=\mathpzc{Filter}_{T}(P\mid\mathrm{Y})$: By the
condition $\mathrm{Y}\subseteq S_{D}$, all attributes in $\mathrm{Y}$ are
dimension attributes. By $\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$ we
have $\mathrm{Y}\subseteq\mathrm{Z}$. Then for any non-empty partition
$T^{x}=\sigma_{\mathrm{Z}=x}(T)$ of $T$ we can show that if $P$ is true for
some tuple in $T^{x}$, it is true for _all_ tuples in $T^{x}$: $\mathrm{Z}$
contains all attributes of filtering predicate $P$ and we can show that for
all $\mathrm{Z}=x$ either $\mathrm{Z}=x\Rightarrow P(\mathrm{Y})$ or
$\mathrm{Z}=x\Rightarrow\neg P(\mathrm{Y})$. Therefore, the corresponding
partition
$T_{1}^{x}=\sigma_{\mathrm{Z}=x}(\mathpzc{Filter}_{T}(P\mid\mathrm{Y}))=\mathpzc{Filter}_{T}(P\wedge\mathrm{Z}=x\mid\mathrm{Z})$
is either empty or equal to $T^{x}$. Hence, for any $T^{x}$ and attribute
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ in $S$, we either have
$\Pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T_{1}^{x})=\Pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T^{x})$
(both partitions are identical with duplicates) or $T_{1}^{x}$ is empty.
Finally, the aggregable property condition holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$.

  2. (2)

Analytic projection
$T_{1}=\mathpzc{Project}_{T}(\mathrm{Y},f(\mathrm{Z}^{\prime})\rightarrow\mathrm{\scalebox{0.8}{M}})$:
By definition of analytic projection, for any subset
$\mathrm{X}\subseteq\mathrm{Y}$, we have
$\Pi_{\mathrm{X}}(T_{1})=\Pi_{\mathrm{X}}(T)$. Since
$\mathrm{Z}=S_{D}-\mathrm{X}_{1}\subseteq S_{D}\subseteq\mathrm{Y}$ and
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$, we have
$\Pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T_{1})=\Pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T)$.
Finally, the aggregable property condition holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}$.

  3. (3)

Analytic aggregate
$T_{1}=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Y})$:
By definition of aggregate queries, for any $\mathrm{X}\subseteq\mathrm{Y}$
and partition $T^{x}$, we have
$\pi_{\mathrm{X}}(T_{1}^{x})=\pi_{\mathrm{X},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T^{x})$
(duplicate eliminating projection). Since $\mathrm{Z}\subseteq\mathrm{Y}$ and
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$, we then have
$\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}}(T_{1}^{x})=\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}}(T^{x})$.
However, $T^{x}$ generally contains several tuples that are merged into a
single tuple in $T_{1}$. Therefore, $\mathrm{\color[rgb]{0,0,0}{F}}$ must be
restricted to functions that are not sensitive to duplicates
($\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$).
Finally, the aggregable property condition holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=\mathrm{Y}-\mathrm{X}_{1}\subseteq\mathrm{Z}=\mathrm{Y}-\mathrm{X}_{1}$.

  4. (4)

Analytic pivot
$T_{1}=\mathpzc{Pivot}_{T}(\mathrm{\scalebox{0.8}{A}}^{\prime}\mid\mathrm{Y})$:
We apply similar arguments as for aggregate queries on the remaining
attributes $\mathrm{Y}^{\prime}=S-\mathrm{Y}-\\{\mathrm{\scalebox{0.8}{A}}\\}$
in $T_{1}$. By definition of pivot queries, for any subset
$\mathrm{X}\subseteq\mathrm{Y}^{\prime}$ and partition $T^{x}$, we have
$\pi_{\mathrm{X}}(T_{1}^{x})=\pi_{\mathrm{X}}(T^{x})$ (duplicate eliminating
projection) and
$\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T_{1}^{x})=\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T^{x})$
in particular for $\mathrm{Z}\subseteq\mathrm{Y}^{\prime}$ and
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}^{\prime}$. However, in the
general case, $T^{x}$ contains several tuples that are merged into a single
tuple in $T_{1}$ and $\mathrm{\color[rgb]{0,0,0}{F}}$ must be restricted to
functions that are not sensitive to duplicates
($\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$).
Finally, the aggregable property condition holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{Y}-\mathrm{X}_{1}-\\{\mathrm{\scalebox{0.8}{A}}\\}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}-\mathrm{Y}-\\{\mathrm{\scalebox{0.8}{A}}\\}$.

_Merge queries:_ For merge queries $\mathpzc{Q}\,$ over two tables $T$ and
$T^{\prime}$ producing a table $T_{1}$, we also check the G-summarizability
condition and the aggregable property condition as for unary queries:

  * •

For any couple of partitions $T^{x}=\sigma_{\mathrm{Z}=x}(T)$ and
$T_{1}^{x}=\sigma_{\mathrm{Z}=x}(T_{1})$, either at least one of the two
partitions is empty or $\pi_{\textsc{S}}(T^{x})$ is equal to
$\pi_{\textsc{S}}(T_{1}^{x})$.

  * •

$\mathrm{Z}$ contains all dimension attributes in $S_{r}\cap
S_{D}-\mathrm{X}_{1}$.

  1. (1)

Left-merge query $T(\textsc{S})\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie}_{\mathrm{Y}}T^{\prime}(\textsc{S}^{\prime})$:
By definition, $\pi_{\textsc{S}}(T)=\pi_{\textsc{S}}(T_{1})$ (each tuple of
$T$ produces one or more tuples in $T_{1}$ and vice versa). Thus, for any
$\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}\subseteq\textsc{S}_{d}$
we also have
$\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T)=\pi_{\mathrm{Z},\mathrm{\scalebox{0.8}{A}}^{\prime}}(T_{1})$.
By definition, a tuple in $T$ can only appear twice in
$\Pi_{\mathrm{Z}}(T_{1})$ if $\mathrm{Y}\not\mapsto\textsc{S}^{\prime}$. If
that is the case, $\mathrm{\color[rgb]{0,0,0}{F}}$ must be restricted to
functions that are not sensitive to duplicates:
$\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$.
Finally, the aggregable property condition holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}$.

  2. (2)

Right-merge query
$T(\textsc{S})\mathbin{\bowtie\mkern-5.8mu\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}}_{\mathrm{Y}}T^{\prime}(\textsc{S}^{\prime})$
or full-merge query
$\mathpzc{Q}\,=T(\textsc{S})\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie\mkern-5.8mu\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox
to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}}_{\mathrm{Y}}T^{\prime}(\textsc{S}^{\prime})$:

    1. (a)

$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$: We assume that for all
non-empty partitions $T^{\prime
y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$ of $T^{\prime}$, the
corresponding partition $T^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$ is
either empty or $\pi_{Y}(T^{y})$ is equal to
$\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$. From
this assumption and the definition of right-outer join, it directly follows
that for any non-empty partition
$T_{1}^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T_{1})$ of $T_{1}$ and
corresponding partition $T^{y}$, $T^{y}=\emptyset$ or
$\pi_{\textsc{S}}(T^{y})=\pi_{\textsc{S}}(T_{1}^{y})$. Then, for all
$\mathrm{X}\supseteq\mathrm{\mathrm{Y}}^{top}$, all non-empty partitions
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T))$ are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T_{1}))$ and since, by definition of
$\mathrm{Z}$,
$\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}\supseteq\mathrm{\mathrm{Y}}^{top}$,
the previous condition also holds for
$\mathrm{X}=\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}$.
Therefore the G-summarizability condition holds on $T$ and $T_{1}$ for
$\mathrm{Z}$ and $\mathrm{\scalebox{0.8}{A}}^{\prime}$. Finally, the
aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}^{top}$.

    2. (b)

$\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}-\mathrm{Y}$: We assume that
for all non-empty partitions, $T^{\prime
y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$, and corresponding
partitions $T^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$, $\pi_{Y}(T^{y})$
is a subset of
$\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$. From
this assumption and the definition of right-outer join, it directly follows
that for any non-empty partition
$T_{1}^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T_{1})$ and corresponding
partition $T^{y}$,
$\pi_{\textsc{S}-\mathrm{Y}}(T_{1}^{y})-\pi_{\textsc{S}-\mathrm{Y}}(T^{y})$
only contains $null$ values. Then, for all $\mathrm{X}\subseteq\textsc{S}_{D}$
and $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}-\mathrm{Y}$, all non-
empty partitions
$\pi_{\mathrm{X},\mathrm{\scalebox{0.8}{A}}^{\prime}}(\sigma_{\mathrm{X}=x}(T))$
are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x\wedge\mathrm{\scalebox{0.8}{A}}^{\prime}\neq
null}(T_{1}))$ and since, by definition of $\mathrm{Z}$,
$\mathrm{Z}\subseteq\textsc{S}_{D}$, the previous condition also holds for
$\mathrm{X}=\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}$.
Therefore, the G-summarizability condition holds on $T$ and $T_{1}$ for
$\mathrm{Z}$ and $\mathrm{\scalebox{0.8}{A}}^{\prime}$. Finally, the
aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$.

    3. (c)

Otherwise: From the definition of right-merge and full-merge, it directly
follows that for any non-empty partition
$T_{1}^{y}=\sigma_{\mathrm{Y}=y}(T_{1})$, the corresponding partition $T^{y}$
is either empty or equal to $\pi_{\textsc{S}}(T_{1}^{y})$. Then, for all
$\mathrm{X}\supseteq\mathrm{Y}$, all non-empty partitions
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T))$ are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T_{1}))$ and since, by definition of
$\mathrm{Z}$,
$\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}\supseteq\mathrm{Y}$,
the previous condition also holds for
$\mathrm{X}=\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}$.
Therefore, the G-summarizability condition holds for $T$ and $T_{1}$ for
$\mathrm{Z}$ and $\mathrm{\scalebox{0.8}{A}}^{\prime}$. Finally, the
aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$.

  3. (3)

$\mathpzc{Q}\,=T(\textsc{S})\bowtie_{\mathrm{Y}}T^{\prime}(\textsc{S}^{\prime})$:

    1. (a)

”if” part: We assume that for all non-empty partitions $T^{\prime
y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$, the corresponding
partition $T^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$ is contained in
$\pi_{\mathrm{Y}}(T^{\prime y})$. From this assumption and the definition of
inner join, it directly follows that any non-empty partition
$T_{1}^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T_{1})$ in the result is equal
to the corresponding partition $T^{y}$:
$\pi_{\textsc{S}}(T^{y})=\pi_{\textsc{S}}(T_{1}^{y})$. Then, for all
$\mathrm{X}\supseteq\mathrm{\mathrm{Y}}^{top}$, all non-empty partitions
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T))$ are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T_{1}))$ and since, by definition of
$\mathrm{Z}$,
$\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}\supseteq\mathrm{\mathrm{Y}}^{top}$,
the previous condition also holds for
$X=\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}$. Therefore the
G-summarizability condition holds on $T$ and $T_{1}$ for grouping set
$\mathrm{Z}$ and attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}$. Finally, the
aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}^{top}$.

    2. (b)

”else” part: From the definition of inner join, it directly follows that for
any non-empty partition $T_{1}^{y}=\sigma_{\mathrm{Y}=y}(T_{1})$, the
corresponding partition $T^{y}$ is equal to $\pi_{\textsc{S}}(T_{1}^{y})$.
Then, for all $\mathrm{X}\supseteq\mathrm{Y}$, all non-empty partitions
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T_{1}))$ are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T))$ and since, by definition of
$\mathrm{Z}$,
$\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}\supseteq\mathrm{Y}$,
the previous condition also holds for
$\mathrm{X}=\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}$.
Therefore the G-summarizability condition holds on $T$ and $T_{1}$ for
groupîng set $\mathrm{Z}$ and $\mathrm{\scalebox{0.8}{A}}^{\prime}$. Finally,
the aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}$.

_Set queries:_ In the following, let $\mathrm{\mathrm{Y}}^{top}\subseteq
S_{D}$ denote the set of ”highest” attributes in the set of dimension
attributes $S_{D}\subseteq S$ of $T$ and $T^{\prime}$.

  1. (1)

$\mathpzc{Q}\,=T(\textsc{S})\cup T^{\prime}(\textsc{S})$: By the assumption
$\pi_{\mathrm{\mathrm{Y}}^{top}}(T)\cap\pi_{\mathrm{\mathrm{Y}}^{top}}(T^{\prime})=\emptyset$
and the definition of union, it follows that for any non-empty partition
$T_{1}^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T_{1})$ in the result, the
corresponding partition $T^{y}$ is either empty or $T^{y}$ is equal to
$T_{1}^{y}$. Then, for all $\mathrm{X}\supseteq\mathrm{\mathrm{Y}}^{top}$, all
non-empty partitions $\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T))$ are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T_{1}))$ and since, by definition of
$\mathrm{Z}$, $\mathrm{Z}\supseteq\mathrm{\mathrm{Y}}^{top}$, the previous
condition also holds for
$\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}_{1}\cup\mathrm{\mathrm{Y}}^{top}$.
Finally, the aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}^{top}$.

  2. (2)

$\mathpzc{Q}\,=T(\textsc{S})-T^{\prime}(\textsc{S})$: By assumption, all
partitions $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T)$ are equal to or disjoint
with $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$. Then, by the
definition of set-difference, it follows that for any non-empty partition
$T_{1}^{y}=\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T_{1})$ in the result, the
corresponding partition $T^{y}$ is either empty or $T^{y}$ is equal to
$T_{1}^{y}$. Then, for all $\mathrm{X}\supseteq\mathrm{\mathrm{Y}}^{top}$, all
non-empty partitions $\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T))$ are equal to
$\pi_{\mathrm{X}}(\sigma_{\mathrm{X}=x}(T_{1}))$ and since, by definition of
$\mathrm{Z}$, $\mathrm{Z}\supseteq\mathrm{\mathrm{Y}}^{top}$, the previous
condition also holds for
$\mathrm{X}=\mathrm{Z}\cup\\{\mathrm{\scalebox{0.8}{A}}^{\prime}\\}$.
Therefore, the G-summarizability condition holds on $T$ and $T_{1}$ for
$\mathrm{Z}$ and $\mathrm{\scalebox{0.8}{A}}^{\prime}$. Finally, the
aggregable property condition also holds: $S_{r}\cap
S_{D}-\mathrm{X}_{1}=S_{D}-\mathrm{X}_{1}\subseteq\mathrm{Z}=S_{D}-\mathrm{X}_{1}\cup\mathrm{Y}^{top}$.

∎

Observe that for merge queries and set queries we choose the ”highest”
dimension $\mathrm{\mathrm{Y}}^{top}$ as candidates for checking the
G-summarizability conditions. In fact, we might check this condition for any
subset $\mathrm{Y}^{\prime}$ of attributes from $\mathrm{Y}$ or $S_{D}$
instead of $\mathrm{\mathrm{Y}}^{top}$, and identify the minimal candidates
for which these conditions hold. There are two main reasons for only choosing
$\mathrm{\mathrm{Y}}^{top}$. First, checking the G-summarizability condition
for a subset of attributes mainly corresponds to comparing the size of
partitions in two different tables obtained by two aggregate queries. This
basic operation is costly and the systematic exploration of all attribute
subsets $\mathrm{Y}^{\prime}$ might, even with efficient pruning techniques,
take too much time in an interactive data exploration session. Secondly, the
choice of the highest attributes $\mathrm{\mathrm{Y}}^{top}$ is based on the
realistic hypothesis that the majority of analytic queries aggregate values
along these attributes and other lower attributes.

###  4.4. Controlling G-summarizability using aggregable properties

The following proposition refines the propagation rules for aggregable
properties of Section 3.3, using the results of Proposition 4.15, to guarantee
the G-summarizability of attributes.

###### Proposition 0 (aggregable properties with G-summarizability for unary
queries).

Let $\mathpzc{Q}\,$ be a unary analytic query with some input table $T(S)$
returning a table $T_{r}(\textsc{S}^{\prime})$, and $\textsc{S}_{D}$ be all
the dimension attributes of $S\cap\textsc{S}^{\prime}$. Let
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ be an attribute in
$S\cap\textsc{S}^{\prime}$ such that
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$
holds in $T$. Then, in the cases of queries $\mathpzc{Q}\,$ of Table 27, the
aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$
holds in $T_{r}$ and is such that for all $\mathrm{Z}$ where
$\textsc{S}_{D}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ is G-summarizable in $T$ with respect to
query $\mathpzc{Q}\,$, grouping set $\mathrm{Z}$, and function
$\mathrm{\color[rgb]{0,0,0}{F}}$.

Table 27. Propagation rules for unary operations on $T(S)$ preserving G-summarizability Query on $T(\textsc{S})$ |  Propagation rule for inferring the aggregable properties for attributes $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S\cap S_{r}$ of the result $T_{r}(S_{r})$ |  _User action_
---|---|---
$\mathpzc{Filter}_{T}(P\mid\mathrm{Y})$ |  attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{r}$, $\mathrm{Y}\subseteq S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{Y}$, $\mathrm{X}^{\prime}_{d}$ = fact identifier and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}-\mathrm{Y}$ |  _Minimize $\mathrm{X}^{\prime}_{d}$_
$\mathpzc{Project}_{T}(\mathrm{Y},f(\mathrm{Z})\rightarrow\mathrm{\scalebox{0.8}{M}})$ |  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}$, $\mathrm{X}^{\prime}_{d}=\mathrm{X}_{d}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _None_
$\mathpzc{Pivot}_{T}(\mathrm{\scalebox{0.8}{A}}\mid\mathrm{Y})$ |  attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{r}-\\{\mathrm{\scalebox{0.8}{A}}\\}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: if $\mathrm{X}_{d}\cap\mathrm{Y}=\emptyset$ then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{Y}$, $\mathrm{X}^{\prime}_{d}=\mathrm{X}_{d}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}-\mathrm{Y}$ |  _None_
|  else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}$ as defined by the rules of Table 17 with $\mathrm{X}^{\prime}_{d}=$ fact identifier and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}-\mathrm{Y}$ and $\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{MIN},\allowbreak\mathrm{MAX},\allowbreak\mathrm{COUNT\\_DISTINCT}\\}$ |  _Minimize $\mathrm{X}^{\prime}_{d}$_
$\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\scalebox{0.8}{A}})\mid\mathrm{Y})$ |  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cap\mathrm{Y}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}\cap\mathrm{Y}$. and $\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{MIN},\allowbreak\mathrm{MAX},\allowbreak\mathrm{COUNT\\_DISTINCT}\\}$ |  _None_

###### Proof.

The proof mainly consists in defining the ”new” $\mathrm{X}^{\prime}$ as the
”complement” of $\mathrm{Z}$ as defined in Proposition 4.15 where
$\mathrm{X}^{\prime}$ is replaced by its definition in Table 19. For example,
for filter queries, since
$\mathrm{Z}=(S_{D}-\mathrm{X}^{\prime})\cup\mathrm{Y}$ and
$\mathrm{X}^{\prime}=\mathrm{X}$, we obtain
$\mathrm{Z}=S_{D}-(\mathrm{X}-\mathrm{Y})$ and its complement
$\mathrm{X}^{\prime}=S_{r}-\mathrm{Z}=\mathrm{X}-\mathrm{Y}$. For aggregation
queries, $\mathrm{Z}=\mathrm{Y}-\mathrm{X}_{1}$ and
$\mathrm{X}_{1}=\mathrm{Y}\cap\mathrm{X}$ and we obtain
$\mathrm{Z}=\mathrm{Y}-(\mathrm{Y}\cap\mathrm{X})$ and its complement
$\mathrm{X}^{\prime}=\mathrm{Y}-\mathrm{Z}=\mathrm{Y}\cap\mathrm{X}$. ∎

We make the following observations on the rules of Table 27. First, the rule
for Project is unchanged with respect to Table 19. Second, when $Q$ is an
aggregate query
$\mathpzc{Q}\,=\mathpzc{Agg}_{T}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\scalebox{0.8}{B}})\mid\mathrm{Y})$,
the aggregable property for attribute
$\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\scalebox{0.8}{B}})$ is computed using
the rule of Table 19 to guarantee the summarizability of attribute $B$. For
attributes of $\mathrm{Y}$, the only refinement to the rule in Table 19 is to
restrict the scope of $\mathrm{\color[rgb]{0,0,0}{F}}$. The same observation
applies to the refined propagation rule for a pivot query.

###### Proposition 0 (aggregable properties with G-summarizability for binary
queries).

Let $T(S)$ and $T^{\prime}(S^{\prime})$ be two analytic tables with dimension
attributes $S_{D}\subseteq S$ and $S^{\prime}_{D}\subseteq S^{\prime}$
respectively, $S_{D}^{top}p$ denote the highest attributes in $S_{D}$ and
$\mathrm{\mathrm{Y}}^{top}$ denote the highest attributes in
$\mathrm{Y}=S_{D}\cap S^{\prime}_{D}$. Let $T_{r}(S_{r})$ be the result of a
binary query between $T$ and $T^{\prime}$ and
$\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{r}\cap S$ be an attribute of $T$
with aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$
holding in $T$. Then, for all queries $\mathpzc{Q}\,$ satisfying the
conditions of Section 4.4, the aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$
holds in $T_{r}$ and is such that for all $\mathrm{Z}$ where
$\textsc{S}_{D}-\mathrm{X}^{\prime}\subseteq\mathrm{Z}$,
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ is G-summarizable in $T$ with respect to
query $\mathpzc{Q}\,$, grouping set $\mathrm{Z}$, and function
$\mathrm{\color[rgb]{0,0,0}{F}}$.

###### Proof.

As for unary queries, the proof mainly consists in defining the ”new”
$\mathrm{X}^{\prime}$ as the ”complement” of $\mathrm{Z}$ as defined in
Proposition 4.15 where $\mathrm{X}^{\prime}$ is replaced by its definition in
Table 19. For dimension attributes $\mathrm{\scalebox{0.8}{A}}^{\prime}$, we
can show that we always obtain a new $\mathrm{X}^{\prime}$ which is equal to
the old $\mathrm{X}^{\prime}$ defined in Table 19. For example, for right-
merge and full-merge queries, if $\mathrm{\scalebox{0.8}{A}}^{\prime}$ is a
dimension attribute in $S_{D}$, $\mathrm{X}^{\prime}=\mathrm{X}\cup
S^{\prime}_{D}-\mathrm{Y}-\mathrm{X}^{\prime}_{f}$ and in the first case where
$\mathrm{Z}=(S_{D}-\mathrm{X}^{\prime})\cup\mathrm{\mathrm{Y}}^{top}$, we
obtain $\mathrm{Z}=S_{D}-(\mathrm{X}\cup
S^{\prime}_{D}-\mathrm{Y}-\mathrm{X}^{\prime}_{f})\cup\mathrm{\mathrm{Y}}^{top}=S_{D}-(\mathrm{X}\cup
S^{\prime}_{D}-\mathrm{Y}-\mathrm{X}^{\prime}_{f}-\mathrm{\mathrm{Y}}^{top})=S_{D}-(\mathrm{X}\cup
S^{\prime}_{D}-\mathrm{Y}-\mathrm{X}^{\prime}_{f})$ which we also obtain in
the second case:
$\mathrm{Z}=(S_{D}-\mathrm{X}^{\prime})\cup\mathrm{Y}=S_{D}-(\mathrm{X}\cup
S^{\prime}_{D}-\mathrm{Y}-\mathrm{X}^{\prime}_{f}-\mathrm{Y})=S_{D}-(\mathrm{X}\cup
S^{\prime}_{D}-\mathrm{Y}-\mathrm{X}^{\prime}_{f})$.

For measure attributes, $\mathrm{Z}=\textsc{S}_{D}-\mathrm{X}^{\prime}$ and
$\mathrm{X}^{\prime}=\mathrm{X}$, we obtain the new
$\mathrm{X}^{\prime}=\mathrm{X}$. ∎

We make the following observations on the rules of Section 4.4 and Section
4.5. First, all rules refine the conditions and actions of the propagation
rules of Table 21 by taking into account the restrictions described in
Proposition 4.15. Second, in the case of a right-merge, full-merge, union and
difference query, it is possible to search for any subset
$\mathrm{Y}^{\prime}\subseteq\mathrm{Y}$ instead of
$\mathrm{\mathrm{Y}}^{top}$ for which the conditions on
$\mathrm{\mathrm{Y}}^{top}$ hold. If no such $\mathrm{Y}^{\prime}$ is found
then the set of attributes $\mathrm{Y}$ must be removed from
$\mathrm{X}^{\prime}$ (we illustrated that in Example 4.14). Third, note that
the propagation rule for right-merge assumes that
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ is an exclusive attribute of $T$. If
$\mathrm{\scalebox{0.8}{A}}^{\prime}$ is also in $T^{\prime}$ then its
aggregable property is computed using the propagation rule for left-merge.

Propagation rules for merge operations with G-summarizability |  |
---|---|---
Merge query on $T(S)$ and $T^{\prime}(S^{\prime})$ |  Propagation rule for inferring the aggregable properties of attributes $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S$ in the result $T_{r}(\textsc{S}_{r})$ |  _User action_
|  if $\mathrm{Y}\not\mapsto\textsc{S}^{\prime}$ then $\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$ |
$T_{r}=T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie}_{\mathrm{Y}}T^{\prime}$ |  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$ |  _Complete $\mathrm{X}^{\prime}_{f}$_
|  measure attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S-S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$ : $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}$, $\mathrm{X}^{\prime}_{d}=\mathrm{X}_{d}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _Complete $\mathrm{X}^{\prime}_{f}$_
|  if $\mathrm{Y}\not\mapsto\textsc{S}^{\prime}$ then $\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$ |
$T_{r}=T\mathbin{\bowtie\mkern-5.8mu\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}}_{\mathrm{Y}}T^{\prime}$ $T_{r}=T\mathbin{\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}\mkern-5.8mu\bowtie\mkern-5.8mu\rule[-0.08612pt]{2.5pt}{0.4pt}\hbox to0.0pt{\hss\rule[7.0pt]{2.5pt}{0.4pt}}}_{\mathrm{Y}}T^{\prime}$ |  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\mathrm{Y}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: if $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))=\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$ or $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))=\emptyset$ for all non-empty partitions $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})$ : then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})-\mathrm{\mathrm{Y}}^{top}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})-\mathrm{Y}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _Complete $\mathrm{X}^{\prime}_{f}$_
|  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}_{D}-\mathrm{Y}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: if $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))\subseteq\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$ or $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))=\emptyset$ for all non-empty $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})\neq\emptyset$: then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})$ else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})-\mathrm{Y}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _Complete $\mathrm{X}^{\prime}_{f}$_
|  measure attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S-S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$ : if $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))\subseteq\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$ or $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))=\emptyset$ for all non-empty $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})\neq\emptyset$: then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}$, $\mathrm{X}^{\prime}_{d}=\mathrm{X}_{d}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _Complete $\mathrm{X}^{\prime}_{f}$_
|  else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{Y}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  Recompute $\mathrm{X}^{\prime}_{d}$
|  if $\mathrm{Y}\not\mapsto\textsc{S}^{\prime}$ then $\mathrm{\color[rgb]{0,0,0}{F}}\in\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$ |
$T_{r}=T\bowtie_{\mathrm{Y}}T^{\prime}$ |  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$: if $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))\subseteq\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$ or $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))=\emptyset$ for all non-empty partitions $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})\neq\emptyset$: then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})-\mathrm{\mathrm{Y}}^{top}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}\cup(S^{\prime}_{D}-\mathrm{X}^{\prime}_{f})-\mathrm{Y}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _Complete $\mathrm{X}^{\prime}_{f}$_
|  measure attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S-S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$ : if $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))\subseteq\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime}))$ or $\pi_{\mathrm{Y}}(\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T))=\emptyset$ for all non-empty partitions $\sigma_{\mathrm{\mathrm{Y}}^{top}=y}(T^{\prime})\neq\emptyset$: then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{\mathrm{Y}}^{top}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{Y}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$ |  _Recompute $\mathrm{X}^{\prime}_{d}$_ _Complete $\mathrm{X}^{\prime}_{f}$_

###  4.5. Wrapping up results on summarizability

To wrap up our results on summarizability and G-summarizability, we illustrate
them using the motivating example presented in the introduction of this paper.
We then discuss some directions for future work around the generation of
explanations associated with the result of an analytic query.

Propagation rules for set operations with G-summarizability |  |
---|---|---
Set query on $T(S)$ and $T^{\prime}(S^{\prime})$ |  Propagation rule for inferring the aggregable properties of attributes $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S$ in the result $T_{r}(\textsc{S}_{r})$ |  _User action_
$T_{r}=T\cup T^{\prime}$ |  dimension attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{D}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$ and $T^{\prime}$: if $\pi_{\textsc{S}_{D}^{top}}(T)\cap\pi_{\mathrm{\mathrm{Y}}^{top}}(T^{\prime})=\emptyset$ then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{\mathrm{Y}}^{top}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$ |  _Recompute $\mathrm{X}^{\prime}_{d}$_
|  measure attribute $\mathrm{\scalebox{0.8}{A}}^{\prime}\in\textsc{S}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$ and $T^{\prime}$: if $\pi_{\mathrm{\mathrm{Y}}^{top}}(T)\cap\pi_{\mathrm{\mathrm{Y}}^{top}}(T^{\prime})=\emptyset$ then if $\mathrm{X}_{d}\mapsto\mathrm{\scalebox{0.8}{A}}^{\prime}$ holds in $T_{r}$ then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{\mathrm{Y}}^{top}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$. |  _Recompute $\mathrm{X}^{\prime}_{d}$_
|  else $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{\mathrm{Y}}^{top}$, $\mathrm{X}^{\prime}_{d}=\mathrm{X}_{d}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$ |  _Minimize $\mathrm{X}^{\prime}_{d}$_
$T_{r}=T-T^{\prime}$ |  $\mathrm{\scalebox{0.8}{A}}^{\prime}\in S_{r}$ and $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X})$ holds in $T$ and $T^{\prime}$ : if all partitions $\sigma_{\mathrm{\mathrm{Y}}^{top}}(T)$ are equal to or disjoint with $\sigma_{\mathrm{\mathrm{Y}}^{top}}(T^{\prime})$ then $\mathbf{agg}_{\mathrm{\scalebox{0.8}{A}}^{\prime}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}^{\prime})$ holds in $T_{r}$ with $\mathrm{X}^{\prime}=\mathrm{X}-\mathrm{\mathrm{Y}}^{top}$ and $\mathrm{X}^{\prime}_{f}=\mathrm{X}_{f}$ |  Recompute $\mathrm{X}^{\prime}_{d}$ _None_

###### Example 0.

Consider the example of interactive data analysis session of Figure 2 on the
tables in Table 2. Table $\mathrm{{T3}}$ is obtained by a filter query
$\mathpzc{Filter}_{\mathrm{{STORE\\_SALES}}}(P|\mathrm{\scalebox{0.8}{COUNTRY,YEAR}})$
and attribute  AMOUNT in $\mathrm{{STORE\\_SALES}}$ is aggregable along all
dimension attributes except attribute  YEAR . By the G-summarizability rule
for filter queries for attribute  AMOUNT in $\mathrm{{T3}}$, we obtain the
aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{AMOUNT}}}(\mathrm{SUM},\mathrm{X}_{3})$
where $\mathrm{X}_{3}$ now contains all attributes of
$\mathrm{{STORE\\_SALES}}$ except  COUNTRY and  YEAR . Since the table
$\mathrm{{T4}}$ is obtained by summarizing  AMOUNT by
$\mathrm{Z}=\mathrm{\scalebox{0.8}{CITY, STATE, COUNTRY, YEAR}}$, the
aggregate operation over $\mathrm{{T3}}$ leading to $\mathrm{{T4}}$ is
_correct_ with respect to the G-summarizability of  AMOUNT .

Next, the table $\mathrm{{T5}}$ is obtained by a merge query adding the
attribute  POP from table ${DEM}$ to table $\mathrm{{T4}}$. For attribute  POP
in $\mathrm{{T5}}$, we have
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{POP}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}_{5})$,
where $\mathrm{\color[rgb]{0,0,0}{F}}$ and $\mathrm{X}_{5}$ are defined
according to Section 4.4 for right merge (${DEM}$ is the ”outer” merge table).
We have join attributes
$\mathrm{Y}=\\{\mathrm{\scalebox{0.8}{CITY}},\mathrm{\scalebox{0.8}{STATE}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$
with
$\mathrm{\mathrm{Y}}^{top}=\\{\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$.
However,
$\pi_{\mathrm{Y}}(\sigma_{\mathrm{\scalebox{0.8}{COUNTRY}}=^{\prime}USA^{\prime}\wedge\mathrm{\scalebox{0.8}{YEAR}}=2018}(\mathrm{{T4}}))\subset\pi_{Y}(\sigma_{\mathrm{\scalebox{0.8}{COUNTRY}}=^{\prime}USA^{\prime}\wedge\mathrm{\scalebox{0.8}{YEAR}}=2018}(\mathrm{{DEM}}))$
(city of ’Palo Alto’ is missing in $\mathrm{{T4}}$). Thus, we have
$\mathrm{X}_{5}=\mathrm{Y}$ in the above aggregable property. Consequently,
the aggregation of  SUM(POP) along  CITY is incorrect with respect to the
G-summarizability property.

Table ${DEM^{\prime}}$ in Table 6(a) is obtained by aggregating the population
in table ${DEM}$ along attribute  CITY . In table ${DEM}$, we have
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{POP}}}(\mathrm{SUM},\mathrm{X})$ with
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{CITY}},\mathrm{\scalebox{0.8}{STATE}},\mathrm{\scalebox{0.8}{COUNTRY}}\\}$.
So the aggregation along  CITY leading to table ${DEM^{\prime}}$ is _correct_
, and by Proposition 4.9,
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{POP}}}(\mathrm{SUM},\mathrm{X}^{\prime})$
holds in ${DEM^{\prime}}$ with
$\mathrm{X}^{\prime}=\mathrm{X}\cap\mathrm{Y}=\\{\mathrm{\scalebox{0.8}{STATE}},\mathrm{\scalebox{0.8}{COUNTRY}}\\}$
(function $\mathrm{SUM}$ is distributive). Next, in the merge result of
$\mathrm{{T4}}$ with $\mathrm{{DEM^{\prime}}}$, we have
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{POP}}}(\mathrm{\color[rgb]{0,0,0}{F}},\mathrm{X}_{4})$,
where $\mathrm{\color[rgb]{0,0,0}{F}}$ and $\mathrm{X}_{4}$ are defined by the
rule for outer merge (${DEM^{\prime}}$ is the outer merge table). We have
$\mathrm{Y}=\\{\mathrm{\scalebox{0.8}{STATE}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$
and
$\mathrm{\mathrm{Y}}^{top}=\\{\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$.
We also have
$\pi_{Y}(\mathrm{{DEM}}\ltimes_{\mathrm{\mathrm{Y}}^{top}}\mathrm{{T4}})=\pi_{Y}(\mathrm{{DEM}})$,
and since
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{POP}}}(\mathrm{SUM},\mathrm{X}^{\prime})$
holds in $\mathrm{{DEM^{\prime}}}$, we get
$\mathrm{X}_{4}=X^{\prime}-\mathrm{\mathrm{Y}}^{top}=\\{\mathrm{\scalebox{0.8}{STATE}}\\}$.
Finally, since $\mathrm{Y}$ does not literally determine the schema of
$\mathrm{{T4}}$, $\mathrm{\color[rgb]{0,0,0}{F}}$ must be restricted to one of
$\\{\mathrm{COUNT\\_DISTINCT},\mathrm{MIN},\mathrm{MAX}\\}$.

The question that naturally arises is what options should be provided to the
end user when G-summarizability is violated (i.e., the conditions given by
aggregable properties are not satisfied). A first option is to reject an
incorrect aggregate query with respect to G-summarizability and return the
grouping set of the aggregable property as an explanation. This is the option
we have described in this paper. However, another option could be to accept
the aggregate query provided that some metadata is added to the resulting
table to enable a non-ambiguous and correct interpretation of the tuples in
that table. We explain the idea in the next example and leave it for future
work.

###### Example 0.

Consider again the interactive session of Figure 2 and suppose that the first
filter query on $\mathrm{{STORE\\_SALES}}$ is:
$\mathrm{\scalebox{0.8}{STATE}}\neq null$ (expecting that this eliminates all
European countries) and  YEAR = ’2018’. Next, suppose that the aggregate
operation over $\mathrm{{T3}}$ sums  AMOUNT for each partition defined by
attributes  COUNTRY and  YEAR . It will be difficult for an end user to figure
out that an incorrect aggregate value has been computed for country ’USA’ if
the user ignores that ’Washington DC’ has no state. With our current
proposition, this aggregate operation will be rejected since the grouping set
does not include attribute  STATE (we would have
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{AMOUNT}}}(\mathrm{SUM},\\{\mathrm{\scalebox{0.8}{CITY}},\mathrm{\scalebox{0.8}{COUNTRY}}\\})$
in $\mathrm{{T3}}$). However, to disambiguate the result of the aggregate
operation, it would be sufficient to ”attach” the filter condition
$\mathrm{{STORE\\_SALES}}.\mathrm{\scalebox{0.8}{STATE}}\neq null$ as metadata
to table $\mathrm{{T4}}$ to indicate that the amount for stores in those
states has not been accounted for. It is then possible for the end user to
query those stores from table $\mathrm{{STORE\\_SALES}}$ to visualize them and
decide if table $\mathrm{{T4}}$ is satisfactory.

The same principle applies to the result of the left-merge operation between
$\mathrm{{T4}}$ and $\mathrm{{DEM}}$. As we have seen in the previous example,
we have
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{POP}}}(\mathrm{SUM},\mathrm{X}_{5})$ in
$\mathrm{{T5}}$ and the aggregate operation on $\mathrm{{T5}}$ is rejected.
However, we could accept the operation and simply mark that measure attribute
SUM(POP) now depends on dimension ${SALESORG}$. This would indicate that the
population is summed for the cities in ${SALESORG}$, that is, the cities that
have stores.

The idea is therefore to make each analytic table, resulting from an
interactive data analysis session, ”self-explanatory” with respect to its
aggregated attributes.

##  5\. Related Work

In this section, we focus on previous works that propose conditions on the
schema of a fact table, or on the parameters of an aggregate query expressed
over that fact table, to determine if the aggregate query returns a correct
result with respect to some summarizability definition. Previous papers on
summarizability use heterogeneous notations and concepts and are sometimes
difficult to read because they lack some details or hide some assumptions. To
facilitate comparisons with our work, we reformulated each previous
proposition using the notations introduced in this paper.

In our detailed analysis, we establish the following:

  1. (1)

Our data model is more general than the data models considered by previous
work.

  2. (2)

In the case of a sequence of two aggregate queries, $Q_{1}$ followed by
$Q_{2}$, our sufficient conditions to determine if $Q_{2}$ is correct subsume
the conditions proposed by previous work.

  3. (3)

To our best knowledge, no previous work addressed the case of a sequence made
of an arbitrary analytic query followed by an aggregate query, which is
addressed by our notion of G-summarizability.

###  5.1. Summarizability of a query over a statistical object

The notion of _summarizability_ was initially defined by Rafanelli and
Shoshani (Rafanelli and Shoshani, 1990) for statistical databases and later
refined in their seminal paper (Lenz and Shoshani, 1997). In their context,
_base data_ , also referred to as ”micro-data”, describe all the details about
the objects or individuals over which a summarization operation can be applied
to produce a so-called _statistical object_ , also referred to as ”macro-
data”. There are a few constraints. In the base data, an _object of interest_
must be identified (e.g., a product, a customer, a store) using some
attributes, all other attributes being viewed as ”descriptors” of the object.
A statistical object is a table defined by a summarized attribute (i.e., an
attribute of the base data on which a summarization function is applied) and a
set of ”category” attributes defining the partitions of the base table on
which the summarization function is applied. Using the terminology defined in
Section 2, base data can be modelled as a non-analytic table and summarization
operations are aggregate queries which ignore partitions with null values in
their partition identifiers. We shall keep the expression ”summarization
operation” to distinguish it from our analytic aggregate operation that
handles null values as regular values. A statistical object can be modeled as
a fact table that results from a summarization operation over the base data
where category attributes represent dimensions and the summarized attribute is
a measure.

The fact tables that represent statistical objects in (Lenz and Shoshani,
1997) are however more restricted than the fact tables enabled by our data
model. Firstly, dimensions are restricted to _strict_ hierarchies, that is,
each attribute has at most one parent attribute in the hierarchy type, each
attribute value of a dimension has at most one parent attribute value in the
hierarchy of the dimension, and hierarchy types must have a single bottom and
top level attribute. Secondly, all dimensions in a fact table must be
independent (that is, no attribute in some dimension functionally depends on
an attribute of another dimension). Finally, all facts in a fact table have
the same dimensions, i.e., the measure attribute does not depend on a subset
of the dimensions.

An important distinction, with respect to multidimensional data models, is
that there is no notion of managed dimensions in (Lenz and Shoshani, 1997;
Rafanelli and Shoshani, 1990). The notion of dimension hierarchy is purely
local to a statistical object and depends on the functional dependencies that
are supposed to hold in the base data on which the object is built. If these
dependencies change, the dimensions hierarchies are adjusted to fit the
strictness constraint explained before.

In (Lenz and Shoshani, 1997; Rafanelli and Shoshani, 1990), summarizability is
defined as the property of a summarized attribute
$\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$ of a fact table
(statistical object) $T$ which guarantees that a summarization operation
$\mathrm{\color[rgb]{0,0,0}{G}}$ over
$\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$produces a
_correct_ result. Suppose we have a base table $T_{0}$ and a fact table
$T(S)$, which results from a summarization operation applying aggregation
function $\mathrm{\color[rgb]{0,0,0}{F}}$ on attribute  A along attributes
$\mathrm{X}$:

$T=\mathpzc{Agg}^{*}_{T_{0}}(\mathrm{\color[rgb]{0,0,0}{F}}(A)\mid\mathrm{X})$

where $\mathpzc{Agg}^{*}$ denotes a summarization operation that does not
consider partitions where an attribute of $\mathrm{X}$ has a null value. Let
$\mathpzc{Q}\,$ be a summarization query over $T$:

$\mathpzc{Q}\,=\mathpzc{Agg}^{*}_{T}(\mathrm{\color[rgb]{0,0,0}{G}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))|\mathrm{Z})$

where $\mathrm{\color[rgb]{0,0,0}{G}}$ is a function applicable to the
summarized attribute
$\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})$ of $T$, and
$\mathrm{Z}$ is a set of dimension attributes in $\mathrm{X}$. Then, the
summarization query $\mathpzc{Q}\,$ is said to be _correct_ , if the following
condition holds:

$\mathpzc{Agg}^{*}_{T_{0}}(F(\mathrm{\scalebox{0.8}{A}})|\mathrm{Z})=\mathpzc{Agg}^{*}_{T}(G(F(\mathrm{\scalebox{0.8}{A}}))|\mathrm{Z})$

To guarantee the correctness of summarization query $\mathpzc{Q}\,$, (Lenz and
Shoshani, 1997) defines three necessary properties on the summarization query
$\mathpzc{Q}\,$ and the dimensions ${D}$ of $T_{0}$. Let
$\mathrm{X}_{D}\subseteq\mathrm{X}$ be the set of dimension attributes for
dimension ${D}$ in $T$, $\mathrm{X}_{D}^{bot}\in X_{D}$ be the bottom level
attribute of ${D}$ in $T$ and $D^{bot}$ be the bottom level attribute of ${D}$
in $T_{0}$ (then, $D^{bot}=X_{D}^{bot}$ or
$D^{bot}\preccurlyeq^{*}X_{D}^{bot}$). The properties are:

  1. (1)

_Disjointness_. For each dimension ${D}$ along which summarization is done in
$\mathpzc{Q}\,$, at least one of the following conditions must hold: (a)
$\mathrm{X}_{D}-Z=\\{D^{bot}\\}$ consists of the bottom level attribute of
${D}$ and the partitions of $T_{0}$ using $D^{bot}$ are disjoint with respect
to the identifier attributes of the object of interest in $T_{0}$; (b) every
value in $T_{0}$ of a dimension attribute $\mathrm{\scalebox{0.8}{A}}_{1}$
that is a below an attribute $\mathrm{\scalebox{0.8}{A}}_{2}$ in
$\mathrm{X}_{D}-Z$ in ${D}$
($\mathrm{\scalebox{0.8}{A}}_{1}\preccurlyeq^{*}\mathrm{\scalebox{0.8}{A}}_{2}$)
must map to a single value of its parent attribute (many-to-one mapping);

  2. (2)

_Completeness with respect to $F(\mathrm{\scalebox{0.8}{A}})$_. For each
dimension ${D}$ of $T$, the domain of each attribute in $\mathrm{X}_{D}$ is
_complete_ in $T_{0}$, if both of the following conditions hold: (a) all
values of the identifier attributes of the object of interest which are
required by $F(\mathrm{\scalebox{0.8}{A}})$ appear in $T_{0}$, and (b) one of
the two following conditions holds: if $\mathrm{X}_{D}-Z=\\{D_{bot}\\}$
consists of the bottom level attribute of ${D}$ in $T_{0}$ then the value of
this attribute cannot be _null_ in $T_{0}$. Otherwise, every value of a
dimension attribute that is a child of $\mathrm{X}_{D}^{bot}$ must map to a
parent value in $\mathrm{X}_{D}^{bot}$ within $T_{0}$.

  3. (3)

_Applicable summary function_. The summary function
$\mathrm{\color[rgb]{0,0,0}{G}}$ is ”applicable” to the summarized attribute
$\mathrm{\color[rgb]{0,0,0}{F}}(A)$ with respect to all dimensions along which
summarization is done in $\mathpzc{Q}\,$.

We now analyze each one of the previous conditions and relate it to our work.

##### Disjointness:

In the original formulation of (Lenz and Shoshani, 1997), the disjointness
property requires that the dimension attributes along which summarization is
done form disjoint subsets over the ”objects of interest” defined in the base
table. Two different disjointness conditions are then given, depending on
whether the dimension attribute is a bottom attribute of the dimension or not.
The goal of the disjointness property is mainly to avoid double counting by
overlapping subsets. In our work, we address the disjointness property by
defining aggregable properties and propagation rules. Each aggregable property
describes for a given attribute  A in fact table $T_{0}$ along which
attributes it can be aggregated using some function
$\mathrm{\color[rgb]{0,0,0}{F}}$. The summarizability preserving propagation
rules then produce all aggregable properties of
$\mathrm{\color[rgb]{0,0,0}{F}}(A)$ in $T$ after the aggregation operation on
$T_{0}$ is done (see Proposition 3.5). Summarizability is defined using the
notion of function distributivity and literal functional dependencies. There
is no need to choose an object of interest in the base data for defining the
scope of summarizability, and any attribute can be summarized.

##### Completeness:

In completeness condition (2.a) of (Lenz and Shoshani, 1997), it is not clear
how the set of ”all possible values” for the identifier attributes is
determined to assess completeness. Thus, we used the interpretation that the
possible values are those listed in some reference directory. Furthermore,
condition (2.a) applies to the identifier values required for computing
$F(\mathrm{\scalebox{0.8}{A}})$ which means that the user who is formulating
query $\mathpzc{Q}\,$ must decide whether completeness is needed or whether
the values listed in $T$ are sufficient to compute a summary attribute. We
shall see in Example 5.2 that this condition (2.a) is useless for checking
summarizability. The Item (2.b) of the completeness condition is required
because summarization operations cannot deal with attributes of $Z$ that have
null values. In our work, we do not have such a restriction since our SQL
aggregate operations handle null values as regular values.

##### Function applicability:

The third condition focuses on testing the compatibility between the type of
dimensions and the type of measures used in $T$. The following types of
measures can be used by the designer of a fact table: _stock_ (i.e., a simple
value at a particular point in time), _flow_ (i.e., cumulative values over a
period of time) and _value-per-unit_ (i.e, determined value for a fixed time).
Dimensions can be of type temporal or non-temporal. When a measure attribute
A is aggregated using a given function over some dimension ${D}$, the types of
A and ${D}$ should be compatible with respect to that function. In our work,
applicable functions are captured by the more general notion of aggregable
property, which leaves the method to decide which function is applicable to an
attribute open. Furthermore, we use propagation rules and default rules to
infer the functions that are applicable to an attribute that has been
aggregated. Thus, a user is not forced to define the type of the measure
attributes in $T$ since aggregable properties for these attributes will be
automatically computed using propagation rule (see Proposition 3.5).

The following two examples illustrate the conditions of (Lenz and Shoshani,
1997) and emphasize the differences with our work.

Table 28. Table $\mathrm{{PRODUCT\\_LIST}}$ PROD_SKU |  BRAND |  COUNTRY |  YEAR |  QTY
---|---|---|---|---
cz-tshirt-s | Coco Cola | USA | 2017 | 5 000
cz-tshirt-s | Coco Cola | USA | 2018 | 7 000
cz-tshirt-s | Zora | Spain | 2017 | 5 000
cz-tshirt-s | Zora | Spain | 2018 | 7 000
coco-can-33cl | Coco Cola | USA | 2017 | 10 000

###### Example 0.

Consider the base table $\mathrm{{PRODUCT\\_LIST}}$ (  PROD_SKU ,  COUNTRY ,
BRAND ,  YEAR ,  QTY ), whose instance is displayed on Table 28, and where the
”object of interest” is a product identified by  PROD_SKU . To comply with the
constraint of strict dimensions defined by (Lenz and Shoshani, 1997),
attribute  PROD_SKU must belong to a separate dimension (it determines no
other attribute), attributes  BRAND ,  COUNTRY belong to a dimension
${MKT\\_PROD}$, and attribute  YEAR belongs to a dimension ${TIME}$.

Next, suppose that we define a statistical object $\mathrm{{PRODUCT\\_SUM}}$ (
BRAND ,  YEAR ,  NB_PROD_SKU ) built using a summarization query with function
$\mathrm{\color[rgb]{0,0,0}{F}}=\mathrm{COUNT\\_DISTINCT}$:

$\mathrm{{PRODUCT\\_SUM}}=\mathpzc{Agg}^{*}_{PRODUCT\\_LIST}(\mathrm{COUNT\\_DISTINCT}(\mathrm{\scalebox{0.8}{PROD\\_SKU}})|\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{YEAR}})$

The result is displayed on Table 29 (we renamed the summarized attribute as
NB_PROD_SKU ). The user should associate the summarized attribute  NB_PROD_SKU
with a type _flow_ since the number of distinct products sold is cumulative
over time.

Table 29. Table $\mathrm{{PRODUCT\\_SUM}}$ BRAND |  YEAR |  NB_PROD_SKU
---|---|---
Coco Cola | 2017 | 2
Coco Cola | 2018 | 1
Zora | 2017 | 1
Zora | 2018 | 1

The first summarization query $\mathpzc{Q}\,_{1}$ aggregates  NB_PROD_SKU
along  YEAR using function $\mathrm{\color[rgb]{0,0,0}{G}}=\mathrm{SUM}$ to
count the number of distinct products by brand :

$Q_{1}=\mathpzc{Agg}^{*}_{PRODUCT\\_SUM}(\mathrm{SUM}(\mathrm{\scalebox{0.8}{NB\\_PROD\\_SKU}})|\mathrm{\scalebox{0.8}{BRAND}})$

Since  YEAR is a bottom attribute of dimension ${D}={TIME}$ in $T_{0}$, Item
(1.a) of the disjointness condition must be tested over $T_{0}$. It fails
because the product “cz-tshirt-s” belongs to two different partitions of
$T_{0}=\mathrm{{PRODUCT\\_LIST}}$ by  YEAR . Thus, query $Q_{1}$ is incorrect.
Indeed, the number of distinct products by brand reported by query $Q_{1}$
(e.g., value $2$ for brand Zora) would be different from the number directly
computed from $\mathrm{{PRODUCT\\_LIST}}$ (e.g., 1 for brand Zora).

The second summarization query $\mathpzc{Q}\,_{2}$ aggregates  NB_PROD_SKU
along  BRAND :

$Q_{2}=\mathpzc{Agg}^{*}_{PRODUCT\\_SUM}(\mathrm{SUM}(\mathrm{\scalebox{0.8}{NB\\_PROD\\_SKU}})|\mathrm{\scalebox{0.8}{YEAR}})$

Since  BRAND is again a bottom attribute of dimension ${MKT\\_PROD}$ in
$T_{0}$, Item (1.a) of the disjointness condition must be tested. It fails
since the product “cz-tshirt-s” maps to different partitions of $T_{0}$ by
BRAND . Thus, query $Q_{2}$ is also incorrect. Again, the number of distinct
products by year reported by query $Q_{2}$ (e.g., value 2 for year 2018) would
be different from the number directly computed from
$\mathrm{{PRODUCT\\_LIST}}$ (e.g., 1 for year 2018).

By comparison with our work, let’s assume that the aggregable property
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{PROD\\_SKU}}}(\mathrm{COUNT\\_DISTINCT}\mid\mathrm{Z})$,
where
$\mathrm{Z}=\\{\mathrm{\scalebox{0.8}{BRAND}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}}\\}$,
has been validated by the designer of table $\mathrm{{PRODUCT\\_LIST}}$. Then,
by Proposition 4.9, we infer that the aggregable property controlling
summarizability,
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{NB\\_PROD\\_SKU}}}(\mathrm{SUM}\mid\emptyset)$,
holds in $\mathrm{{PRODUCT\\_SUM}}$. Therefore, we also detect that both
$Q_{1}$ and $Q_{2}$ are incorrect. However, our detection does not require
running any query over the base data, unlike the disjointness condition of
(Lenz and Shoshani, 1997). We only use the knowledge of the attribute graphs
of the dimensions and of the aggregable properties defined on fact tables.

###### Example 0.

Suppose that we have a base object, represented by table
$\mathrm{STORE\\_SALES}$ introduced earlier (see Table 8(d)), in which stores
are the objects of interest (identified by  STORE_ID ). A statistical object,
modeled by fact table $\mathrm{STORE\\_SALES\\_YEARLY}$ (displayed in Table
30(a)), is computed using the following summarization query:

$\mathrm{STORE\\_SALES\\_YEARLY}=\mathpzc{Agg}^{*}_{STORE\\_SALES}(\mathrm{SUM}(AMOUNT)|\mathrm{\scalebox{0.8}{CITY}},\mathrm{\scalebox{0.8}{STATE}},\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}})$

We assume that the summarized attribute  SUM(AMOUNT) is renamed as  AMOUNT and
has been associated with type _flow_ , i.e., it can be summed along any
dimension. To fulfill the constraints on dimensions, there will be four
dimension hierarchies respectively formed of the following attributes: {  CITY
}, {  STATE }, {  COUNTRY }, and {  YEAR }.

Table 30. Results of summarization queries

(a) $\mathrm{{STORE\\_SALES\\_YEARLY}}$ CITY |  STATE |  COUNTRY |  YEAR |  AMOUNT
---|---|---|---|---
Dublin | Ohio | USA | 2017 | 3.2
Dublin | california | USA | 2017 | 5.3
Dublin | Ohio | USA | 2018 | 8.2
Dublin | California | USA | 2018 | 6.3

(b) Result of $\mathpzc{Q}\,_{3}(\mathrm{{STORE\\_SALES\\_YEARLY}})$ COUNTRY |  YEAR |  SUM(AMOUNT)
---|---|---
USA | 2017 | 8.4
USA | 2018 | 14.5

Consider the following summarization query $\mathpzc{Q}\,_{3}$ whose result is
displayed in Table 30(b):

$Q_{3}=\mathpzc{Agg}^{*}_{STORE\\_SALES}(\mathrm{SUM}(AMOUNT)|\mathrm{\scalebox{0.8}{COUNTRY}},\mathrm{\scalebox{0.8}{YEAR}})$

The disjointness condition is obviously satisfied since a store in table
$\mathrm{{STORE\\_SALES}}$ belongs to a single partition by  CITY and a single
partition by  STATE . Now, assume that the directory of all possible values
for  STORE_ID is given by the dimension table ${SALESORG}$ of Table 8(d).
Then, the completeness condition (2.a) is violated since store $Ca\\_02$ is
missing in the list of values of  STORE_ID in $\mathrm{{STORE\\_SALES}}$.
However, from a strict summarizability point of view, it is easy to see that
the result of $Q_{3}$ is the same as the result of the same aggregation
executed over table $\mathrm{{STORE\\_SALES}}$. So completeness constraint
(2.a) is useless for checking summarizability.

Completeness constraint (2.b) is also violated since bottom attribute  STATE ,
has a _null_ value in $\mathrm{{STORE\\_SALES}}$ for city ‘Paris’. Hence,
there is no tuple for ‘Paris’ in $\mathrm{{STORE\\_SALES\\_YEARLY}}$ and
therefore also no tuple for country ‘France’ in the result of $Q_{3}$. The
summarizability property is thus clearly violated since the result of $Q_{3}$
applied to $\mathrm{{STORE\\_SALES}}$ returns a different result containing
the tuple $(France,2017,45.1)$. In our work,
$\mathrm{{STORE\\_SALES\\_YEARLY}}$ would contain a tuple for city ‘Paris’
with a null value for  STATE , and therefore a tuple for country ‘France’ in
the result of $Q_{3}$.

###  5.2. Summarizability of attributes in fact tables

In previous works on multidimensional databases, summarizability is expressed
over fact tables in a way similar to our Definition 4.1 illustrated by Figure
9. In this context, we first review the work of (Pedersen et al., 1999, 2001)
that uses a multidimensional data model close to ours, and generalizes the
summarizability conditions of (Lenz and Shoshani, 1997). Note that other
solutions propose alternative analytic data models and methods to modify the
representation of dimensions to enforce summarizability. In the following, we
do not consider these solutions for which a survey can be found in (Mazón et
al., 2009). Thus, like in our work, we concentrate on summarizability models
which characterize correct compositions of two aggregation queries over fact
tables with fixed dimensions.

Given a summarization query
$\mathpzc{Q}\,=\mathpzc{Agg}^{*}_{T}(F(\mathrm{\scalebox{0.8}{A}})|\mathrm{X})$
over a fact table $T(\textsc{S})$, we define _summarizability_ as a property
of an attribute  A with respect to grouping set $\mathrm{X}$ and function
$\mathrm{\color[rgb]{0,0,0}{F}}$. More exactly, (Pedersen et al., 2001)
considers an attribute  A to be summarizable with respect to $\mathrm{X}$ and
$\mathrm{\color[rgb]{0,0,0}{F}}$ if for any subset $Z\subset\mathrm{X}$ of
dimension attributes, the following condition holds:

(4)
$\displaystyle\mathpzc{Agg}^{*}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})|\mathrm{Z})=\mathpzc{Agg}^{*}_{\mathpzc{Q}\,}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))|\mathrm{Z})$

Note that this definition is more restrictive than our notion of
summarizability in Definition 4.1, since it imposes that the same function
$\mathrm{\color[rgb]{0,0,0}{F}}$ is used in the two queries. The following
conditions provided by (Pedersen et al., 2001) are sufficient for ensuring
Equation 4. Let $\mathrm{X}_{D}$ denote the set of dimension attributes for
dimension ${D}$ in $\mathrm{X}$:

  1. (1)

Function $\mathrm{\color[rgb]{0,0,0}{F}}$ is _applicable_ to  A ,

  2. (2)

Function $\mathrm{\color[rgb]{0,0,0}{F}}$ is _distributive_ over the domain of
values in  A .

  3. (3)

For every dimension ${D}$, all the value mappings between the bottom level
attribute of ${D}$ in $T$ and any attribute of $\mathrm{X}_{D}$ are many to
one.

  4. (4)

For every dimension ${D}$, every value of an attribute in $T$ that is a sub-
level of an attribute of $\mathrm{X}_{D}$ must be non null.

We now comment each condition and draw comparisons with our work. In the first
condition, (Pedersen et al., 2001) assumes that we know the functions that are
applicable to  A . Three types of aggregation functions are distinguished: (1)
functions, which are applicable to data that can be added together (e.g.,
$\mathrm{SUM}$, $\mathrm{COUNT}$, $\mathrm{AVG}$), (2) functions, which are
applicable to data that can be used for average calculations (e.g.,
$\mathrm{COUNT}$, $\mathrm{AVG}$, $\mathrm{MIN}$, $\mathrm{MAX}$), and (3)
functions which are applicable to data that can only be counted. However,
unlike our work, the notion of aggregation type does not consider the
dimensions along which a summarization can be performed. The second condition
uses a definition of distributive function that is more restrictive than our
Definition 4.2 because it requires that $\mathrm{\color[rgb]{0,0,0}{F}}$ is
such that for any two sets, $V_{1}$ and $V_{2}$, $F(V_{1},\cup
V_{2})=F(F(V_{1})\cup F(V_{2}))$. Thus, functions like $\mathrm{COUNT}$ are
discarded. The third condition is similar to the disjointness condition of
(Lenz and Shoshani, 1997) which we already compared with our work. The fourth
condition is equivalent to the second completeness condition (2.b) of (Lenz
and Shoshani, 1997) but does not cover the first completeness condition (2.a).
As mentioned before, aggregation functions in our work handle null values in
dimensions as regular values, and can ignore condition (2.b) to guarantee
summarizability.

###  5.3. Multidimensional normal forms

Several works proposed multidimensional normal forms for analytic tables that
provide guarantees for the correctness of summarization queries (Lehner et
al., 1998; Lechtenbörger and Vossen, 2003). These normal forms can be used to
design dimension and fact tables over which correct summarization queries can
be easily detected and evaluated. In the sequel, we are not interested in the
design aspects but we examine the definitions of these normal forms as a way
to formulate summarizability conditions.

We first introduce a few concepts and vocabulary. A dimension attribute (also
called a dimension level) which can have a _null_ value is called _optional_
and otherwise called _mandatory_. Dimensions must have a single bottom level
type and an implicit top level type, called _ALL_. The hierarchy in each
dimension is strict using ”functional dependencies with nulls” (NFD), that is,
each attribute $\mathrm{\scalebox{0.8}{A}}_{i}$ has at most one parent
attribute $\mathrm{\scalebox{0.8}{A}}_{j}$ and each arc $(A_{i},A_{j})$ in the
attribute graph of the dimension is labelled with a $\mathbf{1}$ (Section
2.2).

The novelty of (Lehner et al., 1998; Lechtenbörger and Vossen, 2003) in
comparison with (Pedersen et al., 2001) is the following. A dimension is also
associated with a (possibly empty) set of _context dependencies_ : let
$\mathrm{\scalebox{0.8}{A}}_{i}$ and $\mathrm{\scalebox{0.8}{A}}_{j}$ be two
dimension attributes of a dimension ${D}$ such that
$\mathrm{\scalebox{0.8}{A}}_{i}$ is optional,
$\mathrm{\scalebox{0.8}{A}}_{j}\neq ALL$, and
$\mathrm{\scalebox{0.8}{A}}_{i}\preccurlyeq A_{j}$. If $c\in dom(A_{j})$ and
$c\neq null$, then $(A_{i},A_{j},c)$ is a context dependency for ${D}$ stating
that for every tuple $T$ of the dimension table,
$t.\mathrm{\scalebox{0.8}{A}}_{j}=c\Leftrightarrow
t.\mathrm{\scalebox{0.8}{A}}_{i}\neq null$. Intuitively, the interpretation of
a context dependency is that $\mathrm{\scalebox{0.8}{A}}_{j}$ plays the role
of a discriminating attribute in the hierarchy and value $c$ is the
discriminating value to indicate when the optional attribute
$\mathrm{\scalebox{0.8}{A}}_{i}$ has a non-null value. Note that the use of an
equivalence ($\Leftrightarrow$), in the above formula, is quite strong since
it forces the existence of a _single_ discriminating value.

In (Lehner et al., 1998; Lechtenbörger and Vossen, 2003), a fact table is
defined over a set of dimensions at the finest level of detail, that is, all
dimension attributes of a dimension are included in the schema of the fact
table, and each measure in the fact table is determined (with NFD constraints)
by the set of bottom level dimension attributes in each dimension. Thus, fact
tables are similar to the ”micro data” of (Lenz and Shoshani, 1997). Note that
although fact tables in (Pedersen et al., 2001) can represent facts at a
coarser granularity, their summarizability conditions impose that the bottom
level dimension attributes of each dimension determine (with NFD constraints)
all measure attributes. In (Lechtenbörger and Vossen, 2003), _summarizability
constraints_ express the dimension hierarchy along which a measure can be
aggregated using some aggregation function. However, no formal treatment of
summarizability constraints is provided, unlike our use of aggregable
properties for analyzing aggregate queries and propagating summarizability
constraints to query results. In (Lehner et al., 1998), the same
categorization of measure attributes as (Lenz and Shoshani, 1997) is used.

In (Lehner et al., 1998), two different multidimensional normal forms are
presented. The first one is called _Multidimensional Normal Form (MNF)_ and
provides conditions similar to the work of (Lenz and Shoshani, 1997) and
(Pedersen et al., 2001). The second one, called _Generalized Multidimensional
Normal Form (GMNF)_ , provides more general conditions which have been
slightly extended in (Lechtenbörger and Vossen, 2003).

In the following we will describe the GMNF as defined by (Lechtenbörger and
Vossen, 2003). Let $T$ be a fact table defined over a set of dimensions with a
measure (summary) attribute  A . Then $T$ is in GMNF if all of the following
conditions are satisfied:

  1. (1)

For each dimension ${D}$ of $T$:

    1. (a)

for every optional dimension attribute $\mathrm{\scalebox{0.8}{A}}_{i}$ of
${D}$, there exists a context dependency
$(\mathrm{\scalebox{0.8}{A}}_{i},\mathrm{\scalebox{0.8}{A}}_{j},c)$ in ${D}$;

    2. (b)

the values of the bottom level dimension attribute in $T$ are complete.

  2. (2)

All dimensions are mutually independent, i.e., there exists no NFD between any
two dimension attributes of two distinct dimensions.

  3. (3)

The set of (unique) bottom level attributes of all dimensions functionally
determines (FD) attribute  A .

We comment these conditions. Condition 1a and condition 3 enforce the third
and fourth conditions of (Pedersen et al., 2001) presented in Section 5.2.
Indeed, if all dimension attributes are mandatory, they cannot have null
values and all dependencies between dimension attributes become functional
dependencies. Condition 1b is analogous to the completeness condition of (Lenz
and Shoshani, 1997). Here again, the means to test this requirement are left
unspecified and seem to require some external knowledge. Finally, condition 2
ensures that dimensions do not share dimension attributes and is not really
needed for guaranteeing summarizability. Note that by conditions 2 and 3 the
bottom level dimension attributes in the schema of $T$ form a primary key in
$T$ and there is no other primary key for  A . The novelty with respect to the
previous models is brought by 1a. It constrains the semantics of every
optional dimension attribute $\mathrm{\scalebox{0.8}{A}}_{i}$ so that there
exists at an upper level an attribute $\mathrm{\scalebox{0.8}{A}}_{j}$ that
plays the role of discriminator for $\mathrm{\scalebox{0.8}{A}}_{i}$. Note
that $\mathrm{\scalebox{0.8}{A}}_{j}$ can itself be an optional attribute, in
which case there will again be a context dependency
$(\mathrm{\scalebox{0.8}{A}}_{j},\mathrm{\scalebox{0.8}{A}}_{k},c^{\prime})$
in ${D}$. Eventually, the discriminator attribute will be a mandatory
attribute since by definition of context dependency, the upper level attribute
cannot be $ALL$.

We can now reformulate the previous GMNF conditions on dimensions as
summarizability conditions on measure attributes and aggregate queries. Let
$T$ be a fact table in GMNF, and
$\mathpzc{Q}\,=\mathpzc{Agg}^{*}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})|\mathrm{X})$
be a summarization query over $T$. Then,  A is _summarizable_ with respect to
function $\mathrm{\color[rgb]{0,0,0}{F}}$ and grouping set $\mathrm{X}$,
_i.e_., for all $\mathrm{Z}\subseteq\mathrm{X}$:
$\mathpzc{Agg}^{*}_{T}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}})|\mathrm{Z})=\mathpzc{Agg}^{*}_{\mathpzc{Q}\,}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\color[rgb]{0,0,0}{F}}(\mathrm{\scalebox{0.8}{A}}))|\mathrm{Z})$)
if the following conditions hold:

  1. (1)

$\mathrm{\color[rgb]{0,0,0}{F}}$ is applicable to  A with respect to any
subset of $\mathrm{X}$ in the result of $\mathpzc{Q}\,$.

  2. (2)

One of the two conditions hold:

    1. (a)

$\mathrm{X}$ does not contain any optional dimension attribute, or

    2. (b)

if $\mathrm{X}$ contains an optional attribute
$\mathrm{\scalebox{0.8}{A}}_{i}$ then, assuming that
$(\mathrm{\scalebox{0.8}{A}}_{i},\mathrm{\scalebox{0.8}{A}}_{j},c)$ is the
associated context dependency, a filter condition:
$\mathrm{\scalebox{0.8}{A}}_{j}=c$ must be applied on $T$ before the
summarization query is applied

Here, the condition 1 is determined using either the categorization of  A
(Lehner et al., 1998) or the summarizability constraints on  A (Lechtenbörger
and Vossen, 2003), the latter being more precise as we stated earlier. The
condition 2 states that summarizability holds provided that a (filtered)
subset of the fact table is considered, and this subset is given by the
context dependencies of the dimensions over which the fact table is defined.

###### Example 0.

Consider a product dimension, ${PROD\\_NEW}$, whose attribute graph is
depicted in Figure 12. A new optional attribute  VIDEO_RES provides the video
resolution for products with screens where
$\mathrm{\scalebox{0.8}{VIDEO\\_RES}}\preccurlyeq\mathrm{\scalebox{0.8}{CATEGORY}}$
and
$\mathrm{\scalebox{0.8}{PROD\\_SKU}}\preccurlyeq\mathrm{\scalebox{0.8}{VIDEO\\_RES}}$.
Consider the fact table $\mathrm{{PROD\\_NEW\\_SALES}}$ over ${PROD\\_NEW}$
whose instance is displayed in Table 31.

Figure 12. Attribute graph of ${PROD\\_NEW}$

Assume that the designer of the dimension table ${PROD\\_NEW}$ defined a
context dependency :
$(\mathrm{\scalebox{0.8}{VIDEO\\_RES}},\mathrm{\scalebox{0.8}{CATEGORY}},\text{\leavevmode\ltxml@iqmark@open\textquoteleft\penalty
10000\hskip-0.0002pt\hskip
0.0002ptvideo\textquoteright\ltxml<EMAIL_ADDRESS>0.0002pt{}})$. Then, table $\mathrm{{PROD\\_NEW\\_SALES}}$ is in GMNF if we
assume that all products are listed in the table. It is easy to see that
conditions 2 and 3 are satisfied on the attribute graph. Condition 1 is also
satisfied because the only optional attribute  VIDEO_RES has an upper level
discriminating attribute with value ‘video’.

Table 31. $\mathrm{{PROD\\_NEW\\_SALES}}$ PROD_SKU |  SUBCATEGORY |  CATEGORY |  VIDEO_RES |  BRAND |  AMOUNT
---|---|---|---|---|---
p_01 | Video projector | video | 1920x1080 | Epson | 42
p_02 | TV | video | 3840x2160 | Philips | 58
p_05 | TV | video | 3840x2160 | Samsung | 90
p_03 | Radio | audio | - | Philips | 45
p_04 | CD-player | audio | - | Samsung | 5

Consider a summarization query
$\mathpzc{Q}\,=\mathpzc{Agg}_{\mathrm{{PROD\\_NEW\\_SALES}}}^{*}(SUM(\mathrm{\scalebox{0.8}{AMOUNT}})\mid
X)$. Then $\mathrm{SUM}$ is still applicable to the resulting attribute
$\mathrm{SUM}$(  AMOUNT ). If
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{CATEGORY}},\mathrm{\scalebox{0.8}{BRAND}}\\}$
then  AMOUNT is summarizable with respect to $\mathrm{SUM}$ and $\mathrm{X}$
because $\mathrm{X}$ only contains mandatory attributes. If
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{VIDEO\\_RES}},\mathrm{\scalebox{0.8}{BRAND}}\\}$
then, by summarizability condition 2b, $\mathrm{{PROD\\_NEW\\_SALES}}$ must be
first filtered with a filter:  CATEGORY = ’Video’ before applying
$\mathpzc{Q}\,$. Afterwards,  AMOUNT is summarizable with respect to
$\mathrm{SUM}$ and $\mathrm{X}$. Otherwise, because partitions with
identifiers containing null values are ignored, a second query taking the sum
along  VIDEO_RES would generate an incorrect value for Philips ($58$ instead
of $103$) and Samsung ($90$ instead of $95$).

We now compare GMNF with our work in the same context. Going back to Example
5.3, attribute  AMOUNT is _literally_ determined by the minimal subset of
dimension attributes {  PROD_SKU }, which also determines all other dimension
attributes of $\mathrm{{PROD\\_NEW\\_SALES}}$. Since $\mathrm{SUM}$ is
applicable to  AMOUNT , by Definition 3.1 on Definition 3.1,
$\mathbf{agg}_{\mathrm{\scalebox{0.8}{AMOUNT}}}(\mathrm{SUM},Z)$ holds in
$\mathrm{{PROD\\_NEW\\_SALES}}$, where $Z$ is the set of all dimension
attributes of $\mathrm{{PROD\\_NEW\\_SALES}}$. Consider the query $Q_{1}$ of
Example 5.3. By Proposition 4.4, attribute  AMOUNT is summarizable with
respect to $\mathrm{SUM}$ and
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{CATEGORY}},\mathrm{\scalebox{0.8}{BRAND}}\\}$
since $\mathrm{X}\subset Z$ and $\mathrm{SUM}$ is distributive. Now if
$\mathrm{X}=\\{\mathrm{\scalebox{0.8}{VIDEO\\_RES}},\mathrm{\scalebox{0.8}{BRAND}}\\}$,
since $\mathrm{X}\subset Z$, attribute  AMOUNT is also summarizable with
respect to $\mathrm{SUM}$ and $\mathrm{X}$, without requiring any pre-
filtering of $\mathrm{{PROD\\_NEW\\_SALES}}$. The reason is our usage of SQL
aggregation operations that considers null values as regular values. Indeed,
it is easy to see that the summarizability condition is satisfied by looking
at the result of $\mathpzc{Q}\,$, displayed in Table 32. To conclude the
comparison, observe that fact table $\mathrm{{STORE\\_SALES}}$ of Table 8(d)
is not in GMNF since condition 1 is violated. The optional  STATE has a null
value for different countries and it is not possible to create a _single_
context dependency for attribute  STATE using either attribute  COUNTRY or
CONTINENT . Thus, in our work, by accepting partition identifiers with null
values, we handle cases of summarizability that are rejected by the conditions
based on GMNF.

Table 32. Query result of $Q_{2}$ VIDEO_RES |  BRAND |  AMOUNT
---|---|---
1920x1080 | Epson | 42
3840x2160 | Philips | 58
3840x2160 | Samsung | 90
- | Philips | 45
- | Samsung | 5

###  5.4. Reasoning over constraints on dimensions

In (Hurtado et al., 2005), the summarizability constraints on dimensions
generalize the idea of context dependencies introduced in (Lehner et al.,
1998; Lechtenbörger and Vossen, 2003). The multidimensional data model is
restricted as follows. All dimension hierarchies have one top level attribute
called  ALL and possibly multiple bottom level attributes. As in (Pedersen et
al., 2001; Lehner et al., 1998; Lechtenbörger and Vossen, 2003), a dimension
attribute can have multiple parent dimension attributes in the hierarchy (such
dimensions are called ”heterogeneous”), and there can be both, mandatory and
optional dimension attributes. Every child-parent attribute mapping should be
functional (i.e., every value only maps to one parent value). This is
equivalent to the existence of an NFD dependency from any attribute
$\mathrm{\scalebox{0.8}{A}}_{i}$ to attribute $\mathrm{\scalebox{0.8}{A}}_{j}$
where $\mathrm{\scalebox{0.8}{A}}_{i}\preccurlyeq A_{j}$. As in (Lehner et
al., 1998; Lechtenbörger and Vossen, 2003), fact tables are defined over
dimensions at the finest level of detail, that is, the schema of the fact
table includes the bottom level attributes of the dimensions. Measure
attributes are determined by _all_ the dimensions and can only be aggregated
using distributive functions (defined as in Definition 4.2). Dimensions are
also supposed to be mutually independent in a fact table. Summarizability is
defined as a property of dimensions and any fact table built over summarizable
dimensions has summarizable measures. Let ${D}$ be a dimension, $\mathrm{X}$
be a subset of dimension attributes in ${D}$, and  B a dimension attribute in
${D}$ such that
$\mathrm{\scalebox{0.8}{A}}_{i}\preccurlyeq\mathrm{\scalebox{0.8}{B}}$ for
some attribute $\mathrm{\scalebox{0.8}{A}}_{i}\in\mathrm{X}$. Attribute  B is
_summarizable from $\mathrm{X}$ in ${D}$_ if and only if for every fact table
$T$ defined over ${D}$, every measure attribute  M of $T$, every set