

This operator was proposed in Gyssens & Lakshamanan (1997). They first define an ndimensional aggregate data (table) schema S as a triple <D, R, par>, where D = {d_{1}, d_{2}, …, d_{n}} is a set of dimension names, is a set of attributes and par: D → 2^{{A1, A2, …, Am}}, such that: i) for all i, j = 1, …, n, with i ≠ j, The authors denote par (d_{i}) by X_{i}. The definition of the fold operator is:
Let s be a MAD with schema S and let d be one of the dimensions of D.
We define fold^{d}(s) as a MAD with schema S' = <D \ {d}, R, par'>, where, for all di in D \ {d}, par' (di) = par (di), and with an instance tab S'(rep(s)), where rep(s) is the denotation of the relational representation f(s) of the table instance s, i.e., a relation with schema R.

